| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 986827 | Tsagana | 콤보 (IOI18_combo) | C++14 | 0 ms | 0 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "combo.h"
#include<bits/stdc++.h>
#define all(x) x.begin(), x.end()
#define pq priority_queue
#define lb lower_bound
#define ub upper_bound
#define pb push_back
#define eb emplace_back
#define F first
#define S second
using namespace std;
char ch(char c) {
if (c == 'A') return 'B';
if (c == 'B') return 'X';
if (c == 'X') return 'Y';
if (c == 'Y') return 'A';
}
string guess_sequence(int N) {
string p = "";
string s = "";
int leng = 0;
int coin = 0;
char c = 'A';
while (leng < N) {
p = s;
for (int i = leng; i < N; i++) {
p += c;
}
coin = press(p);
if (coin > leng) for (; leng < coin; lenf++) s += c;
else c = ch(c);
}
return S;
}
