# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1084357 | MahmytM | Combo (IOI18_combo) | C++17 | 0 ms | 0 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<bits/stdc++.h>
#include "combo.h"
using namespace std;
#define ll long long
#define ff first
#define ss second
#define pb push_back
string guess_sequence(int N){
string s="";
for(int i=0;i<N;i++){
s+='A';
}
int in=0;
char a='B';
while(in<N){
in=press(s);
for(int i=in;i<N;i++){
s[i]=a;
}
if(a=='A') a='B';
else if(a=='B') a='X';
else if(a=='X') a='Y';
else if(a=='Y') a='A';
}
return a;
}