SHARE
TWEET

Untitled

lalalalalalalaalalla Sep 14th, 2019 92 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //
  2. //  main.cpp
  3. //  testprogram
  4. //
  5. //  Created by Yan Olerinskiy on 05/09/2019.
  6. //  Copyright © 2019 Yan Olerinskiy. All rights reserved.
  7. //
  8.  
  9. #include <iostream>
  10. #include <vector>
  11. #include <string>
  12. #include <iomanip>
  13. #include <queue>
  14. #include <cmath>
  15. #include <algorithm>
  16. #include <tuple>
  17. #include <iomanip>
  18. #include <stdio.h>
  19. #include <numeric>
  20. #include <map>
  21. #include <bitset>
  22. #include <set>
  23. #include <stack>
  24. #include <queue>
  25.  
  26. //#pragma GCC optimize("Ofast,no-stack-protector")
  27. //#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,tune=native")
  28. //#pragma GCC optimize("unroll-loops")
  29. //#pragma GCC optimize("fast-math")
  30. //#pragma GCC optimize("section-anchors")
  31. //#pragma GCC optimize("profile-values,profile-reorder-functions,tracer")
  32. //#pragma GCC optimize("vpt")
  33. //#pragma GCC optimize("rename-registers")
  34. //#pragma GCC optimize("move-loop-invariants")
  35. //#pragma GCC optimize("unswitch-loops")
  36. //#pragma GCC optimize("function-sections")
  37. //#pragma GCC optimize("data-sections")
  38. //#pragma GCC optimize("branch-target-load-optimize")
  39. //#pragma GCC optimize("branch-target-load-optimize2")
  40. //#pragma GCC optimize("btr-bb-exclusive")
  41.  
  42. #define int long long
  43. #define ll long long
  44. #define ull unsigned long long
  45. #define all(a) a.begin(), a.end()
  46. #define pii pair<int, int>
  47. #define pb push_back
  48. #define ld long double
  49.  
  50. using namespace std;
  51.  
  52. const int INF = 1e13;
  53. //const int mod = 2600000069;
  54. //const int p = 179;
  55.  
  56. signed main() {
  57.     ios_base::sync_with_stdio(0);
  58.     cin.tie(0);
  59.     cout.tie(0);
  60. //    freopen("points.in", "r", stdin);
  61. //    freopen("points.out", "w", stdout);
  62.     string s;
  63.     cin >> s;
  64.     int n = s.size();
  65.     string ans(n, ' ');
  66.     for (int i = 0; i < n/2; i++) {
  67.         ans[i * 2 + 1] = s[i];
  68.     }
  69.     int cur = 0;
  70.     for (int i = n/2; i < n; i++, cur += 2) {
  71.         ans[cur] = s[i];
  72.     }
  73.     cout << ans;
  74. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top