# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
401707 | dxz05 | Combo (IOI18_combo) | C++14 | 46 ms | 576 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 abxy = "ABXY";
string guess_sequence(int n) {
string s;
if (press("AB")){
if (press("A")) s = "A"; else
s = "B";
} else {
if (press("X")) s = "X"; else
s = "Y";
}
if (n == 1) return s;
string abxy2 = abxy;
abxy.clear();
for (char ch : abxy2){
if (s[0] != ch) abxy += ch;
}
while (s.size() < n - 1){
string p;
for (int i = 0; i < 3; i++){
p += s + abxy[0] + abxy[i];
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |