제출 #95728

#제출 시각아이디문제언어결과실행 시간메모리
95728helloworldworld콤보 (IOI18_combo)C++14
30 / 100
65 ms420 KiB
#include <bits/stdc++.h> #include "combo.h" using namespace std; string guess_sequence(int n) { char arr[4]; char arr1[3]; int a,cur; arr[0]='A'; arr[1]='B'; arr[2]='X'; arr[3]='Y'; string p=""; for(int j=0;j<4;j++){ if(j==3){ a=3; p+=arr[3]; break; } if(press(p+arr[j])==1){ a=j; p+=arr[j]; break; } } cur=0; for(int i=0;i<4;i++){ if(a!=i){ arr1[cur]=arr[i]; cur++; } } for(int i=1;i<n;i++) { for(int j=0;j<3;j++){ if(j==2){ p+=arr1[2]; break; } if(press(p+arr1[j])==i+1){ p+=arr1[j]; break; } } } return p; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...