# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
75839 |
2018-09-11T10:03:29 Z |
nvmdava |
Combo (IOI18_combo) |
C++17 |
|
1 ms |
200 KB |
#include "combo.h"
#include <bits/stdc++.h>
using namespace std;
string s;
char c[4];
string guess_sequence(int N) {
int k;
if(press("AB")){
if(press("A")){
c[0] = 'B';
c[1] = 'X';
c[2] = 'Y';
s = "A";
} else {
c[0] = 'A';
c[1] = 'X';
c[2] = 'Y';
s = "B";
}
} else {
if(press("X")){
c[0] = 'B';
c[1] = 'A';
c[2] = 'Y';
s = "X";
} else {
c[0] = 'B';
c[1] = 'X';
c[2] = 'A';
s = "Y";
}
}
for(int i = 2; i < N; i++){
k = press(s + c[0] + c[1] + s + c[0] + c[0] + s + c[0] + c[2] + s + c[1]);
if(k == i + 1){
s += c[0];
} else if(k == i){
s += c[1];
} else {
s += c[2];
}
}
if(press(s + c[0]) == N){
s += c[0];
} else {
if(press(s + c[1]) == N){
s += c[1];
} else {
s += c[2];
}
}
cout << s;
return s;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
200 KB |
DO NOT PRINT ANYTHING TO STANDARD OUTPUT |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
200 KB |
DO NOT PRINT ANYTHING TO STANDARD OUTPUT |
2 |
Halted |
0 ms |
0 KB |
- |