Submission #1023295

#TimeUsernameProblemLanguageResultExecution timeMemory
1023295vaneaCombo (IOI18_combo)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; using ll = long long; string guess_sequence(int n) { string pos = "ABXY"; char beg; for(auto it : pos) { string s(n, it); int k = press(s); if(k == 1) beg = it; } string ans(n, beg); int last = 1; for(int i = 1; i < n; i++) { for(auto it : pos) { if(it == beg) continue; ans[i] = it; int curr = press(ans); if(curr == last+1) break; } last++; } return ans; } int main() { ios_base::sync_with_stdio(0); cin.tie(0); }

Compilation message (stderr)

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:10:17: error: 'press' was not declared in this scope
   10 |         int k = press(s);
      |                 ^~~~~
combo.cpp:19:24: error: 'press' was not declared in this scope
   19 |             int curr = press(ans);
      |                        ^~~~~