Submission #90991

#TimeUsernameProblemLanguageResultExecution timeMemory
90991too_stupidCombo (IOI18_combo)C++14
Compilation error
0 ms0 KiB
#include "combo.h" #include <bits/stdc++.h> using namespace std; string guess_sequence(int N) { string p = ""; string k = "XYZ"; if(press("A")) { p+="A"; for(int i = 1 ; i < 4 * n ; i++) { for(int j = 0 ; j < 3 ; ++j) { if(press(p + k[j]) == (int)p.size() + 1) { p+=k[j]; break; } } } } else if(press("B")) { p+="B"; for(int i = 1 ; i < 4 * n ; i++) { for(int j = 0 ; j < 3 ; ++j) { if(press(p + k[j]) == (int)p.size() + 1) { p+=k[j]; break; } } } } else if(press("X")) { p+="X"; for(int i = 1 ; i < 4 * n ; i++) { for(int j = 0 ; j < 3 ; ++j) { if(press(p + k[j]) == (int)p.size() + 1) { p+=k[j]; break; } } } } else { p+="Y"; for(int i = 1 ; i < 4 * n ; i++) { for(int j = 0 ; j < 3 ; ++j) { if(press(p + k[j]) == (int)p.size() + 1) { p+=k[j]; break; } } } } return S; }

Compilation message (stderr)

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:11:28: error: 'n' was not declared in this scope
   11 |    for(int i = 1 ; i < 4 * n ; i++)
      |                            ^
combo.cpp:28:25: error: 'n' was not declared in this scope
   28 | for(int i = 1 ; i < 4 * n ; i++)
      |                         ^
combo.cpp:43:25: error: 'n' was not declared in this scope
   43 | for(int i = 1 ; i < 4 * n ; i++)
      |                         ^
combo.cpp:58:25: error: 'n' was not declared in this scope
   58 | for(int i = 1 ; i < 4 * n ; i++)
      |                         ^
combo.cpp:71:10: error: 'S' was not declared in this scope
   71 |   return S;
      |          ^