제출 #971160

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
9711602024-04-28 05:21:45dubabuba밀림 점프 (APIO21_jumps)C++14
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h>
#include "jumps.h"
using namespace std;
template<typename T> void ono_min(T &MIN, T CMP) { if(MIN > CMP) MIN = CMP; }
template<typename T> void ono_max(T &MAX, T CMP) { if(MAX < CMP) MAX = CMP; }
typedef pair<int, int> pii;
#define ff first
#define ss second
#define MP make_pair
const int mxk = 25;
const int mxn = 2e5 + 10;
int L[mxn], R[mxn], n;
vector<int> adj[mxn];
int dis[mxn], h[mxn];
int mx[mxk][mxn];
int mn[mxk][mxn];
bool mx_valid(int k, int i) { return 1 <= mx[k][i] && mx[k][i] <= n; }
bool mn_valid(int k, int i) { return 1 <= mn[k][i] && mn[k][i] <= n; }
void init(int N, vector<int> H) {
memset(L, -1, sizeof L);
memset(R, -1, sizeof R);
n = N;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

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

jumps.cpp: In function 'void init(int, std::vector<int>)':
jumps.cpp:72:42: error: 'j' was not declared in this scope
   72 |   if(1 <= mxj && mxj <= n) mx[k][i] = mx[j - 1][mxj];
      |                                          ^
jumps.cpp: In function 'int minimum_jumps(int, int, int, int)':
jumps.cpp:80:5: error: 'H' was not declared in this scope
   80 |  if(H[A] > H[C]) return -1;
      |     ^