Problem ballot
User louisleehi
Submission Time 2022-12-23 11:07:08
Score 0
Max Time N/A
Max Memory N/A

Compile Error

ballot.cpp:19:5: error: conflicting declaration ‘int M [100005]’
19 | int M[MAXN];
| ^
ballot.cpp:18:7: note: previous declaration as ‘int M’
18 | int N,M;
| ^
ballot.cpp:7:20: error: expected unqualified-id before ‘for’
7 | #define FOR(i,a,b) for(int i=(a);i<=(b);i++)
| ^~~
ballot.cpp:20:1: note: in expansion of macro ‘FOR’
20 | FOR(i,1,N)M[A[i]]=i;
| ^~~
ballot.cpp:20:5: error: ‘i’ does not name a type
20 | FOR(i,1,N)M[A[i]]=i;
| ^
ballot.cpp:7:34: note: in definition of macro ‘FOR’
7 | #define FOR(i,a,b) for(int i=(a);i<=(b);i++)
| ^
ballot.cpp:20:5: error: ‘i’ does not name a type
20 | FOR(i,1,N)M[A[i]]=i;
| ^
ballot.cpp:7:41: note: in definition of macro ‘FOR’
7 | #define FOR(i,a,b) for(int i=(a);i<=(b);i++)
| ^
ballot.