net.cpp: In function 'int main()':
net.cpp:28:11: warning: format '%d' expects argument of type 'int', but argument 2 has type 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wformat=]
28 | printf("%d\n", (ans.size() + 1) / 2);
| ~^ ~~~~~~~~~~~~~~~~~~~~
| | |
| int std::vector<int>::size_type {aka long unsigned int}
| %ld
net.cpp:29:19: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
29 | for(int i = 0; i < ans.size() / 2; i++)
| ~~^~~~~~~~~~~~~~~~
net.cpp:17:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
17 | scanf("%d", &n);
| ~~~~~^~~~~~~~~~
net.cpp:19:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
19 | scanf("%d %d", &a, &b);
| ~~~~~^~~~~~~~~~~~~~~~~