Submission #685028

#TimeUsernameProblemLanguageResultExecution timeMemory
685028oblantisArt Collections (BOI22_art)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #define all(v) v.begin(), v.end() #define pb push_back #define ss second #define ff first #define vt vector using namespace std; typedef long long ll; typedef vector<int> vi; typedef vector<ll> vll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; const int inf = 2e9; const int mod = 1e9 + 7; const int maxn = 2e5 + 12; void solve(int n) { vi out(n); for(int i = 1; i <= n; i++) { vi v; for(int j = 1; j <= n; j++) { if(i != j)v.pb(j); } v.pb(i); int x = publish(v); v.pop_back(); v = {i} + v; int y = publish(v); out[(y - x + (n - 1)) / 2] = i; } answer(out); }

Compilation message (stderr)

art.cpp: In function 'void solve(int)':
art.cpp:24:11: error: 'publish' was not declared in this scope
   24 |   int x = publish(v);
      |           ^~~~~~~
art.cpp:26:10: error: expected ';' before '+' token
   26 |   v = {i} + v;
      |          ^~
      |          ;
art.cpp:30:2: error: 'answer' was not declared in this scope
   30 |  answer(out);
      |  ^~~~~~
interface.cpp: In function 'int publish(std::vector<int>)':
interface.cpp:20:17: warning: comparison of integer expressions of different signedness: 'std::vector<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   20 |     if(v.size() != N) {
      |        ~~~~~~~~~^~~~
interface.cpp: In function 'void answer(std::vector<int>)':
interface.cpp:36:17: warning: comparison of integer expressions of different signedness: 'std::vector<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   36 |     if(v.size() != N) {
      |        ~~~~~~~~~^~~~