Submission #118641

# Submission time Handle Problem Language Result Execution time Memory
118641 2019-06-19T10:08:14 Z Autoratch Combo (IOI18_combo) C++14
0 / 100
2 ms 220 KB
#include <bits/stdc++.h>
 #include "combo.h"
 using namespace std;
 /*
 int press(string s)
 {
     cout << s;
     int x;
     cin >> x;
     return x;
 }
 */
 string guess_sequence(int n)
 {
     string all = "ABXY",pos,ans;
     if(!press("A")) pos+="A"; else ans = "A";
     if(!press("B")) pos+="B"; else ans = "B";
     if(!press("X")) pos+="X"; else ans = "X";
     if(!press("Y")) pos+="Y"; else ans = "Y";
     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+1) ans+=pos[0];
         else ans+=pos[1];
     } 
     return ans;
 }
 
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 200 KB Wrong Answer: invalid press
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Partially correct 1 ms 200 KB Output is partially correct
2 Partially correct 1 ms 200 KB Output is partially correct
3 Partially correct 2 ms 200 KB Output is partially correct
4 Partially correct 1 ms 220 KB Output is partially correct
5 Incorrect 2 ms 200 KB Wrong Answer: invalid press
6 Halted 0 ms 0 KB -