Problem | goodseq |
---|---|
User | personjs |
Submission Time | 2025-01-14 16:35:50 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
goodseq.cpp: In function ‘int main()’:
goodseq.cpp:8:19: error: wrong number of template arguments (1, should be at least 2)
8 | unordered_map<int> cnt;
| ^
In file included from /usr/include/c++/9/unordered_map:47,
from goodseq.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
| ^~~~~~~~~~~~~
goodseq.cpp:12:11: error: request for member ‘count’ in ‘cnt’, which is of non-class type ‘int’
12 | if (cnt.count(x)) cnt[x]++;
| ^~~~~
goodseq.cpp:12:26: error: invalid types ‘int[long long int]’ for array subscript
12 | if (cnt.count(x)) cnt[x]++;
| ^
goodseq.cpp:13:13: error: invalid types ‘int[long long int]’ for array subscript
13 | else cnt[x] = 1;