답안 #1090441

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1090441 2024-09-18T11:13:59 Z vjudge1 게임 (IOI13_game) C++17
컴파일 오류
0 ms 0 KB
#include <bits/stdc++.h>

using namespace std;

long long nzd(long long a, long long b) {
    if (b==0) return a;
    return nzd(b, a%b);
}

vector<vector<long long> > mat;

void init(int r, int c) {
    mat.resize(r, vector<long long> (c, 0)); 
} 

void update(int r, int c, long long br) {
    mat[r][c]=br;
}

long long calculate(int x1, int y1, int x2, int y2) {
    long long rez=mat[x1][y1];
    for (int i=x1;i<=x2;i++)
        for (int j=y1;j<=y2;j++)
            rez=nzd(rez, mat[i][j]);
    return rez;
}

Compilation message

/usr/bin/ld: /tmp/ccZJMGil.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