Submission #208561

#TimeUsernameProblemLanguageResultExecution timeMemory
208561huzaifa242Combo (IOI18_combo)C++14
10 / 100
70 ms544 KiB
#include "combo.h" #include<bits/stdc++.h> using namespace std; string guess_sequence(int n){ vector<char> a={'A','B','X','Y'}; string s=""; int i,j; for(i=1;i<=n;i++){ for(j=0;j<4;j++){ s.push_back(a[j]); if(press(s)==i) break; s.pop_back(); } if(i==1){ for(j=0;j<4;j++){ if(a[j]==s[i-1]){ swap(a[j],a[3]); a.pop_back(); break; } } } } return s; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...