제출 #529205

#제출 시각아이디문제언어결과실행 시간메모리
529205Devigo밀림 점프 (APIO21_jumps)C++14
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

int main()
{
	ios::sync_with_stdio(0);
	cin.tie(0);
	int n, q;
	cin >> n >> q;
	vector<int> h(n);
	for(int i=0; i<n; i++)
		cin >> h[i];
	while(q--)
	{
		int a,b, c, d;
		cin >> a >> b >> c >> d;
		if(d<a)
		{
			cout << "-1\n";
			continue;
		}
		int dis = c-b;
		cout << dis << "\n";
	}
	return 0;
}

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

/usr/bin/ld: /tmp/ccT9JfiT.o: in function `main':
stub.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/ccUxOhFT.o:jumps.cpp:(.text.startup+0x0): first defined here
/usr/bin/ld: /tmp/ccT9JfiT.o: in function `main':
stub.cpp:(.text.startup+0x177): undefined reference to `init(int, std::vector<int, std::allocator<int> >)'
/usr/bin/ld: stub.cpp:(.text.startup+0x1d1): undefined reference to `minimum_jumps(int, int, int, int)'
collect2: error: ld returned 1 exit status