Problem treecutting
User Dakingwawin2
Submission Time 2023-11-02 09:06:51
Score 0
Max Time N/A
Max Memory N/A

Compile Error

treecutting.cpp: In function ‘void bfs()’:
treecutting.cpp:6:18: error: ‘N’ was not declared in this scope
6 | int distance[N];
| ^
treecutting.cpp:8:19: error: invalid types ‘<unresolved overloaded function type>[int]’ for array subscript
8 | distance[i]=0;
| ^
treecutting.cpp:12:9: error: ‘visited’ was not declared in this scope
12 | visited[i]= false;
| ^~~~~~~
treecutting.cpp:16:14: error: invalid use of member function ‘std::queue<_Tp, _Sequence>::size_type std::queue<_Tp, _Sequence>::size() const [with _Tp = int; _Sequence = std::deque<int, std::allocator<int> >; std::queue<_Tp, _Sequence>::size_type = long unsigned int]’ (did you forget the ‘()’ ?)
16 | while (Q.size>0){
| ~~^~~~
| ()
treecutting.cpp:19:9: error: ‘visited’ was not declared in this scope
19