제출 #897991

#제출 시각아이디문제언어결과실행 시간메모리
897991UmairAhmadMirza게임 (IOI13_game)C++17
컴파일 에러
0 ms0 KiB
#pragma once #include <bits/stdc++.h> using namespace std; set<pair<int,int>> v; long long grid[105][100005]; void init(int R, int C){ } void update(int P, int Q, long long K){ v.insert({P,Q}); grid[P][Q]=K; } long long calculate(int P, int Q, int U, int V){ long long ans=0; for (auto i:v) { int r=i.first; int c=i.second; if(P<=r&&r<=U&&Q<=c&&c<=V) ans=__gcd(grid[r][c],ans); } return ans; }

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

game.cpp:1:9: warning: #pragma once in main file
    1 | #pragma once
      |         ^~~~
/usr/bin/ld: /tmp/ccsW6ojO.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