Problem ballgame
User ethanlinHoucheng
Submission Time 2025-12-17 13:52:00
Score 0
Max Time N/A
Max Memory N/A

Compile Error

ballgame.cpp:7:1: error: ‘pair’ does not name a type
7 | pair<int,int> heights[mxN], pos[mxN];
| ^~~~
ballgame.cpp: In function ‘int ballgame(int, int, int, int*, int*)’:
ballgame.cpp:23:9: error: ‘heights’ was not declared in this scope
23 | heights[i].first = H[i];
| ^~~~~~~
ballgame.cpp:25:9: error: ‘pos’ was not declared in this scope; did you mean ‘pow’?
25 | pos[i].first = C[i];
| ^~~
| pow
ballgame.cpp:29:10: error: ‘heights’ was not declared in this scope
29 | sort(heights,heights+N,greater<pair<int,int>>());
| ^~~~~~~
ballgame.cpp:29:28: error: ‘greater’ was not declared in this scope; did you mean ‘std::greater’?
29 | sort(heights,heights+N,greater<pair<int,int>>());
| ^~~~~~~
| std::greater
In file included from /usr/include/c