Submission #85512

#TimeUsernameProblemLanguageResultExecution timeMemory
85512JustasLeCombo (IOI18_combo)C++17
Compilation error
0 ms0 KiB
/*input 9 1 2 3 7 6 5 5 2 6 */ #include <bits/stdc++.h> using namespace std; string guess_sequence(int N) { string ans = ""; string poss = "ABXY"; for (int i = 0; i < 4; i++) { string temp = "" + poss[i]; int cnt = press(temp); if (cnt > 0) { poss.erase(poss.begin() + i); ans += temp; break; } } bool ok = true; int prev = 1; while (ok) { ok = false; for (int i = 0; i < 3; i++) { string newAns = ans + "" + poss[i]; int cnt = press(newAns); if(cnt > prev) { ans = newAns; ok = true; prev = cnt; break; } } } return ans; } int main() { return 0; }

Compilation message (stderr)

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:14:13: error: 'press' was not declared in this scope
   14 |   int cnt = press(temp);
      |             ^~~~~
combo.cpp:27:14: error: 'press' was not declared in this scope
   27 |    int cnt = press(newAns);
      |              ^~~~~