Submission #1304547

#TimeUsernameProblemLanguageResultExecution timeMemory
1304547disfyyCombo (IOI18_combo)C++20
Compilation error
0 ms0 KiB
#include "combo.h" #include <bits/stdc++.h> using namespace std; int press(string p); string guess_sequence(int N) { char a[] = {'a', 'A', 'B', 'X', 'Y'}; for(int i = 1; i <= 4; i++) { for(int j = 1; j <= 4; j++) { for(int k = 1; k <= 4; k++) { if(i != j && i != k) { string cur = ""; cur += a[i]; cur += a[j]; ll res = press(cur); if(res == 3) { return cur; } } } } } }

Compilation message (stderr)

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:16:41: error: 'll' was not declared in this scope
   16 |                                         ll res = press(cur);
      |                                         ^~
combo.cpp:17:44: error: 'res' was not declared in this scope
   17 |                                         if(res == 3) {
      |                                            ^~~
combo.cpp:24:1: warning: control reaches end of non-void function [-Wreturn-type]
   24 | }
      | ^