# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
375251 | 2021-03-09T05:29:03 Z | Edbert2397 | 콤보 (IOI18_combo) | C++14 | 1 ms | 200 KB |
#include "combo.h" #include<bits/stdc++.h> using namespace std; std::string guess_sequence(int N) { std::string p = ""; char s[4] = {'A','B','X','Y'}; do{ for(int i = 0;i<4;i++){ p += s[i]; } int coins = press(p); if(coins == N){ string ans = ""; for(int i = 0;i<3;i++){ ans += s[i]; } int coins = press(ans); if(coins == N) { return ans; } else{ ans = ""; for(int i = 1;i<4;i++){ ans += s[i]; } return ans; } } }while(next_permutation(s,s + 4)); }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 200 KB | Wrong Answer: invalid press |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 200 KB | Wrong Answer: wrong guess. |
2 | Halted | 0 ms | 0 KB | - |