Problem goodseq
User Dolphy
Submission Time 2024-01-16 14:47:15
Score 0
Max Time N/A
Max Memory N/A

Compile Error

goodseq.cpp: In function ‘int32_t main()’:
goodseq.cpp:8:10: error: wrong number of template arguments (1, should be at least 2)
8 | map <int> m;
| ^
In file included from /usr/include/c++/9/map:61,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:81,
from goodseq.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
| ^~~
goodseq.cpp:12:6: error: invalid types ‘int[long long int]’ for array subscript
12 | m[a]++;
| ^
goodseq.cpp:13:16: error: invalid types ‘int[long long int]’ for array subscript
13 | if (m[a]==a) count+=a;
| ^