제출 #1191842

#제출 시각아이디문제언어결과실행 시간메모리
1191842p4r4d0_x콤보 (IOI18_combo)C++20
컴파일 에러
0 ms0 KiB
#include "combo.h"
#include<bits/stdc++.h>
using namespace std;

string guess_sequence(int N) {
  vector<char> a = {'A', 'B', 'X', 'Y'};
  string s = "";
  for(int i = 0; i < 4; ++i){
      s += a[i];
      if(press(s) == 1){
          break;
      }
      else s = "";
  }
  string st = "";
  for(int i = 0; i < 4; ++i){
      st = s;
      st += a[i];
      if(press(st) == 2){
          s = st;
          break;
      }
  }
  for(int i = 0; i < 4; ++i){
      st = s;
      st += a[i];
      if(press(st) == 3){
          s = st;
          break;
      }
  }
  return S;
}

컴파일 시 표준 에러 (stderr) 메시지

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