제출 #569855

#제출 시각아이디문제언어결과실행 시간메모리
569855Aurora2005Lost in the cycle (IOI19_cycle)C++14
컴파일 에러
0 ms0 KiB
#include<bits/stdc++.h>
#include"cycle.h"
using namespace std;

void escape(long long int n){
  long long int l=0,r=N;
  while(r-l != 1 && (l != N-1 || r != 0)){
    long long int L = l;
    long long int R = r;
    if(L > R) R += N;
    long long int M = (L+R)/2;
    long long int d = N-N/2-M;
    if(d < 0) d += N;
    if(jump(d)){
      l = M;
    }
    else{
      r = M;
    }
  }
  jump(N-l);
}

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

cycle.cpp: In function 'void escape(long long int)':
cycle.cpp:6:23: error: 'N' was not declared in this scope
    6 |   long long int l=0,r=N;
      |                       ^