Submission #1305860

#TimeUsernameProblemLanguageResultExecution timeMemory
1305860faricaCombo (IOI18_combo)C++20
Compilation error
0 ms0 KiB
#include "combo.h" #include <bits/stdc++.h> typedef long long ll; using namespace std; using vi = vector<int>; using pi = pair<int,int>; string guess_sequence(int N) { string ans = ""; int prev = 0; char c[4] = {'A', 'B', 'X', 'Y'}; for(int i=0; i<N; ++i) { for(char ch: c) { tmp = press(ans + ch); if(tmp == prev+1) { ans += ch; ++prev; break; } } } return ans; }

Compilation message (stderr)

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:14:25: error: 'tmp' was not declared in this scope; did you mean 'tm'?
   14 |                         tmp = press(ans + ch);
      |                         ^~~
      |                         tm