Submission #1185079

#TimeUsernameProblemLanguageResultExecution timeMemory
1185079nikaa123Combo (IOI18_combo)C++20
Compilation error
0 ms0 KiB
#include "combo.h"
#include <bits/stdc++.h>
#define pb push_back
using namespace std;

tring guess_sequence(int N) {
  
  int c;
  char v0;
  c = press("AB");
  if (c) {
    c = press("B");
    if (c) v0 = 'B'; else v0 = 'A';
  } else{
   c = press("X");
   if (c) {
    v0 = 'X'
   }  else {
    v0 = 'Y';
   }
  }
  vector <char> v;
  if (v0 != 'A') v.pb('A');
  if (v0 != 'B') v.pb('B');
  if (v0 != 'Y') v.pb('Y');
  if (v0 != 'X') v.pb('X');

  string S = ""+v0;

  for (int i = 2; i <= n-1; i++) {
    string NS = S+v[0]+v[0]+S+v[0]+v[1]+S+v[0]+v[2]+S+v[1];
    c = press(NS);
    if (c == i+1) {
      S = S + v[1];
    } else if (c == i+2) {
      S = S+ v[0];
    } else {
      S = S + v[2];
    }
  }

  return S;
}

Compilation message (stderr)

combo.cpp:6:1: error: 'tring' does not name a type
    6 | tring guess_sequence(int N) {
      | ^~~~~