Problem swords
User nutzzzz
Submission Time 2025-01-21 21:18:15
Score 0
Max Time N/A
Max Memory N/A

Compile Error

swords.cpp: In function ‘int main()’:
swords.cpp:30:17: error: expected ‘;’ before ‘int’
30 | sort(a, a+n)
| ^
| ;
31 | int max_second = a[n-1].second;
| ~~~
swords.cpp:33:7: error: ‘p’ was not declared in this scope
33 | if (p.second > max_second) {
| ^
swords.cpp:33:18: error: ‘max_second’ was not declared in this scope
33 | if (p.second > max_second) {
| ^~~~~~~~~~
swords.cpp:35:13: error: ‘ans’ was not declared in this scope; did you mean ‘abs’?
35 | ans++;
| ^~~
| abs
swords.cpp:38:13: error: ‘ans’ was not declared in this scope; did you mean ‘abs’?
38 | cout << ans;
| ^~~
| abs