# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
200025 | mohamedsobhi777 | 콤보 (IOI18_combo) | C++14 | 2 ms | 240 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "combo.h"
using namespace std;
std::string guess_sequence(int N) {
string ret = "";
string chs = "ABXY";
if( press("XY") )
{
if(press("X"))ret = "X" , chs = "ABY";
else ret = "Y" , chs = "ABX";
}
else
{
if(press("A"))ret = "A" , chs = "BXY";
else ret = "B" , chs ="AXY";
}
for(int i = 1;i<=N;i++)
{
bool ok = 0;
for(int j = 0;j<2;j++)
{
string ask = ret;
ask+=chs[j];
if( press( ask ) ==i+1 )
{
ret+=chs[j];
ok = 1;
break;
}
}
if(ret.size()==i)
ret+=chs[2];
}
return ret;
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |