답안 #520266

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
520266 2022-01-29T04:20:39 Z chinglam Lost in the cycle (IOI19_cycle) C++17
컴파일 오류
0 ms 0 KB
#include <bits/stdc++.h>
 
using namespace std;
 
#define vt vector
#define INF 0x3f3f3f3f
#define pb push_back
#define all(x) (x).begin(),(x).end()
#define rep(i,x) for(int (i) = 0;(i) < (x); (i)++)
#define MOD 1000000007
 
typedef vt<int> vi;
typedef long long ll;
typedef long double ld;
typedef pair<int,int> pii;
 
 
 
 
 
void escape(int n){
    int cur = 1;
    while(cur<n)cur*=2;
    cur>>=1;
    int bcadd = 0;
    while(cur!=0){
        if(!jump(cur+bcadd)){
            bcadd = n-cur;
        }else{
            bcadd = 0;
        }
        cur/=2;
    }
    if(bcadd!=0)jump(bcadd);
}

Compilation message

cycle.cpp: In function 'void escape(int)':
cycle.cpp:27:13: error: 'jump' was not declared in this scope
   27 |         if(!jump(cur+bcadd)){
      |             ^~~~
cycle.cpp:34:17: error: 'jump' was not declared in this scope
   34 |     if(bcadd!=0)jump(bcadd);
      |                 ^~~~