Submission #552286

#TimeUsernameProblemLanguageResultExecution timeMemory
552286ctphongCombo (IOI18_combo)C++14
Compilation error
0 ms0 KiB
#include<bits/stdc++.h> using namespace std; #define fto(i,a,b) for(int i = a; i <= b; ++i) string s; int press(string s) { cout << s << endl; fflush(stdout); int gt; cin >> gt; return gt; } string guess_sequence(int N) { int n; cin >> n; string gt = ""; if (out(s+"X") == 1) s = s + "X"; else if (out(s+"Y") == 1) s = s + "Y"; else if (out(s+"A") == 1) s = s + "A"; else if (out(s+"B") == 1) s = s + "B"; gt = s; fto (i, 2, n) { if (out(s+"X"+gt) == i) s = s + "X"; else if (out(s+"Y"+gt) == i) s = s + "Y"; else if (out(s+"A"+gt) == i) s = s + "A"; else if (out(s+"B"+gt) == i) s = s + "B"; } return s; }

Compilation message (stderr)

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:16:6: error: 'out' was not declared in this scope
   16 |  if (out(s+"X") == 1) s = s + "X";
      |      ^~~
combo.cpp:22:7: error: 'out' was not declared in this scope
   22 |   if (out(s+"X"+gt) == i) s = s + "X";
      |       ^~~