Problem paint
User wtnetlegend
Submission Time 2025-02-25 15:45:24
Score 0
Max Time N/A
Max Memory N/A

Compile Error

paint.cpp: In function ‘int main()’:
paint.cpp:6:27: error: template argument 1 is invalid
6 | vector <pair<int, int> p > v;
| ^
paint.cpp:6:27: error: template argument 2 is invalid
paint.cpp:10:5: error: request for member ‘push_back’ in ‘v’, which is of non-class type ‘int’
10 | v.push_back p;
| ^~~~~~~~~
paint.cpp:12:73: error: a function-definition is not allowed here before ‘{’ token
12 | bool compareBySecond(const pair<int, int>& a, const pair<int, int>& b) {
| ^
paint.cpp:15:10: error: request for member ‘begin’ in ‘v’, which is of non-class type ‘int’
15 | sort (v.begin(), v.end(), compareBySecond);
| ^~~~~
paint.cpp:15:21: error: request for member ‘end’ in ‘v’, which is of non-class type ‘int’
15 | sort (v.begin(), v.end(), compareBySecond);
|