railroad.cpp: In lambda function:
railroad.cpp:13:44: error: use of 'fnd' before deduction of 'auto'
13 | return (x == uf[x]) ? x : (uf[x] = fnd(uf[x]));
| ^~~
railroad.cpp: In function 'll plan_roller_coaster(const std::vector<int>&, const std::vector<int>&)':
railroad.cpp:33:30: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
33 | for (int i = 0, j = 0; i < e.size(); i = j) {
| ~~^~~~~~~~~~
railroad.cpp:34:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
34 | for (; j < e.size() && e[j].first == e[i].first; ++j) {
| ~~^~~~~~~~~~
railroad.cpp:38:15: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
38 | if (j < e.size()) {
| ~~^~~~~~~~~~