Submission #753629

#TimeUsernameProblemLanguageResultExecution timeMemory
753629vjudge1콤보 (IOI18_combo)C++17
Compilation error
0 ms0 KiB
std::string guess_sequence(int N) { string p="",c; int coins=0; for(int i=0;i<4;i++) { if(coins==1) continue;; if(i==0) p="A",c="BXY"; else if(i==1) p="B",c="AXY"; else if(i==2) p="X",c="ABY"; else p="Y",c="ABX"; coins = press(p); } int now=1; bool BREAK; while(1>0) { BREAK=1; string prev=p; for(char i : c) { p+=i; coins=press(p); if(coins!=now) { now++; BREAK=0; break; } else p=prev; } if(BREAK) return p; } return ""; }

Compilation message (stderr)

combo.cpp:1:6: error: 'string' in namespace 'std' does not name a type
    1 | std::string guess_sequence(int N) {
      |      ^~~~~~
combo.cpp:1:1: note: 'std::string' is defined in header '<string>'; did you forget to '#include <string>'?
  +++ |+#include <string>
    1 | std::string guess_sequence(int N) {