# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1064730 | vjudge1 | Combo (IOI18_combo) | C++17 | 1 ms | 428 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "combo.h"
#include <bits/stdc++.h>
using namespace std;
string guess_sequence(int n) {
string str="",ans="";
str+="AB";
int x=press(str);
if(x>=1)
{
if(press("A"))
ans+="A";
else
ans+="B";
}
else
{
if(press("X"))
ans+="X";
else
ans+="Y";
}
str="";
if(ans=="X")
str="ABY";
else if(ans=="Y")
str="ABX";
else if(ans=="A")
str="BXY";
else
str="AXY";
for(int i=2;i<=(n-2);i++)
{
string now=ans+str[0]+str[1]+ans+str[0]+str[0]+ans+str[0]+str[2]+ans+str[1];
int temp=press(now);
if(temp==ans.length())
{
ans+=str[2];
}
else if(temp==ans.length()+1)
{
ans+=str[1];
}
else
ans+=str[0];
//cout<<ans<<endl;
}
if(press(ans+str[0])==n-1)
ans+=str[0];
else if(press(ans+str[1])==n-1)
ans+=str[1];
else
ans+=str[2];
if(press(ans+str[0])==n)
ans+=str[0];
else if(press(ans+str[1])==n)
ans+=str[1];
else
ans+=str[2];
return ans;
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |