# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
989613 | Newtonabc | Combo (IOI18_combo) | C++14 | 42 ms | 1368 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 "combo.h"
#include<bits/stdc++.h>
using namespace std;
vector<string> v;
string guess_sequence(int N) {
bool a,b,x,y;
int mx=1;
string s="";
a=b=x=y=true;
if(press("A")) a=false,s="A";
else if(press("B")) b=false,s="B";
else if(press("X")) x=false,s="X";
else y=false,s="Y";
if(a) v.push_back("A");
if(b) v.push_back("B");
if(x) v.push_back("X");
if(y) v.push_back("Y");
for(int i=2;i<=N;i++){
for(int j=0;j<v.size();j++){
if(press(s+v[j])>mx){
s=s+v[j];
mx++;
break;
}
}
}
return s;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |