Problem uniquenumbers_easy
User carson
Submission Time 2026-01-09 21:08:23
Score 0
Max Time N/A
Max Memory N/A

Compile Error

uniquenumbers_easy.cpp: In function ‘int main()’:
uniquenumbers_easy.cpp:13:40: error: no matching function for call to ‘unique(<unresolved overloaded function type>, std::vector<long long int>::iterator, std::vector<long long int>::iterator)’
13 | a.erase(unique(a.begin,a.end(),a.end()));
| ^
In file included from /usr/include/c++/9/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:65,
from uniquenumbers_easy.cpp:1:
/usr/include/c++/9/bits/stl_algo.h:1001:5: note: candidate: ‘template<class _FIter> _FIter std::unique(_FIter, _FIter)’
1001 | unique(_ForwardIterator __first, _ForwardIterator __last)
| ^~~~~~
/usr/include/c++/9/bits/stl_algo.h:1001:5: note: template argument deduction/substitution failed:
uniquenumbers_easy.cpp:13:40: note: candidate expects 2 arguments, 3 provided
13 | a.erase(unique(a.be