Problem xmas
User Henries
Submission Time 2024-10-01 13:18:28
Score 0
Max Time N/A
Max Memory N/A

Compile Error

xmas.cpp: In function ‘int main()’:
xmas.cpp:13:35: error: no match for ‘operator+’ (operand types are ‘std::vector<long long int>::iterator’ {aka ‘__gnu_cxx::__normal_iterator<long long int*, std::vector<long long int> >’} and ‘__gnu_cxx::__normal_iterator<long long int*, std::vector<long long int> >’)
13 | auto index = distance(v.begin() + it);
| ~~~~~~~~~ ^ ~~
| | |
| | __normal_iterator<[...],[...]>
| __normal_iterator<[...],[...]>
In file included from /usr/include/c++/9/bits/stl_algobase.h:67,
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 xmas.cpp:1:
/usr/include/c++/9/bits/stl_iterator.h:856