# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
778650 | Silence | 콤보 (IOI18_combo) | C++17 | 1 ms | 220 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "combo.h"
#include <bits/stdc++.h>
using namespace std;
std::string guess_sequence(int N) {
string s;
string ans;
auto third_subtask = [&](int n){
string cur = "ABXY";
string s;
string ans;
for (int i = 0;i<4;++i){
string t;
t+=cur[i];
if (press(t) == 1){
for (int j = 0;j<4;++j){
if (i == j)continue;
s+=cur[j];
}
ans+=cur[i];
break;
}
}
//n + 1 + n + 2
for (int i = 0;i<n - 2;++i){
string p = ans;
p+=s[0];
string t = ans;
t+=s[1];
for (int j = 0;j<3;++j){
t+=s[j];
p+=t;
t.pop_back();
}
if (press(p) == ans.length() + 1){
ans+=s[0];
}
else if (press(p) == ans.length()){
ans+=s[2];
}
else{
ans+=s[1];
}
}
for (int i = 0;i<3;++i){
string p = ans;
p+=s[i];
if (press(p) == n){
return p;
}
}
return ans;
};
string v = third_subtask(N);
//cout<<v<<'\n';
return v;
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |