Submission #725506

#TimeUsernameProblemLanguageResultExecution timeMemory
725506AmostmhPermutation (APIO22_perm)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; #define pb push_back; vector<int> construct_permutation(long long k) { vector<int> vecint = {}; for(int i = k-1; i > 0; --i) { vecint.pb(i); } return vecint; }

Compilation message (stderr)

perm.cpp: In function 'std::vector<int> construct_permutation(long long int)':
perm.cpp:4:12: error: statement cannot resolve address of overloaded function
    4 | #define pb push_back;
      |            ^
perm.cpp:10:12: note: in expansion of macro 'pb'
   10 |     vecint.pb(i);
      |            ^~
perm.cpp:10:15: warning: statement has no effect [-Wunused-value]
   10 |     vecint.pb(i);
      |              ~^~