제출 #1034937

#제출 시각아이디문제언어결과실행 시간메모리
1034937ten_xd콤보 (IOI18_combo)C++17
30 / 100
27 ms860 KiB
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
#define rep(a,b) for(int a = 0; a < (b); ++a)
#define all(t) t.begin(), t.end()
#define pb push_back

const int INF = 2e9+54321;
const ll INF_L = (ll)2e18+54321;

#include "combo.h"

string guess_sequence(int N)
{
  string wyn;
  vector<string> zap;
  if(press("A") == 1) wyn.pb('A'), zap = {"B","X","Y"};
  else if(press("B") == 1) wyn.pb('B'), zap = {"A","X","Y"};
  else if(press("X") == 1) wyn.pb('X'), zap = {"A","B","Y"};
  else wyn.pb('Y'), zap = {"A","B","X"};

  for(int i = 2; i <= N; ++i)
  {
    if(press(wyn+zap[0]) == i) wyn += zap[0];
    else if(press(wyn+zap[1]) == i) wyn += zap[1];
    else wyn += zap[2];
  }

 
  return wyn;
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...