Submission #1253374

#TimeUsernameProblemLanguageResultExecution timeMemory
1253374avohadoCombo (IOI18_combo)C++20
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; #define mod 1000000007 #define maxn 200005 #define f first #define s second #define ll long long #define pb(x) push_back(x) string guess_sequence(int n){ string s; string c1="B", c2="X", c3="Y"; int f=press("B"); if(f){ c1="A"; s="B"; }else if(press("X")){ c2="A"; s="X"; }else if(press("Y")){ c3="A"; s="Y"; }else{ s="A"; } while(s.size()<n-1){ f=press(s+c1+s+c2+c1+s+c2+c2+s+c2+c3); if(f==s.size()){ s+=c3; }else if(s.size()==f-1){ s+=c1; }else{ s+=c2; } } if(press(s1+c1)==n){ return s1+c1; }else if(press(s1+c2)==n){ return s1+c2; }else{ return s1+c3; } }

Compilation message (stderr)

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:12:11: error: 'press' was not declared in this scope
   12 |     int f=press("B");
      |           ^~~~~
combo.cpp:35:14: error: 's1' was not declared in this scope; did you mean 'c1'?
   35 |     if(press(s1+c1)==n){
      |              ^~
      |              c1