Submission #1236087

#TimeUsernameProblemLanguageResultExecution timeMemory
1236087lioowArt Collections (BOI22_art)C++20
Compilation error
0 ms0 KiB
#include "art.h" #include <bits/stdc++.h> #define push_back pb using namespace std; void solve(int N) { vector<int>order; int q[N+5]; for(int i=1;i<=N;i++){ int n=N; order.clear(); while(n--){ order.push_back(i); i++; if(i>n) i=1; } q[i]=publish(order); } vector<int>ans(N); for(int i=1;i<=N;i++){ int sel; if(i==1) sel=q[1]-q[N]; else sel=q[i]-q[i-1]; ans[(N+1+sel)/2]=i-1; } answer(ans); }

Compilation message (stderr)

art.cpp: In function 'void solve(int)':
art.cpp:3:19: error: 'class std::vector<int>' has no member named 'pb'
    3 | #define push_back pb
      |                   ^~
art.cpp:13:23: note: in expansion of macro 'push_back'
   13 |                 order.push_back(i);
      |                       ^~~~~~~~~