# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
485962 | ala2 | Combo (IOI18_combo) | C++14 | 72 ms | 444 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"
using namespace std;
string guess_sequence(int N) {
string p = "";
for (int i = 0; i < 4 * N; ++i) {
p += 'A';
}
int coins = press(p);
string S = "";
for (int i = 0; i < N; ++i) {
S += 'A';
}
int h=N;
string ans="";
for(int i=0;i<h;i++){
int a=press(ans+"A");
if(a==i+1)
{
ans+="A";
continue;
}
int b=press(ans+"B");
if(b==i+1)
{
ans+="B";
continue;
}
int x=press(ans+"X");
if(x==i+1)
{
ans+="X";
continue;
}
ans+="Y";
}
return ans;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |