| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 370108 | AdamGS | 콤보 (IOI18_combo) | C++14 | 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 "combo.h"
#include<bits/stdc++.h>
using namespace std;
#define rep(a, b) for(int a = 0; a < (b); ++a)
string guess_sequence(int N) {
string ans="";
char T[4]={'A','B','X','Y'};
rep(i, 4) {
int p=press(ans+T[i]);
if(p==1) {
ans+=T[i];
break;
}
}
rep(i, N-1) {
rep(j, 4) {
if(T[j]!=ans[0]) {
int p=press(ans+T[j]);
if(p==i+2) {
ans+=T[j];
break;
}
}
}
}
return ans;
}
int main() {
}
