Problem gotoschool_ex
User lykieutrang
Submission Time 2025-08-04 21:52:58
Score 0
Max Time N/A
Max Memory N/A

Compile Error

gotoschool_ex.cpp: In function ‘int main()’:
gotoschool_ex.cpp:9:24: error: template argument 1 is invalid
9 | vector<pair<<int, int>> A(N);
| ^~
gotoschool_ex.cpp:9:24: error: template argument 2 is invalid
gotoschool_ex.cpp:12:21: error: invalid types ‘int[int]’ for array subscript
12 | scanf("%d", &A[i].first);
| ^
gotoschool_ex.cpp:13:8: error: invalid types ‘int[int]’ for array subscript
13 | A[i].second = i + 1; // +1 vì i bắt đầu từ 0, còn order bắt đầu từ 1
| ^
gotoschool_ex.cpp:15:10: error: request for member ‘begin’ in ‘A’, which is of non-class type ‘int’
15 | sort(A.begin(), A.end()); // Sort according to A[i].first, a.k.a the student's number
| ^~~~~
gotoschool_ex.cpp:15:21: error: request for member ‘end’ in ‘A’, which is of non-class type ‘int’
15 | sort(A.begin(), A.end()); // Sort according to A[i]