제출 #569029

#제출 시각아이디문제언어결과실행 시간메모리
569029kikokiRainforest Jumps (APIO21_jumps)C++17
컴파일 에러
0 ms0 KiB
#include "jumps.h"
#include <bits/stdc++.h>

using namespace std;

int n;
vector <int> a;

void init(int N, vector<int> H)
{
	n = N;
	a = H;
}

int minimum_jumps(int A, int B, int C, int D) 
{
	if (b < c)
	{
		return c - b;
	}
	else
	{
		return -1;
	}
}

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

jumps.cpp: In function 'int minimum_jumps(int, int, int, int)':
jumps.cpp:17:6: error: 'b' was not declared in this scope
   17 |  if (b < c)
      |      ^
jumps.cpp:17:10: error: 'c' was not declared in this scope
   17 |  if (b < c)
      |          ^