Problem | carpark |
---|---|
User | oiu890 |
Submission Time | 2024-03-24 17:24:27 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
carpark.cpp: In function ‘int main()’:
carpark.cpp:16:7: error: conflicting declaration ‘auto s’
16 | auto s = find(cars.begin(),cars.end(),1);
| ^
carpark.cpp:5:11: note: previous declaration as ‘int s’
5 | int n,s;
| ^
carpark.cpp:18:40: error: no matching function for call to ‘distance(std::vector<int>::iterator, int&)’
18 | int start = distance(cars.begin(),s);
| ^
In file included from /usr/include/c++/9/bits/stl_algobase.h:66,
from /usr/include/c++/9/bits/specfun.h:45,
from /usr/include/c++/9/cmath:1927,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:41,
from carpark.cpp:1:
/usr/include/c++/9/bits/stl_iterator_base_funcs.h:138:5: note: candidate: ‘template<class _InputIterator> constexpr typename std::iterator_traits<_Iterator>::difference_type std::dis