# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
278836 | themax23 | 콤보 (IOI18_combo) | C++17 | 40 ms | 580 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "combo.h"
#include <bits/stdc++.h>
using namespace std;
std::string guess_sequence(int N) {
//first part: Getting the first letter
string first = "";
int fcoin = press("XY");
if (fcoin){
if(press("X"))
first = "X";
else
first = "Y";
}
else{
if(press("A"))
first = "A";
else
first = "B";
}
if(N == 1) return first;
string posibles = "",ans = first;
if(first == "A") posibles = "BXY";
else if(first == "B") posibles = "AXY";
else if(first == "X") posibles = "ABY";
else posibles = "ABX";
for(int i = 1; i < N -1; ++i){
string test = ans + posibles[0] + posibles[0] + ans + posibles[0] + posibles[1] + ans + posibles[0] + posibles[2] + ans + posibles[1];
int coins = press(test);
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |