Problem subgraphs
User LimCheeHann
Submission Time 2026-03-13 22:02:04
Score 0
Max Time N/A
Max Memory N/A

Compile Error

subgraphs.cpp: In function ‘int main()’:
subgraphs.cpp:23:9: error: no match for ‘operator[]’ (operand types are ‘std::vector<int>’ and ‘std::vector<int>’)
23 | graph[trail]=current1;
| ^
In file included from /usr/include/c++/9/vector:67,
from subgraphs.cpp:2:
/usr/include/c++/9/bits/stl_vector.h:1040:7: note: candidate: ‘std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](std::vector<_Tp, _Alloc>::size_type) [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::reference = int&; std::vector<_Tp, _Alloc>::size_type = long unsigned int]’
1040 | operator[](size_type __n) _GLIBCXX_NOEXCEPT
| ^~~~~~~~
/usr/include/c++/9/bits/stl_vector.h:1040:28: note: no known conversion for argument 1 from ‘std::vector<int>’ to ‘std::vector<int>::size_type’ {aka ‘long unsigned int’}
1040 | operator[](size_type _