Problem democracy
User abigail
Submission Time 2024-06-21 15:49:49
Score 0
Max Time N/A
Max Memory N/A

Compile Error

democracy.cpp: In function ‘int main()’:
democracy.cpp:4:3: error: ‘cin’ was not declared in this scope
4 | cin >> N;
| ^~~
democracy.cpp:6:3: error: ‘pair’ was not declared in this scope
6 | pair<int, int> votes[3]; // 7,6,5
| ^~~~
democracy.cpp:6:8: error: expected primary-expression before ‘int’
6 | pair<int, int> votes[3]; // 7,6,5
| ^~~
democracy.cpp:11:9: error: ‘votes’ was not declared in this scope
11 | votes[2].first += 1;
| ^~~~~
democracy.cpp:13:9: error: ‘votes’ was not declared in this scope
13 | votes[1].first += 1;
| ^~~~~
democracy.cpp:15:9: error: ‘votes’ was not declared in this scope
15 | votes[0].first += 1;
| ^~~~~
democracy.cpp:18:8: error: ‘votes’ was not declared in this scope
18 | sort(votes, votes + N, greater<>());
| ^~~~~
democracy.