# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
109617 | polyfish | Combo (IOI18_combo) | C++14 | 4 ms | 428 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;
char C[] = {'A', 'B', 'X', 'Y'};
string S;
bool find_first_two_char(int x) {
int tmp = press(string()+C[x]+C[x+1]);
if (tmp==0)
return false;
if (tmp==1) {
if (press(string()+C[x])==1)
S += C[x];
else
S += C[x+1];
if (press(S+C[(x+2)%4])==2)
S += C[(x+2)%4];
else
S += C[(x+3)%4];
}
else if (tmp==2) {
if (press(string()+C[x])==1)
S = S + C[x] + C[x+1];
else
S = S + C[x+1] + C[x];
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |