Submission #534393

#TimeUsernameProblemLanguageResultExecution timeMemory
534393YaserFaisalCombo (IOI18_combo)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #include "combo.h" using namespace std; string guess_sequence (int n) { string cur = "" while(cur.size()<n) { if ( press(cur+'A') == cur.size()+1 ) { cur+='A' ; continue ; } if ( press(cur+'B') == cur.size()+1 ) { cur+='B' ; continue ; } if ( press(cur+'X') == cur.size()+1 ) { cur+='X' ; continue ; } if ( press(cur+'Y') == cur.size()+1 ) { cur+='Y' ; continue ; } } return cur ; }

Compilation message (stderr)

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:9:5: error: expected ',' or ';' before 'while'
    9 |     while(cur.size()<n)
      |     ^~~~~