Submission #582739

#TimeUsernameProblemLanguageResultExecution timeMemory
582739elkernosSuper Dango Maker (JOI22_dango3)C++17
Compilation error
0 ms0 KiB
#include "dango3.h" using namespace std; namespace { int S; int q(vector<bool> b) { vector<int> x; for(int i = 0; i < S; i++) { if(b[i]) x.push_back(i + 1); } return Pytaj(x); } void a(vector<int> v) { for(auto &t : v) { t++; } Odpowiedz(v); } } // namespace void Inicjuj(int N, int M) { S = N * M; vector<vector<int>> box(M); for(int i = 0; i < S; i++) { int lo = 0, hi = M - 1, ans = -1; while(lo <= hi) { int m = (lo + hi) / 2; vector<bool> query(S, 1); for(int x : box[m]) { query[x] = 0; } query[i] = 0; if(M - q(query) == 2) { lo = m + 1; } else { ans = m; hi = m - 1; } } box[ans].push_back(i); } for(vector<int> give : box) { a(give); } }

Compilation message (stderr)

dango3.cpp: In function 'int {anonymous}::q(std::vector<bool>)':
dango3.cpp:13:12: error: 'Pytaj' was not declared in this scope
   13 |     return Pytaj(x);
      |            ^~~~~
dango3.cpp: In function 'void {anonymous}::a(std::vector<int>)':
dango3.cpp:20:5: error: 'Odpowiedz' was not declared in this scope
   20 |     Odpowiedz(v);
      |     ^~~~~~~~~