Problem horses
User chenweilian
Submission Time 2024-12-24 22:31:50
Score 0
Max Time N/A
Max Memory N/A

Compile Error

horses.cpp: In function ‘int init(int, int*, int*)’:
horses.cpp:99:17: error: no match for ‘operator=’ (operand types are ‘vll’ {aka ‘std::vector<long long int>’} and ‘vi’ {aka ‘std::vector<int>’})
99 | X = Y = vi(n);
| ^
In file included from /usr/include/c++/9/vector:72,
from /usr/include/c++/9/functional:62,
from /usr/include/c++/9/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/9/algorithm:71,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:65,
from horses.cpp:2:
/usr/include/c++/9/bits/vector.tcc:198:5: note: candidate: ‘std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = long long int; _Alloc = std::allocator<long long int>]’
198 | vector<_Tp, _Alloc>::
| ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/9/bits/vector.t