Submission #301647

#TimeUsernameProblemLanguageResultExecution timeMemory
301647DovranCombo (IOI18_combo)C++11
0 / 100
1 ms200 KiB
#include <bits/stdc++.h> #include "combo.h" #define N 100009 #define pii pair <int, int> #define ff first #define sz() size() #define ss second #define pb push_back #define ll long long using namespace std; char c[5]={'X', 'Y', 'A', 'B'}; string guess_sequence(int n){ string s; s+='X'; int in=-1; for(int i=0; i<3; i++){ s[0]=c[i]; int x=press(s); if(x){ in=i; break; } } if(in<0) in=3; s[0]=c[in]; swap(c[in], c[3]); for(int i=1; i<n; i++){ s+='X'; in=0; for(int j=0; j<2; j++){ s[i]=c[j]; int x=press(s); if(x==i){ in=1; break; } } if(!in) s[i]=c[2]; } return s; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...