shortcut.cpp: In function 'void DFS(int)':
shortcut.cpp:24:27: 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]
24 | for (int i = 0; i < edges[u].size(); i++) {
| ~~^~~~~~~~~~~~~~~~~
shortcut.cpp: In function 'long long int diameter()':
shortcut.cpp:40:38: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::vector<std::pair<long long int, long long int> > >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
40 | for (int i = edges.size() / 2; i < edges.size(); i++) {
| ~~^~~~~~~~~~~~~~
shortcut.cpp:41:27: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
41 | for (int j = 0; j < dist.size(); j++) {
| ~~^~~~~~~~~~~~~
shortcut.cpp:45:27: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
45 | for (int j = 0; j < dist.size(); j++) {
| ~~^~~~~~~~~~~~~
shortcut.cpp: In function 'long long int find_shortcut(int, std::vector<int>, std::vector<int>, int)':
shortcut.cpp:11:36: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
11 | #define rep(i, n) for(int i = 0; i < n; i++)
......
55 | rep(k, l.size()) {
| ~~~~~~~~~~~
shortcut.cpp:55:5: note: in expansion of macro 'rep'
55 | rep(k, l.size()) {
| ^~~