Submission #298412

#TimeUsernameProblemLanguageResultExecution timeMemory
298412TangentSeats (IOI18_seats)C++17
Compilation error
0 ms0 KiB
#include <cstdio> #include <cstdlib> #include <vector> #include "seats.h" namespace { int read_int() { int x; if (scanf("%d", &x) != 1) { fprintf(stderr, "Error while reading input\n"); exit(1); } return x; } } // namespace int main() { int H = read_int(); int W = read_int(); int Q = read_int(); std::vector<int> R(H * W), C(H * W); for (int i = 0; i < H * W; ++i) { R[i] = read_int(); C[i] = read_int(); } std::vector<int> A(Q), B(Q); for (int j = 0; j < Q; ++j) { A[j] = read_int(); B[j] = read_int(); } give_initial_chart(H, W, R, C); for (int j = 0; j < Q; ++j) { int answer = swap_seats(A[j], B[j]); printf("%d\n", answer); } return 0; }

Compilation message (stderr)

/tmp/ccfKksVa.o: In function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'
/tmp/cchwdmgE.o:seats.cpp:(.text.startup+0x0): first defined here
/tmp/cchwdmgE.o: In function `main':
seats.cpp:(.text.startup+0x13c): undefined reference to `give_initial_chart(int, int, std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >)'
seats.cpp:(.text.startup+0x189): undefined reference to `swap_seats(int, int)'
/tmp/ccfKksVa.o: In function `main':
grader.cpp:(.text.startup+0x18c): undefined reference to `give_initial_chart(int, int, std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >)'
grader.cpp:(.text.startup+0x21b): undefined reference to `swap_seats(int, int)'
collect2: error: ld returned 1 exit status