# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
641579 | Nursik | 콤보 (IOI18_combo) | C++14 | 51 ms | 464 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "combo.h"
#include <iostream>
#include <fstream>
#include <iomanip>
#include <vector>
#include <set>
#include <map>
#include <cstring>
#include <string>
#include <cmath>
#include <cassert>
#include <ctime>
#include <algorithm>
#include <sstream>
#include <list>
#include <queue>
#include <deque>
#include <stack>
#include <cstdlib>
#include <cstdio>
#include <iterator>
#include <functional>
#include <unordered_set>
#include <unordered_map>
#include <stdio.h>
#include <bitset>
using namespace std;
#define ll long long
const ll maxn = 2e3 + 1;
vector<char> v = {'A', 'B', 'X', 'Y'};
string guess_sequence(int n) {
string pref = "";
int get = press("AB");
if (get == 2){
pref += "AB";
}
else if (get == 1){
get = press("A");
if (get == 0){
pref += "B";
}
else{
pref += "A";
}
}
else{
get = press("XY");
if (get == 2){
pref += "XY";
}
else{
get = press("X");
if (get == 0){
pref += "Y";
}
else{
pref += "X";
}
}
}
for (int i = (int)pref.size(); i < n; ++i){
string a = pref + 'A' + pref + 'B';
get = press(a);
if (get == pref.size() + 1){
a = pref + 'A';
get = press(a);
if (get == pref.size() + 1)
pref += 'A';
else
pref += 'B';
}
else{
a = pref + 'X';
get = press(a);
if (get == pref.size() + 1)
pref += 'X';
else
pref += 'Y';
}
}
return pref;
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |