net.cpp: In function 'int main()':
net.cpp:33:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
33 | for (int i = 0; i < nodes.size() / 2; ++i) {
| ~~^~~~~~~~~~~~~~~~~~
net.cpp:17:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
17 | scanf("%d", &n);
| ~~~~~^~~~~~~~~~
net.cpp:20:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
20 | scanf("%d%d", &a, &b);
| ~~~~~^~~~~~~~~~~~~~~~
net.cpp:36:43: warning: 'root' may be used uninitialized in this function [-Wmaybe-uninitialized]
36 | if (nodes.size() & 1) cout << root << " " << nodes[nodes.size() / 2] << endl;
| ^~~