제출 #778627

#제출 시각아이디문제언어결과실행 시간메모리
778627Silence콤보 (IOI18_combo)C++17
0 / 100
1 ms208 KiB
#include "combo.h" #include <bits/stdc++.h> using namespace std; std::string guess_sequence(int N) { string s; string ans; auto first_subtask = [&](int n){ string cur = "ABXY"; 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){ s+=cur[j]; } } ans = t; break; } } do{ if (press(s) == 3){ ans+=s; break; } }while(next_permutation(s.begin(),s.end())); return ans; }; return first_subtask(N); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...