Problem gotoschool
User DaPeter
Submission Time 2025-12-06 12:25:18
Score 0
Max Time N/A
Max Memory N/A

Compile Error

gotoschool.cpp: In function ‘bool cmp(long long int, long long int)’:
gotoschool.cpp:7:14: error: request for member ‘second’ in ‘a’, which is of non-class type ‘long long int’
7 | return a.second<b.second;
| ^~~~~~
gotoschool.cpp:7:23: error: request for member ‘second’ in ‘b’, which is of non-class type ‘long long int’
7 | return a.second<b.second;
| ^~~~~~
gotoschool.cpp: In function ‘int main()’:
gotoschool.cpp:16:17: error: no match for ‘operator+’ (operand types are ‘std::vector<std::pair<long long int, long long int> >’ and ‘long long int’)
16 | sort(arr,arr+n,cmp);
| ~~~^~
| | |
| | long long int
| std::vector<std::pair<long long int, long long int> >
In file included from /usr/include/c++/9/bits/stl_algobase.h:67,
from /usr/include/c++/9/b