제출 #118621

#제출 시각아이디문제언어결과실행 시간메모리
118621Autoratch콤보 (IOI18_combo)C++14
0 / 100
2 ms200 KiB
#include <bits/stdc++.h>
#include "combo.h"
using namespace std;
   
string guess_sequence(int n)
   {
       string all = "ABXY",pos,ans;
       for(int i = 0;i < 4;i++) if(!press(""+all[i])) pos+=all[i];
       for(int i = 1;i < n;i++)
       {
           string tmp = ans+pos[0];
           for(int j = 0;j < 3;j++) tmp+=ans+pos[1]+pos[j];
           int ret = press(tmp);
           if(ret==0) ans+=pos[2];
           else if(ret==i) ans+=pos[0];
           else ans+=pos[1];
       }
       return ans;
   }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...