Submission #992143

#TimeUsernameProblemLanguageResultExecution timeMemory
992143spycoderytCombo (IOI18_combo)C++17
Compilation error
0 ms0 KiB
#include "combo.h"
#include <bits/stdc++.h>
using namespace std;
std::string guess_sequence(int N) {
  vector<char> v = {'A','B','X','Y'};
  string p = "",tmp;
  int cur=0;
  for(int i = 0;i<N;i++) {
    int ch = 0;
    for(int k = 0;k<4;k++) {
      tmp = p + v[k];
      int res = press(tmp);
      if(res>cur){
        cur = res;
        p = tmp;
        ch = 1;
        break;
      }
    }
    if(!ch)return p;
  }
  return S;
}

Compilation message (stderr)

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:22:10: error: 'S' was not declared in this scope
   22 |   return S;
      |          ^