Submission #980430

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
9804302024-05-12 07:19:05janson0109Combo (IOI18_combo)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h>
#include <combo.h>
using namespace std;
string guess_sequence(int N) {
string p = "";
string pos;
if(press("AB") >= 1) {
if(press("A") == 1) {
p += "A";
pos = "BXY";
} else {
p += "B";
pos = "AXY";
}
} else {
if(press("X") == 1) {
p += "X";
pos = "ABY";
} else {
p += "Y";
pos = "ABX";
}
}
for(int i=1; i<N-1; i++) {
string guess = p + pos[1];
for(int j=0; j<3; j++) {
guess += p+pos[0]+pos[j];
}
int l = p.size()
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:31:9: error: expected ',' or ';' before 'int'
   31 |         int length = press(guess);
      |         ^~~
combo.cpp:32:12: error: 'length' was not declared in this scope
   32 |         if(length == l) {
      |            ^~~~~~