제출 #761205

#제출 시각아이디문제언어결과실행 시간메모리
761205JANCARAPAN콤보 (IOI18_combo)C++17
컴파일 에러
0 ms0 KiB
  #include "combo.h"
  #include <bits/stdc++.h>
  using namespace std;  
  #define ll long long
  #define fi first
  #define se second
  #define sz(a) (long long) a.size()
  #define endl '\n'
   
  #define dbg(a) cerr << #a << " = " << a << endl;
  #define print(a) for (auto x : a) cerr << x << " "; cerr << endl;
   
  const long long INF = 1e18, MOD = 1e9+7; 
   
   
  string guess_sequence(int n) {
    string s = "";
    vector<string> a = {"A", "B", "X", "Y"};
    
    int it = 0;
    if (press("AB")) {
      if (press("A")) it = 0;
      else it = 1;
    }
    else {`
      if (press("X")) it = 2;
      else it = 3;
    }
    
    s += a[it];
    
    if (n == 1) return s;
    
    int x = (it + 1) % 4, y = (it + 2) % 4, z = (it + 3) % 4;
    
    for (int i = 1; i < n - 1; i++) {
      int ans = press(s+a[x]+a[y] + s+a[x]+a[z] + s+a[x]+a[x] + s+a[y]);
      if (ans == i + 2) {
        s += a[x];
      } 
      else if (ans == i + 1) {
        s += a[y];
      }
      else {
        s += a[z];
      }
    }
    
    if (press(s + a[x]) == n) it = x;
    else if (press(s + a[y]) == n) it = y;
    else it = z;
    
    s += a[it];
    
    return s;
  }

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

combo.cpp:25:11: error: stray '`' in program
   25 |     else {`
      |           ^