| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 885792 | sq00 | Combo (IOI18_combo) | C++14 | 1 ms | 356 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#include "combo.h"
using namespace std;
string guess_sequence(int N) {
string buttons = "", firstBtn = "";
if(press("A") == 1) {
firstBtn = "A";
buttons = "BYX";
}
else if(press("B") == 1) {
firstBtn = "B";
buttons = "AYX";
}
else if(press("Y") == 1) {
firstBtn = "Y";
buttons = "ABX";
}
else if(press("X") == 1) {
firstBtn = "X";
buttons = "ABY";
}
string current = firstBtn;
while(true) {
for(int i = 0; i < (int)buttons.size(); i++) {
string test = current + buttons[i];
int cost = press(test);
if(cost == test.size()) {
current = test;
break;
}
if(i == 1) {
current += buttons[2];
break;
}
}
if(current.size() == N) break;
}
return current;
}
컴파일 시 표준 에러 (stderr) 메시지
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
