Submission #76692

#TimeUsernameProblemLanguageResultExecution timeMemory
76692thebesCombo (IOI18_combo)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; string s, t, idk; string guess_sequence(int N){ if(press("AB")){ if(press("A")) s = "A", idk="BXY"; else s = "B", idk="AXY"; } else{ if(press("X")) s = "X", idk="ABY"; else s = "Y", idk="ABX"; } for(int i=2;i<N;i++){ t = s+idk[0]+s+idk[1]+idk[0]+s+idk[1]+idk[1]+s+idk[1]+idk[2]; int m = press(t); if(m == i-1) s += idk[2]; else if(m == i) s += idk[0]; else s += idk[1]; } int a = press(s+idk[0]), b = press(s+idk[1]); if(a != N-1) s += idk[0]; else if(b != N-1) s += idk[1]; else s += idk[2]; return s; }

Compilation message (stderr)

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:7:8: error: 'press' was not declared in this scope
    7 |     if(press("AB")){
      |        ^~~~~
combo.cpp:17:17: error: 'press' was not declared in this scope
   17 |         int m = press(t);
      |                 ^~~~~
combo.cpp:22:13: error: 'press' was not declared in this scope
   22 |     int a = press(s+idk[0]), b = press(s+idk[1]);
      |             ^~~~~
combo.cpp:24:13: error: 'b' was not declared in this scope
   24 |     else if(b != N-1) s += idk[1];
      |             ^