Submission #1264081

#TimeUsernameProblemLanguageResultExecution timeMemory
1264081user736482Art Collections (BOI22_art)C++20
Compilation error
0 ms0 KiB
#pragma GCC optimize("O3") #include <bits/stdc++.h> using namespace std; #define ll long long #define ld long double #define pb push_back #define ff first #define ss second #define MOD 1000000007 #define INF 1000000019 #define POT (1<<20) #define INFL 1000000000000000099 void solve(int n){ vector<ll>v; vector<int>v2; for(ll i=0;i<n;i++)v2.pb(i+1); for(ll i=0;i<n;i++){ v.pb(publish(v2)); for(ll j=0;j<n-1;j++)swap(v2[j],v2[j+1]); } v.pb(v[0]); vector<int>odp(n); for(ll i=0;i<n;i++){ odp[v[i]-(v[i]+v[i+1]-n+1)/2]=i+1; } answer(odp); }

Compilation message (stderr)

art.cpp: In function 'void solve(int)':
art.cpp:19:14: error: 'publish' was not declared in this scope
   19 |         v.pb(publish(v2));
      |              ^~~~~~~
art.cpp:27:5: error: 'answer' was not declared in this scope
   27 |     answer(odp);
      |     ^~~~~~