Problem photo
User ilikeeggs
Submission Time 2026-01-21 09:30:20
Score 0
Max Time N/A
Max Memory N/A

Compile Error

photo.cpp: In function ‘int32_t main()’:
photo.cpp:16:9: error: wrong number of template arguments (1, should be at least 2)
16 | map<int> count;
| ^
In file included from /usr/include/c++/9/map:61,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:81,
from photo.cpp:1:
/usr/include/c++/9/bits/stl_map.h:100:11: note: provided for ‘template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map’
100 | class map
| ^~~
photo.cpp:21:23: error: invalid types ‘int[long long int]’ for array subscript
21 | count[v[r].second]++;
| ^
photo.cpp:22:26: error: invalid types ‘int[long long int]’ for array subscript
22 | if(count[v[r].second] == 1){
| ^
photo.cpp:28:27: error: invalid types ‘int[long long int]’ for array subscript
28 | count[v[l].second]--;