| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1014483 | nisanduu | Combo (IOI18_combo) | C++14 | 0 ms | 344 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "combo.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
string guess_sequence(int n){
vector<char> av;
for(ll i=0;i<26;i++){
char x = ('a'+i);
string tmp = to_string(x);
if(press(tmp)==1){
av.push_back(x);
}
}
if(av.size()==1){
string f = "";
for(ll i=0;i<3;i++){
f+=av[0];
}
return f;
}else if(av.size()==1){
string f1 = "",f2 = "";
f1 += av[0];
f1 += av[0];
f1 += av[1];
f2 += av[0];
f2 += av[1];
f2 += av[1];
sort(f1.begin(),f1.end());
sort(f2.begin(),f2.end());
do{
if(press(f1)==3){
return f1;
}
}while(next_permutation(f1.begin(),f1.end()));
do{
if(press(f2)==3){
return f2;
}
}while(next_permutation(f2.begin(),f2.end()));
}else{
string f1 = "";
f1 += av[0];
f1 += av[1];
f1 += av[2];
sort(f1.begin(),f1.end());
do{
if(press(f1)==3){
return f1;
}
}while(next_permutation(f1.begin(),f1.end()));
}
}
// int main()
// {
// guess_sequence(4);
// return 0;
// }컴파일 시 표준 에러 (stderr) 메시지
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
