제출 #897943

#제출 시각아이디문제언어결과실행 시간메모리
897943Muhammad_Aneeq게임 (IOI13_game)C++17
컴파일 에러
0 ms0 KiB
#include <numeric>
#include <map>
#include <algorithm>
using namespace std;
int r,c;
int const N=2000;
map<pair<int,int>,long long>d;
void init(int R, int C)
{
	r=R;
	c=C;
}
void update(int P, int Q, long long K)
{
	d[{P,Q}]=K;
}
long long calculate(int P, int Q, int U, int V)
{
	long long ans=0;
	for (auto i:d)
	{
		int x,y;
		tie(x,y)=i.first;
		if (x>=P&&x<=U&&y>=Q&&y<=V)
			ans=gcd(ans,i.second);
	}
	return ans;
}	

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

/usr/bin/ld: /tmp/ccGoSmgo.o: in function `main':
grader.c:(.text.startup+0x6b): undefined reference to `init'
/usr/bin/ld: grader.c:(.text.startup+0xd0): undefined reference to `calculate'
/usr/bin/ld: grader.c:(.text.startup+0x13e): undefined reference to `update'
collect2: error: ld returned 1 exit status