power.cpp: In function 'void dfs(int, bool)':
power.cpp:23:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
23 | for (int i = 0; i < graph[node].size(); i++) {
| ~~^~~~~~~~~~~~~~~~~~~~
power.cpp: In function 'int main()':
power.cpp:56:26: error: taking address of rvalue [-fpermissive]
56 | memset(&visited[0], false, visited.size() * sizeof(visited[0])); // Reset mảng visited trước mỗi lần duyệt
| ~~~~~~~~~^
power.cpp:56:71: warning: 'void* memset(void*, int, size_t)' clearing an object of type 'std::vector<bool>::reference' with no trivial copy-assignment; use assignment or value-initialization instead [-Wclass-memaccess]
56 | memset(&visited[0], false, visited.size() * sizeof(visited[0])); // Reset mảng visited trước mỗi lần duyệt
| ^
In file included from /usr/include/c++/10/vector:68,
from power.cpp:2:
/usr/include/c++/10/bits/stl_bvector.h:72:10: note: 'std::vector<bool>::reference' declared here
72 | struct _Bit_reference
| ^~~~~~~~~~~~~~