| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 534565 | Abdulmohsen1284 | Combo (IOI18_combo) | C++14 | 1 ms | 200 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "combo.h"
#include"bits/stdc++.h"
using namespace std;
std::string guess_sequence(int N) {
string g,s;
g="AB";
long long ans=press(g);
if(ans==1)
{
g="A";
ans=press(g);
if(ans==1)
s="A";
else
s="B";
}
else
{
g="X";
ans=press(g);
if(ans==1)
s="X";
else
s="Y";
}
string a;
long long cur=0;
string chek="ABXY";
for(int i=0;i<(int)chek.size();i++)
{
if(s[0]!=chek[i])
{
a+=chek[i];
}
}
chek=a;
for(int i=1;i<N-1;i++)
{
string rn;
rn=s+chek[0];
for(int j=0;j<3;j++)
rn+=s+chek[1]+chek[j];
ans=press(rn);
if(ans==(long long)s.size())
{
s+=chek[2];
}
else if(ans==(long long)s.size()+1)
{
s+=chek[0];
}
else
{
s+=chek[1];
}
}
if(N!=1)
{
string rn=s+chek[0];
ans=press(rn);
if(ans==(long long)s.size()+1)
{
rn=s+chek[0];
}
else
{
rn=s+chek[1];
ans=press(rn);
if(ans==(long long)s.size()+1)
s+=chek[1];
else
s+=chek[2];
}
}
return s;
}
컴파일 시 표준 에러 (stderr) 메시지
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
