Submission #938440

# Submission time Handle Problem Language Result Execution time Memory
938440 2024-03-05T06:36:21 Z Ghulam_Junaid Cop and Robber (BOI14_coprobber) C++17
Compilation error
0 ms 0 KB
#include <bits/stdc++.h>
using namespace std;

#define MAX_N 500

// modify the following functions
// you can define global variables and functions

int start(int N, bool A[MAX_N][MAX_N]) {
    return 0;
}

int nextMove(int R) {
    return R;
}

// don't modify the main function
int main() {
    int N;
    cin >> N;
    bool A[MAX_N][MAX_N];
    for (int i = 0; i < N; i++) {
        for (int j = 0; j < N; j++) {
            cin >> A[i][j];
        }
    }
    int P = start(N,A);
    cout << P << endl;
    int R;
    cin >> R;
    while (true) {
        if (P == R) break;
        P = nextMove(R);
        cout << P << endl;
        if (P == R) break;
        cin >> R;
    }
}

Compilation message

/usr/bin/ld: /tmp/ccbWEGtV.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/ccqolJwT.o:coprobber.cpp:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status