stations.cpp: In function 'std::vector<int> label(int, int, std::vector<int>, std::vector<int>)':
stations.cpp:9:21: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
9 | for(int i = 0;i < u.size();i++){
| ~~^~~~~~~~~~
stations.cpp: In lambda function:
stations.cpp:16:16: error: 'i' was not declared in this scope
16 | labels[i] = val;
| ^
stations.cpp:17:32: error: 'begin' was not declared in this scope
17 | for(auto child : v[node]){
| ^
stations.cpp:17:32: note: suggested alternatives:
In file included from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:95,
from stations.cpp:1:
/usr/include/c++/10/valarray:1224:5: note: 'std::begin'
1224 | begin(const valarray<_Tp>& __va)
| ^~~~~
In file included from /usr/include/c++/10/filesystem:46,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:129,
from stations.cpp:1:
/usr/include/c++/10/bits/fs_dir.h:549:3: note: 'std::filesystem::__cxx11::begin'
549 | begin(recursive_directory_iterator __iter) noexcept
| ^~~~~
stations.cpp:17:32: error: 'end' was not declared in this scope
17 | for(auto child : v[node]){
| ^
stations.cpp:17:32: note: suggested alternatives:
In file included from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:95,
from stations.cpp:1:
/usr/include/c++/10/valarray:1244:5: note: 'std::end'
1244 | end(const valarray<_Tp>& __va)
| ^~~
In file included from /usr/include/c++/10/filesystem:46,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:129,
from stations.cpp:1:
/usr/include/c++/10/bits/fs_dir.h:554:3: note: 'std::filesystem::__cxx11::end'
554 | end(recursive_directory_iterator) noexcept
| ^~~
stations.cpp: In function 'std::vector<int> label(int, int, std::vector<int>, std::vector<int>)':
stations.cpp:21:5: error: expected ',' or ';' before 'dfs'
21 | dfs(0,-1,0);
| ^~~
stations.cpp:22:12: error: could not convert 'labels' from 'int [200001]' to 'std::vector<int>'
22 | return labels;
| ^~~~~~
| |
| int [200001]
stations.cpp: In function 'int find_next_station(int, int, std::vector<int>)':
stations.cpp:26:21: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
26 | for(int i = 0;i < c.size();i++){
| ~~^~~~~~~~~~
stations.cpp:35:1: warning: control reaches end of non-void function [-Wreturn-type]
35 | }
| ^