Submission #82788

#TimeUsernameProblemLanguageResultExecution timeMemory
82788314rateCombo (IOI18_combo)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #include <combo.h> string guess_sequence (int n) { string ans; if (press ("AB")) { if (press ("A")) { ans = "A"; } else { ans = "B"; } } else { if (press ("X")) { ans = "X"; } else { ans = "Y"; } } if (n == 1) { return ans; } vector<string>ch; if (ans[0] != 'A') ch.push_back ("A"); if (ans[0] != 'B') ch.push_back ("B"); if (ans[0] != 'X') ch.push_back ("X"); if (ans[0] != 'Y') ch.push_back ("Y"); for (int i = 1; i <= n - 2; i++) { string ask; ask += ans + (ch[2] + ch[0]); ask += ans + (ch[2] + ch[1]); ask += ans + (ch[2] + ch[2]); ask += ans + (ch[1]); int value = press (ask) - i; ans += ch[value]; } if (press (ans + ch[0]) == n) { ans += ch[0]; } else { if (press (ans + ch[1]) == n) { ans += ch[1]; } else { ans += ch[2]; } } return ans; }

Compilation message (stderr)

combo.cpp:4:1: error: 'string' does not name a type; did you mean 'stdin'?
    4 | string guess_sequence (int n)
      | ^~~~~~
      | stdin