Submission #1314473

#TimeUsernameProblemLanguageResultExecution timeMemory
1314473eldorbek_008콤보 (IOI18_combo)C++17
Compilation error
0 ms0 KiB
#include "combo.h" #include <bits/stdc++.h> using namespace std; string guess_sequence(int n) { string s = ""; int c1 = guess("AB"); int c2; if (c1 > 0) { c2 = press("A"); if (c2 > 0) { s = "A"; } else { s = "B"; } } else { c2 = press("X"); if (c2 > 0) { s = "X"; } else { s = "Y"; } } string p = s; string t = "ABXY"; t.erase(t.find(p[0])); for (int i = 1; i <= n; i++) { string cur = s + t[0] + t[0] + s + t[0] + t[1] + s + t[0] + t[2] + s + t[1] + p; int c = press(cur); if (c == 0) { s += t[0]; } else if (c == 1) { s += t[1]; } else { s += t[2]; } } return s; }

Compilation message (stderr)

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:7:14: error: 'guess' was not declared in this scope
    7 |     int c1 = guess("AB");
      |              ^~~~~