| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 393684 | phathnv | Combo (IOI18_combo) | C++11 | 2 ms | 276 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
#include "combo.h"
using namespace std;
string guess_sequence(int n) {
char c[4] = {'A', 'B', 'X', 'Y'};
int l = 0, r = 3;
while (l < r){
int mid = (l + r) >> 1;
string tmp;
for(int i = l; i <= mid; i++)
tmp.push_back(c[i]);
if (press(tmp) > 0)
r = mid;
else
l = mid + 1;
}
swap(c[3], c[l]);
string s;
s.push_back(c[3]);
while (s.size() < n - 1){
string q = s + c[1] + s + c[2] + c[0] + s + c[2] + c[1] + s + c[2] + c[2];
s += c[press(q) - s.size()];
}
if (press(s + c[0]) == n)
s += c[0];
else if (press(s + c[1]) == n)
s += c[1];
else
s += c[2];
return s;
}
컴파일 시 표준 에러 (stderr) 메시지
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
