# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
204473 | andrii | 콤보 (IOI18_combo) | C++14 | 63 ms | 568 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "combo.h"
#include <bits/stdc++.h>
using namespace std;
string a[] = {"A", "B", "X", "Y"};
string guess_sequence(int N) {
int v0 = press(string("AB"));
string p = "";
int f = 0;
if(v0 > 0){
int b = press(string("A"));
if(b > 0) p ="A";
else p="B", f= 1;
}else{
int b = press(string("X"));
if(b > 0) p ="X", f=2;
else p="Y", f=3;
}
for(int i = 1;i<N-1;i++){
string q = p;
q += a[(f+1)&3];
q += a[(f+1)&3];
q += p;
q += a[(f+1)&3];
q += a[(f+2)&3];
q += p;
q += a[(f+1)&3];
q += a[(f+3)&3];
q += p;
q += a[(f+2)&3];
//cout << q << '\n';
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |