Submission #1142367

#TimeUsernameProblemLanguageResultExecution timeMemory
1142367FZ_LaabidiCombo (IOI18_combo)C++20
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #include "combo.h" #define int long long using namespace std; string guess_sequence(int N) { string P = ""; set<char> tr = {'A', 'B', 'X', 'Y'}; int c = press("AB"); if(c>=1) { c = press("A"); if (c==1)P+="A"; else P+="B"; } else if (c==0) { c = press("X"); if (c==1)P+="X"; else P+="Y"; } tr.erase(P[0]); char B, X, Y; c=0; for (auto x: tr) { if (c==0)B = x; if (c==1)X = x; if (c==2)Y = x; c++; } for (int i=1; i<=N-2; i++) { string ty = P + X + P + B + X + P + B + Y + P + B + B; c = press(ty); if (c==1)P+=X; else if (c==2)P+=B; else P+=Y; } string ty= P+X+P+B; c = press(ty); if (c==1) { c = press(P+X); if (c==1)P+=X; else P+=B; } else P+=Y; return P; } //Cbx-2bx=0 // bx=0;

Compilation message (stderr)

/usr/bin/ld: /tmp/ccoLvQFY.o: in function `main':
grader.cpp:(.text.startup+0x4c): undefined reference to `guess_sequence[abi:cxx11](int)'
collect2: error: ld returned 1 exit status