Submission #849930

#TimeUsernameProblemLanguageResultExecution timeMemory
849930Andrijanikolic73Combo (IOI18_combo)C++17
5 / 100
1 ms596 KiB
#include <bits/stdc++.h> #include "combo.h" using namespace std; //#include "combo.h" /* int press(string P){ cout<<"? "<<P; cout<<endl; int x; cin>>x; return x; }*/ std::string guess_sequence(int N) { if(N==3){ string pref=""; char P[4]={'A','B','X','Y'}; for(int i=0;i<N;i++){ for(int j=0;j<4;j++){ if(press(pref+P[j])==i+1){ pref+=P[j]; break; } } } return pref; } }/* int main(){ ios::sync_with_stdio(false); cin.tie(0); int n; cin>>n; cout<<guess_sequence(n); }*/

Compilation message (stderr)

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:27:1: warning: control reaches end of non-void function [-Wreturn-type]
   27 | }/*
      | ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...