# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
523116 | tmn2005 | Combo (IOI18_combo) | C++17 | 1 ms | 256 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"
#ifndef EVAL
#include "grader.cpp"
#endif
std::string guess_sequence(int N) {
std::string p = "";
if(press("A")){
p += 'A';
for(int i=1; i<N*4; i++){
if(press(p+'B') == i+1){
p += 'B';
}
else if(press(p+'X') == i+1){
p += 'X';
}
else if(press(p+'Y') == i+1){
p += 'Y';
}
}
}
if(press("B")){
p += 'B';
for(int i=1; i<N*4; i++){
if(press(p+'A') == i+1){
p += 'A';
}
else if(press(p+'X') == i+1){
p += 'X';
}
else if(press(p+'Y') == i+1){
p += 'Y';
}
}
}
if(press("X")){
p += 'X';
for(int i=1; i<N*4; i++){
if(press(p+'B') == i+1){
p += 'B';
}
else if(press(p+'A') == i+1){
p += 'A';
}
else if(press(p+'Y') == i+1){
p += 'Y';
}
}
}
if(press("Y")){
p += 'Y';
for(int i=1; i<N*4; i++){
if(press(p+'B') == i+1){
p += 'B';
}
else if(press(p+'X') == i+1){
p += 'X';
}
else if(press(p+'A') == i+1){
p += 'A';
}
}
}
int coins = press(p);
return p;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |