Submission #1006870

#TimeUsernameProblemLanguageResultExecution timeMemory
1006870GTACombo (IOI18_combo)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #include "combo.h" using namespace std; #define fr(m,n,k) for(int m=n;m<=k;m++) int n; string guess_sequence(int N) { n = N; string v = "ABXY"; string p; int a; fr(j, 0, 3) { p = v[j]; int x = press(p); if (x == 1) { a = j; break; } if (j == 2) { a = 3; break; } } p = v[a]; si sisa = {0, 1, 2, 3}; sisa.erase(a); fr(i, 2, n) { for (auto j : sisa) { p += v[j]; int x = press(p); if (x == i) { break; } else p.erase(--p.end()); if (sisa.sz == 1) { p += v[*--sisa.end()]; break; } } } return p; }

Compilation message (stderr)

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:27:3: error: 'si' was not declared in this scope; did you mean 'sin'?
   27 |   si sisa = {0, 1, 2, 3}; sisa.erase(a);
      |   ^~
      |   sin
combo.cpp:27:27: error: 'sisa' was not declared in this scope
   27 |   si sisa = {0, 1, 2, 3}; sisa.erase(a);
      |                           ^~~~