# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
349491 |
2021-01-17T16:32:41 Z |
David_M |
Combo (IOI18_combo) |
C++14 |
|
1 ms |
268 KB |
#include "combo.h"
#include <bits/stdc++.h>
using namespace std;
string ans;
char c, a[]={'B', 'X', 'Y'};
string guess_sequence(int N){
if(press("XY")) ans+='Y'-press("X");
else ans+='B'-press("A");
if(N==1)return ans;
if(ans!="a")a[max(0, int(ans[0]-'W'))]='A';
for(int i=1;i<N-1;i++)ans+=a[press(ans+a[1]+ans+a[2]+a[0]+ans+a[2]+a[1]+ans+a[2]+a[2])-i];
if(press(ans+a[0])==N)return ans+a[0];
if(press(ans+a[1])==N)return ans+a[1];
return ans+a[2];
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
200 KB |
Wrong Answer: wrong guess. |
2 |
Halted |
0 ms |
0 KB |
- |
# |
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 |
Correct |
1 ms |
200 KB |
Output is correct |
4 |
Correct |
1 ms |
268 KB |
Output is correct |
5 |
Incorrect |
1 ms |
200 KB |
Wrong Answer: wrong guess. |
6 |
Halted |
0 ms |
0 KB |
- |