| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 302084 | Molukhyyeh | Combo (IOI18_combo) | C++14 | 1 ms | 232 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;
string guess_sequence(int N) {
string S = "";
char p[] = {'A', 'B', 'X', 'Y'};
if(N == 3){
for(int i = 0; i<4; ++i){
S = "A";
S += p[i];
string tmp = S;
for(int j = 0; j<4; ++j){
S += p[j];
if(press(S) == 3)return S;
S = tmp;
}
}
for(int i = 0; i<4; ++i){
S = "B";
S += p[i];
string tmp = S;
for(int j = 0; j<4; ++j){
S += p[j];
if(press(S) == 3)return S;
S = tmp;
}
}
for(int i = 0; i<4; ++i){
S = "X";
S += p[i];
string tmp = S;
for(int j = 0; j<4; ++j){
S += p[j];
if(press(S) == 3)return S;
S = tmp;
}
}
for(int i = 0; i<4; ++i){
S = "Y";
S += p[i];
string tmp = S;
for(int j = 0; j<4; ++j){
S += p[j];
if(press(S) == 3)return S;
S = tmp;
}
}
}
return S;
}
//ABXY
// ABX , ABY , AXY, BXY | # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
