Submission #370107

#TimeUsernameProblemLanguageResultExecution timeMemory
370107AdamGS콤보 (IOI18_combo)C++14
Compilation error
0 ms0 KiB
#include<bits/stdc++.h> using namespace std; #define rep(a, b) for(int a = 0; a < (b); ++a) string guess_sequence(int N) { string ans=""; char T[4]={'A','B','X','Y'}; rep(i, 4) { int p=press(ans+T[i]); if(p==1) { ans+=T[i]; break; } } rep(i, N-1) { rep(j, 4) { if(T[j]!=ans[0]) { int p=press(ans+T[j]); if(p==i+2) { ans+=T[j]; break; } } } } return ans; } int main() { }

Compilation message (stderr)

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:8:15: error: 'press' was not declared in this scope
    8 |         int p=press(ans+T[i]);
      |               ^~~~~
combo.cpp:17:23: error: 'press' was not declared in this scope
   17 |                 int p=press(ans+T[j]);
      |                       ^~~~~