stations.cpp:18:4: error: structured binding declaration cannot have type 'int'
18 | int[] label(int n, int l, int[] u, int[] v){
| ^~
stations.cpp:18:4: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
stations.cpp:18:4: error: empty structured binding declaration
stations.cpp:18:7: error: expected initializer before 'label'
18 | int[] label(int n, int l, int[] u, int[] v){
| ^~~~~
stations.cpp:33:43: error: expected ',' or '...' before 'c'
33 | int find_next_station(int s, int t, int[] c){
| ^
stations.cpp: In function 'int find_next_station(int, int, int*)':
stations.cpp:34:8: error: 'c' was not declared in this scope
34 | if(c.size()==1)return c[0];
| ^
stations.cpp:35:13: error: 'c' was not declared in this scope
35 | int n = c.size();
| ^
stations.cpp:36:20: error: 'begin' was not declared in this scope
36 | for(auto thing:s)if(thing==t)return s;
| ^
stations.cpp:36:20: note: suggested alternatives:
In file included from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:95,
from stations.cpp:1:
/usr/include/c++/11/valarray:1228:5: note: 'std::begin'
1228 | begin(const valarray<_Tp>& __va) noexcept
| ^~~~~
In file included from /usr/include/c++/11/filesystem:46,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:129,
from stations.cpp:1:
/usr/include/c++/11/bits/fs_dir.h:549:3: note: 'std::filesystem::__cxx11::begin'
549 | begin(recursive_directory_iterator __iter) noexcept
| ^~~~~
stations.cpp:36:20: error: 'end' was not declared in this scope
36 | for(auto thing:s)if(thing==t)return s;
| ^
stations.cpp:36:20: note: suggested alternatives:
In file included from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:95,
from stations.cpp:1:
/usr/include/c++/11/valarray:1255:5: note: 'std::end'
1255 | end(const valarray<_Tp>& __va) noexcept
| ^~~
In file included from /usr/include/c++/11/filesystem:46,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:129,
from stations.cpp:1:
/usr/include/c++/11/bits/fs_dir.h:554:3: note: 'std::filesystem::__cxx11::end'
554 | end(recursive_directory_iterator) noexcept
| ^~~
stations.cpp:46:59: error: 'thing' was not declared in this scope; did you mean 'tin'?
46 | for(int i = c.size()-1;i>=0;i--)if(c[i]<=t)return thing;
| ^~~~~
| tin