seats.cpp: In function 'int {anonymous}::read_int()':
seats.cpp:5:7: error: 'scanf' was not declared in this scope
5 | if (scanf("%d", &x) != 1) {
| ^~~~~
seats.cpp:6:13: error: 'stderr' was not declared in this scope
6 | fprintf(stderr, "Error while reading input\n");
| ^~~~~~
seats.cpp:1:1: note: 'stderr' is defined in header '<cstdio>'; did you forget to '#include <cstdio>'?
+++ |+#include <cstdio>
1 | namespace {
seats.cpp:6:5: error: 'fprintf' was not declared in this scope
6 | fprintf(stderr, "Error while reading input\n");
| ^~~~~~~
seats.cpp:7:5: error: 'exit' was not declared in this scope
7 | exit(1);
| ^~~~
seats.cpp: In function 'int main()':
seats.cpp:18:8: error: 'vector' is not a member of 'std'
18 | std::vector<int> R(H * W), C(H * W);
| ^~~~~~
seats.cpp:1:1: note: 'std::vector' is defined in header '<vector>'; did you forget to '#include <vector>'?
+++ |+#include <vector>
1 | namespace {
seats.cpp:18:15: error: expected primary-expression before 'int'
18 | std::vector<int> R(H * W), C(H * W);
| ^~~
seats.cpp:20:5: error: 'R' was not declared in this scope
20 | R[i] = read_int();
| ^
seats.cpp:21:5: error: 'C' was not declared in this scope
21 | C[i] = read_int();
| ^
seats.cpp:23:8: error: 'vector' is not a member of 'std'
23 | std::vector<int> A(Q), B(Q);
| ^~~~~~
seats.cpp:23:8: note: 'std::vector' is defined in header '<vector>'; did you forget to '#include <vector>'?
seats.cpp:23:15: error: expected primary-expression before 'int'
23 | std::vector<int> A(Q), B(Q);
| ^~~
seats.cpp:25:5: error: 'A' was not declared in this scope
25 | A[j] = read_int();
| ^
seats.cpp:26:5: error: 'B' was not declared in this scope
26 | B[j] = read_int();
| ^
seats.cpp:29:28: error: 'R' was not declared in this scope
29 | give_initial_chart(H, W, R, C);
| ^
seats.cpp:29:31: error: 'C' was not declared in this scope
29 | give_initial_chart(H, W, R, C);
| ^
seats.cpp:29:3: error: 'give_initial_chart' was not declared in this scope
29 | give_initial_chart(H, W, R, C);
| ^~~~~~~~~~~~~~~~~~
seats.cpp:31:29: error: 'A' was not declared in this scope
31 | int answer = swap_seats(A[j], B[j]);
| ^
seats.cpp:31:35: error: 'B' was not declared in this scope
31 | int answer = swap_seats(A[j], B[j]);
| ^
seats.cpp:31:18: error: 'swap_seats' was not declared in this scope
31 | int answer = swap_seats(A[j], B[j]);
| ^~~~~~~~~~
seats.cpp:32:5: error: 'printf' was not declared in this scope
32 | printf("%d\n", answer);
| ^~~~~~
seats.cpp:32:5: note: 'printf' is defined in header '<cstdio>'; did you forget to '#include <cstdio>'?