# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
469916 |
2021-09-02T10:03:56 Z |
IvnF |
Combo (IOI18_combo) |
C++14 |
|
1 ms |
212 KB |
#include "combo.h"
#include <bits/stdc++.h>
using namespace std;
string guess_sequence(int n){
string ans="", s="", x;
x="A";
int nilai=press(x);
if(nilai==1){
ans=x;
}
x="B";
nilai=press(x);
if(nilai==1) ans=x;
x="X";
nilai=press(x);
if(nilai==1) ans=x;
x="Y";
if(ans=="") ans=x;
for(int i=1;i<n;++i){
string tmp=ans;
tmp+="X";
nilai=press(x);
if(nilai==(i+1)){
ans=tmp;
continue;
}
tmp=ans;
tmp+="Y";
nilai=press(x);
if(nilai==(i+1)){
ans=tmp;
continue;
}
tmp=ans;
tmp+="A";
nilai=press(x);
if(nilai==(i+1)){
ans=tmp;
continue;
}
tmp=ans;
tmp+="B";
ans=tmp;
continue;
}
return ans;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
200 KB |
Output is correct |
2 |
Incorrect |
1 ms |
200 KB |
Wrong Answer: wrong guess. |
3 |
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 |
0 ms |
200 KB |
Output is correct |
4 |
Correct |
0 ms |
200 KB |
Output is correct |
5 |
Partially correct |
0 ms |
200 KB |
Output is partially correct |
6 |
Incorrect |
1 ms |
212 KB |
Wrong Answer: wrong guess. |
7 |
Halted |
0 ms |
0 KB |
- |