Problem xmas
User Priyankha13
Submission Time 2023-11-08 13:51:17
Score 0
Max Time N/A
Max Memory N/A

Compile Error

xmas.cpp:5:23: error: invalid declarator before ‘xmas’
5 | vector pair<int, int> xmas;
| ^~~~
xmas.cpp: In function ‘int main()’:
xmas.cpp:12:9: error: ‘xmas’ was not declared in this scope
12 | xmas.push_back(make_pair(i+1, x));
| ^~~~
xmas.cpp:15:10: error: ‘xmas’ was not declared in this scope
15 | sort(xmas.begin(), xmas.end(), [](pair<int, int> a, pair<int, int> b) {
| ^~~~
xmas.cpp: In lambda function:
xmas.cpp:16:19: error: expression cannot be used as a function
16 | return a.second() > b.second();
| ^
xmas.cpp:16:32: error: expression cannot be used as a function
16 | return a.second() > b.second();
| ^
xmas.cpp: In function ‘int main()’:
xmas.cpp:20:24: error: request for member ‘first’ in ‘j’, which is of non-class type ‘long long int’
20 |