Problem | democracy |
---|---|
User | Aryankcode2024 |
Submission Time | 2024-06-21 13:00:47 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
democracy.cpp: In function ‘int main()’:
democracy.cpp:8:33: error: wrong number of template arguments (1, should be at least 2)
8 | std::unordered_map<long long> votes;
| ^
In file included from /usr/include/c++/9/unordered_map:47,
from democracy.cpp:2:
/usr/include/c++/9/bits/unordered_map.h:102:11: note: provided for ‘template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc> class std::unordered_map’
102 | class unordered_map
| ^~~~~~~~~~~~~
democracy.cpp:14:19: error: invalid types ‘int[int]’ for array subscript
14 | votes[vote]++;
| ^
democracy.cpp:15:23: error: invalid types ‘int[int]’ for array subscript
15 | if (votes[vote] > maxCount || (votes[vote] == maxCount && vote > maxVote)) {
| ^
democracy.cpp:15:50: error: invalid types ‘int[int]’ for ar