| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 470005 | AdamGS | 콤보 (IOI18_combo) | C++14 | 1 ms | 200 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "combo.h"
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
#define rep(a, b) for(int a = 0; a < (b); ++a)
#define st first
#define nd second
#define pb push_back
#define all(a) a.begin(), a.end()
string guess_sequence(int n) {
string c[]={"A", "B", "X", "Y"};
if(!press(c[0]+c[1])) {
swap(c[0], c[2]);
swap(c[1], c[3]);
}
if(!press(c[0])) swap(c[0], c[1]);
string ans=c[0];
for(int i=1; i<n-1; ++i) {
int x=press(ans+c[1]+ans+c[2]+c[1]+ans+c[2]+c[2]+ans+c[2]+c[3]);
if(x==ans.size()) {
ans+=c[3];
} else if(x==ans.size()+1) {
ans+=c[1];
} else {
ans+=c[2];
}
}
if(press(ans+c[1])==n) {
ans+=c[1];
} else if(press(ans+c[2])==n) {
ans+=c[2];
} else {
ans+=c[3];
}
return ans;
}
컴파일 시 표준 에러 (stderr) 메시지
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
