# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
313901 |
2020-10-17T09:06:03 Z |
Fidisk |
Combo (IOI18_combo) |
C++14 |
|
1 ms |
200 KB |
#include <bits/stdc++.h>
#include <combo.h>
using namespace std;
#define oo 1e18
#define fi first
#define se second
#define sp(iiii) setprecision(iiii)
#define IO ios_base::sync_with_stdio(false); cin.tie(0)
#define ms(aaaa,xxxx) memset(aaaa,xxxx,sizeof(aaaa))
#define cntbit(xxxx) __builtin_popcount(xxxx)
#define getbit(xxxx,aaaa) ((xxxx>>(aaaa-1))&1)
typedef long double ld;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> pii;
typedef pair<pair<int,int>,int> piii;
typedef pair<long long,long long> pll;
typedef pair<pair<long long,long long>,long long> plll;
const ll mod=1e9+7;
char st,s1,s2,s3;
string ans;
int i,k;
string guess_sequence(int n) {
if (press("AB")>0) {
if (press("A")>0) {
st='A';
}
else {
st='B';
}
}
else {
if (press("X")>0) {
st='X';
}
else {
st='Y';
}
}
if (st=='A') {
s1='B';
s2='X';
s3='Y';
}
else if (st=='B') {
s1='A';
s2='X';
s3='Y';
}
else if (st=='X') {
s1='B';
s2='A';
s3='Y';
}
else if (st=='Y') {
s1='B';
s2='X';
s3='A';
}
for (i=1;i<n-1;i++) {
k=press(st+ans+s1+st+ans+s2+s1+st+ans+s2+s2+st+ans+s2+s3);
if (k==(i+1)) {
ans+=s1;
}
else if (k==(i+2)) {
ans+=s2;
}
else {
ans+=s3;
}
}
if (press(st+ans+'A'+st+ans+'B')==n) {
if (press(st+ans+'A')) {
ans+='A';
}
else {
ans+='B';
}
}
else {
if (press(st+ans+'X')) {
ans+='X';
}
else {
ans+='Y';
}
}
return st+ans;
}
# |
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 |
Incorrect |
1 ms |
200 KB |
Wrong Answer: wrong guess. |
2 |
Halted |
0 ms |
0 KB |
- |