# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
849930 | Andrijanikolic73 | Combo (IOI18_combo) | C++17 | 1 ms | 596 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |