제출 #772284

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
7722842023-07-03 21:53:53teokakabadze콤보 (IOI18_combo)C++17
5 / 100
1 ms208 KiB
#include "combo.h"
#include<bits/stdc++.h>
using namespace std;
int i;
string s, p;
char m[4];
std::string guess_sequence(int N)
{
int c = press("AB");
if(c)
{
if(press("AY")) s += 'A', m[0] = 'B', m[1] = 'X', m[2] = 'Y';
else s += 'B', m[0] = 'A', m[1] = 'X', m[2] = 'Y';
}
else
{
if(press("AY")) s += 'Y', m[0] = 'A', m[1] = 'B', m[2] = 'X';
else s += 'X', m[0] = 'A', m[1] = 'B', m[2] = 'Y';
}
for(i = 1; i < N - 1; i++)
{
p = s + m[0] + m[0] + s + m[0] + m[1] + s + m[0] + m[2] + s + m[1];
c = press(p);
if(c == i + 2) s += m[0];
else if(c == i + 1) s += m[1];
else s += m[2];
}
p = s + m[0];
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...