# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
99896 |
2019-03-08T14:08:41 Z |
1Khan |
Combo (IOI18_combo) |
C++14 |
|
2 ms |
256 KB |
// In the name of GOD
#include "combo.h"
#include <bits/stdc++.h>
using namespace std;
#define nl '\n'
string guess_sequence(int n){
string s;
if(n == 1){
int p = press("A");
if(p){
s += 'A';
return s;
}
p = press("B");
if(p){
s += 'B';
return s;
}
p = press("X");
if(p){
s += 'x';
return s;
}
p = press("Y");
if(p){
s += 'y';
return s;
}
}
if(n == 2){
string k[111];
k[1] = "AB";
k[2] = "AX";
k[3] = "AY";
k[4] = "BX";
k[5] = "BY";
k[6] = "BA";
k[7] = "XA";
k[8] = "XY";
k[9] = "XB";
k[10] = "YA";
k[11] = "YB";
k[12] = "YX";
}
if(n == 3){
string k[] = { "ABX",
"ABY",
"ABB",
"AXY",
"AXB",
"AXX",
"AYX",
"AYB",
"AYY",
"BAX",
"BAY",
"BAA",
"BXA",
"BXY",
"BXX",
"BYA",
"BYX",
"BYY",
"XAB",
"XAY",
"XAA",
"XBA",
"XBY",
"XBB",
"XYA",
"XYB",
"XYY",
"YAB",
"YAX",
"YAA",
"YBA",
"YBX",
"YBB",
"YXA",
"YXB",
"YXX",
};
int w = 0;
for(int i = 0; ; ++i){
if(k[i].size() == 0){
break;
}
int val = press(k[i]);
w = max(w, val);
if(w == val){
s = k[i];
}
}
return s;
} else{
s += "ABXY";
return s;
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
200 KB |
Output is correct |
2 |
Correct |
2 ms |
200 KB |
Output is correct |
3 |
Correct |
1 ms |
200 KB |
Output is correct |
4 |
Correct |
1 ms |
200 KB |
Output is correct |
5 |
Correct |
2 ms |
200 KB |
Output is correct |
6 |
Correct |
2 ms |
200 KB |
Output is correct |
7 |
Correct |
1 ms |
200 KB |
Output is correct |
8 |
Correct |
1 ms |
200 KB |
Output is correct |
9 |
Correct |
2 ms |
200 KB |
Output is correct |
10 |
Correct |
2 ms |
200 KB |
Output is correct |
11 |
Correct |
1 ms |
200 KB |
Output is correct |
12 |
Correct |
1 ms |
200 KB |
Output is correct |
13 |
Correct |
1 ms |
200 KB |
Output is correct |
14 |
Correct |
2 ms |
200 KB |
Output is correct |
15 |
Correct |
1 ms |
200 KB |
Output is correct |
16 |
Correct |
1 ms |
256 KB |
Output is correct |
17 |
Correct |
2 ms |
200 KB |
Output is correct |
18 |
Correct |
2 ms |
200 KB |
Output is correct |
19 |
Correct |
1 ms |
200 KB |
Output is correct |
20 |
Correct |
1 ms |
200 KB |
Output is correct |
21 |
Correct |
2 ms |
200 KB |
Output is correct |
22 |
Correct |
1 ms |
200 KB |
Output is correct |
23 |
Correct |
2 ms |
200 KB |
Output is correct |
24 |
Correct |
2 ms |
200 KB |
Output is correct |
25 |
Correct |
2 ms |
200 KB |
Output is correct |
26 |
Correct |
2 ms |
200 KB |
Output is correct |
27 |
Correct |
1 ms |
200 KB |
Output is correct |
28 |
Correct |
2 ms |
200 KB |
Output is correct |
29 |
Correct |
1 ms |
256 KB |
Output is correct |
30 |
Correct |
2 ms |
200 KB |
Output is correct |
31 |
Correct |
1 ms |
200 KB |
Output is correct |
32 |
Correct |
1 ms |
200 KB |
Output is correct |
33 |
Correct |
2 ms |
200 KB |
Output is correct |
34 |
Correct |
1 ms |
200 KB |
Output is correct |
35 |
Correct |
2 ms |
200 KB |
Output is correct |
36 |
Correct |
1 ms |
200 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
200 KB |
Output is correct |
2 |
Correct |
1 ms |
200 KB |
Output is correct |
3 |
Incorrect |
1 ms |
256 KB |
Wrong Answer: wrong guess. |
4 |
Halted |
0 ms |
0 KB |
- |