# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
141427 | MathStudent2002 | Combo (IOI18_combo) | C++14 | 62 ms | 688 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 = "AB";
int coins = press(p);
string cur = "";
char c[3];
if(coins == 0) {
p = "X";
coins = press(p);
if(coins == 0) {cur = "Y"; c[0] = 'A'; c[1] = 'B'; c[2] = 'X';}
else {cur = "X"; c[0] = 'A'; c[1] = 'B'; c[2] = 'Y';}
}
else {
p = "A";
coins = press(p);
if(coins == 0) {cur = "B"; c[0] = 'A'; c[1] = 'X'; c[2] = 'Y';}
else {cur = "A"; c[0] = 'B'; c[1] = 'X'; c[2] = 'Y';}
}
if(N == 1) return cur;
string T;
for(int i = 1; i <= N-2; i++) {
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |