Main.cpp: In function 'long long int dfs(int)':
Main.cpp:10:19: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
10 | for(int i = 0; i < c[a].size(); i++) sum += dfs(c[a][i]);
| ~~^~~~~~~~~~~~~
Main.cpp: In function 'void dfs2(int, long long int, long long int, long long int)':
Main.cpp:17:19: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
17 | for(int i = 0; i < c[a].size(); i++) dfs2(c[a][i], nex, max(mp, nex), min(lo, nex));
| ~~^~~~~~~~~~~~~
Main.cpp: In function 'int main()':
Main.cpp:33:3: error: 'll' was not declared in this scope
33 | ll ans = 0;
| ^~
Main.cpp:34:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
34 | for(int i = 0; i < c[0].size(); i++) dfs2(c[0][i], 0ll, 0ll, 0ll);
| ~~^~~~~~~~~~~~~
Main.cpp:36:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<long long int, long long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
36 | for(int i = 0; i < res.size(); i++){
| ~~^~~~~~~~~~~~
Main.cpp:37:14: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<long long int, long long int> >, std::pair<long long int, long long int> >::value_type' {aka 'struct std::pair<long long int, long long int>'} has no member named 'fir'; did you mean 'first'?
37 | if(res[i].fir + s < 0) break;
| ^~~
| first
Main.cpp:38:16: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<long long int, long long int> >, std::pair<long long int, long long int> >::value_type' {aka 'struct std::pair<long long int, long long int>'} has no member named 'sec'
38 | s += res[i].sec;
| ^~~
Main.cpp:39:4: error: 'ans' was not declared in this scope; did you mean 'abs'?
39 | ans += res[i].sec;
| ^~~
| abs
Main.cpp:39:18: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<long long int, long long int> >, std::pair<long long int, long long int> >::value_type' {aka 'struct std::pair<long long int, long long int>'} has no member named 'sec'
39 | ans += res[i].sec;
| ^~~
Main.cpp:41:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
41 | cout << ans << '\n';
| ^~~
| abs