Submission #738990

#TimeUsernameProblemLanguageResultExecution timeMemory
738990raul2008487Combo (IOI18_combo)C++17
Compilation error
0 ms0 KiB
#include "combo.h" #include<bits/stdc++.h> #define pb push_back string guess_sequence(int N) { string s=""; int cc=1,st; ll cs1=press("AB"),cs2=press("AX"); vector<string> vec; if(cs1==2){ s+="AB"; vec.pb('B'); vec.pb('X'); vec.pb('Y'); } else if(cs2==2){ s+="AX"; vec.pb('B'); vec.pb('X'); vec.pb('Y'); } else if(cs1==1 && cs2==1){ s+="AY"; vec.pb('B'); vec.pb('X'); vec.pb('Y'); } else if(cs1==1){ s+='B'; vec.pb('A'); vec.pb('X'); vec.pb('Y'); } else if(cs2==1){ s+='X'; vec.pb('A'); vec.pb('B'); vec.pb('Y'); } else{ s+='Y'; vec.pb('B'); vec.pb('X'); vec.pb('A'); } st=s.size(); if(st==N){ return s; } for(int i=st;i<n-1;i++){ int query=press(s+v[0]+s+v[1]+v[1]+s+v[1]+v[2]); if(query==(i+1)){ s+=v[0]; } else if(query==(i+2)){ s+=v[1]; } else{ s+=v[2]; } } if(press(s+v[0])==N){ return s+v[0]; } else if(press(s+v[1])==N){ return s+v[1]; } return s+v[2]; }

Compilation message (stderr)

combo.cpp:4:1: error: 'string' does not name a type; did you mean 'stdin'?
    4 | string guess_sequence(int N) {
      | ^~~~~~
      | stdin