# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
82846 | leejseo | Combo (IOI18_combo) | C++11 | 56 ms | 544 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;
int first = -1;
char X[] = {'A', 'B', 'X', 'Y'};
inline char getChar(int x){
if (x < first) return X[x];
return X[x+1];
}
string guess_sequence(int N) {
string p = "";
int v1 = press("AB");
int v2 = press("AX");
// Determine first letter;
if (v1 >= 1 && v2 >= 1){
p += "A";
first = 0;
}
else{
if (v1 >= 1){
p += "B";
first = 1;
}
else{
if (v2 >= 1){
p += "X";
first = 2;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |