# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
338202 | zggf | Combo (IOI18_combo) | C++14 | 76 ms | 440 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) {
char firstLetter;
if(press("X")) firstLetter = 'X';
else if(press("Y")) firstLetter = 'Y';
else if(press("A")) firstLetter = 'A';
else if(press("B")) firstLetter = 'B';
string wyn = "";
wyn.push_back(firstLetter);
for(int i = 1; i < N; i++){
if(firstLetter!='A'&&press(wyn+"A")-wyn.size()>0) {wyn.push_back('A'); continue;}
if(firstLetter!='B'&&press(wyn+"B")-wyn.size()>0) {wyn.push_back('B'); continue;}
if(firstLetter!='X'&&press(wyn+"X")-wyn.size()>0) {wyn.push_back('X'); continue;}
if(firstLetter!='Y'&&press(wyn+"Y")-wyn.size()>0) {wyn.push_back('Y'); continue;}
}
return wyn;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |