Submission #1006887

#TimeUsernameProblemLanguageResultExecution timeMemory
1006887GTACombo (IOI18_combo)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> // #include "combo.h" using namespace std; #define fr(m,n,k) for(int m=n;m<=k;m++) #define sz size() #define all(v) v.begin(), v.end() int n; string guess_sequence(int N) { n = N; string v = "ABXY"; string p; int a; fr(j, 0, 3) { p = v[j]; int x = press(p); if (x == 1) { a = j; break; } if (j == 2) { a = 3; break; } } p = v[a]; vector<int> sisa = {0, 1, 2, 3}; sisa.erase(find(all(sisa), a)); fr(i, 2, n) { fr(pos, 0, 2) { p += v[sisa[pos]]; int x = press(p); if (x == i) break; else p.erase(--p.end()); if (pos == 1) { p += v[sisa[2]]; break; } } } return p; }

Compilation message (stderr)

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:17:13: error: 'press' was not declared in this scope
   17 |     int x = press(p);
      |             ^~~~~
combo.cpp:33:15: error: 'press' was not declared in this scope
   33 |       int x = press(p);
      |               ^~~~~