Submission #302084

#TimeUsernameProblemLanguageResultExecution timeMemory
302084MolukhyyehCombo (IOI18_combo)C++14
5 / 100
1 ms232 KiB
#include "combo.h" #include <bits/stdc++.h> using namespace std; string guess_sequence(int N) { string S = ""; char p[] = {'A', 'B', 'X', 'Y'}; if(N == 3){ for(int i = 0; i<4; ++i){ S = "A"; S += p[i]; string tmp = S; for(int j = 0; j<4; ++j){ S += p[j]; if(press(S) == 3)return S; S = tmp; } } for(int i = 0; i<4; ++i){ S = "B"; S += p[i]; string tmp = S; for(int j = 0; j<4; ++j){ S += p[j]; if(press(S) == 3)return S; S = tmp; } } for(int i = 0; i<4; ++i){ S = "X"; S += p[i]; string tmp = S; for(int j = 0; j<4; ++j){ S += p[j]; if(press(S) == 3)return S; S = tmp; } } for(int i = 0; i<4; ++i){ S = "Y"; S += p[i]; string tmp = S; for(int j = 0; j<4; ++j){ S += p[j]; if(press(S) == 3)return S; S = tmp; } } } return S; } //ABXY // ABX , ABY , AXY, BXY
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...