Submission #731965

#TimeUsernameProblemLanguageResultExecution timeMemory
731965parsadox2Permutation (APIO22_perm)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #define pb push_back #define F first #define S second #define debug(x) cout << #x << "= " << x << ", " #define ll long long #define fast ios::sync_with_stdio(false), cin.tie(0), cout.tie(0) #define SZ(x) (int) x.size() #define wall cout << endl; using namespace std; mt19937 rng(chrono::steady_clock::now().time_since_epoch().count()); vector <int> construct_permutation(long long k) { vector <int> res; if(k <= 90) { for(int i = k - 2 ; i >= 0 ; i--) res.pb(i); } return res; } int32_t main() { fast; int q; cin >> q; while(q--) { long long k; cin >> k; vector <int> perm = construct_permutation(k); for(auto u } return 0; }

Compilation message (stderr)

perm.cpp: In function 'int32_t main()':
perm.cpp:31:13: error: expected ';' before '}' token
   31 |   for(auto u
      |             ^
      |             ;
   32 |  }
      |  ~           
perm.cpp:32:2: error: expected primary-expression before '}' token
   32 |  }
      |  ^
perm.cpp:31:13: error: expected ';' before '}' token
   31 |   for(auto u
      |             ^
      |             ;
   32 |  }
      |  ~           
perm.cpp:32:2: error: expected primary-expression before '}' token
   32 |  }
      |  ^
perm.cpp:31:13: error: expected ')' before '}' token
   31 |   for(auto u
      |      ~      ^
      |             )
   32 |  }
      |  ~           
perm.cpp:32:2: error: expected primary-expression before '}' token
   32 |  }
      |  ^
perm.cpp:31:12: warning: unused variable 'u' [-Wunused-variable]
   31 |   for(auto u
      |            ^