| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|
| 1325916 | | x_a | 콤보 (IOI18_combo) | C++20 | | 0 ms | 332 KiB |
#include "combo.h"
#include <bits/stdc++.h>
using namespace std;
string guess_sequence(int N) {
string p = "", s = "";
int last = 0, x;
char t = 'x';
vector<char> A = {'A', 'B', 'X', 'Y'}, c;
for (int i = 0; i < 1; ++i) {
x = press("AB");
if(x == 1){
if(press("A")) s = "A";
else s = "B";
}
else{
if(press("C")) s = "C";
else s = "D";
}
for(char x : A) if(x != s[0]) c.push_back(x);
int last = 1;
for(int i = 1; i < N - 1; i ++){
x = press(s + c[0] + s + c[1] + c[0] + s + c[1] + c[1] + s + c[1] + c[2]);
if(x == last + 1){
s += c[0];
}
else if(last + 2){
s += c[1];
}
else{
s += c[2];
}
last ++;
}
int cnt = 0;
for(char x : c){
if(cnt == 2){
s += x;
break;
}
if(press(s + x) == last + 1) s += x;
cnt ++;
}
}
return s;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |