dango3.cpp: In function 'int GetMax(const std::vector<int>&, int, int)':
dango3.cpp:10:13: error: no match for 'operator[]' (operand types are 'std::vector<bool>' and 'const std::vector<int>')
10 | used[x] = true;
| ^
In file included from /usr/include/c++/11/vector:68,
from /usr/include/c++/11/functional:62,
from /usr/include/c++/11/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/11/algorithm:74,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:65,
from dango3.cpp:1:
/usr/include/c++/11/bits/stl_bvector.h:906:7: note: candidate: 'std::vector<bool, _Alloc>::reference std::vector<bool, _Alloc>::operator[](std::vector<bool, _Alloc>::size_type) [with _Alloc = std::allocator<bool>; std::vector<bool, _Alloc>::reference = std::vector<bool>::reference; std::vector<bool, _Alloc>::size_type = long unsigned int]'
906 | operator[](size_type __n)
| ^~~~~~~~
/usr/include/c++/11/bits/stl_bvector.h:906:28: note: no known conversion for argument 1 from 'const std::vector<int>' to 'std::vector<bool>::size_type' {aka 'long unsigned int'}
906 | operator[](size_type __n)
| ~~~~~~~~~~^~~
/usr/include/c++/11/bits/stl_bvector.h:910:7: note: candidate: 'std::vector<bool, _Alloc>::const_reference std::vector<bool, _Alloc>::operator[](std::vector<bool, _Alloc>::size_type) const [with _Alloc = std::allocator<bool>; std::vector<bool, _Alloc>::const_reference = bool; std::vector<bool, _Alloc>::size_type = long unsigned int]'
910 | operator[](size_type __n) const
| ^~~~~~~~
/usr/include/c++/11/bits/stl_bvector.h:910:28: note: no known conversion for argument 1 from 'const std::vector<int>' to 'std::vector<bool>::size_type' {aka 'long unsigned int'}
910 | operator[](size_type __n) const
| ~~~~~~~~~~^~~