Problem | subgraphs |
---|---|
User | Johnnie |
Submission Time | 2023-06-24 21:08:47 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
subgraphs.cpp: In function ‘int DFS(int, const std::map<int, std::vector<int> >&, bool*)’:
subgraphs.cpp:7:26: error: passing ‘const std::map<int, std::vector<int> >’ as ‘this’ argument discards qualifiers [-fpermissive]
7 | for (auto it = adj[start].begin(); it != adj[start].end(); ++it)
| ^
In file included from /usr/include/c++/9/map:61,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:81,
from subgraphs.cpp:1:
/usr/include/c++/9/bits/stl_map.h:490:7: note: in call to ‘std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](const key_type&) [with _Key = int; _Tp = std::vector<int>; _Compare = std::less<int>; _Alloc = std::allocator<std::pair<const int, std::vector<int> > >; std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type = std::vector<int>; std::map<_Key, _T