Submission #1132241

#TimeUsernameProblemLanguageResultExecution timeMemory
1132241bobthescienceCombo (IOI18_combo)C++20
Compilation error
0 ms0 KiB
#include<bits/stdc++.h> #include "combo.h" using namespace std; std::string guess_sequence(int N) { string p = ""; int ord; vector<char> add = {'A', 'B', 'X', 'Y'}; for (int i = 0;i < 4;i++) { if (press("" + add[i])) { add.erase(add.begin() + i); break; } } for (int i = 1;i < N;i++) { for (char c :add) { if (press(p + c) > i) { r++; p += c; break; } } } return p; }

Compilation message (stderr)

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:19:9: error: 'r' was not declared in this scope
   19 |         r++;
      |         ^