net.cpp: In function 'int main()':
net.cpp:25:14: warning: format '%u' expects argument of type 'unsigned int', but argument 2 has type 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wformat=]
25 | printf("%u\n" , leaf.size() / 2 + leaf.size() % 2);
| ~^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| unsigned int std::vector<int>::size_type {aka long unsigned int}
| %lu
net.cpp:26:24: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
26 | for (int i = 1 ; i < leaf.size() ; i += 2)
| ~~^~~~~~~~~~~~~
net.cpp:13:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
13 | scanf("%d" , &n);
| ~~~~~^~~~~~~~~~~
net.cpp:16:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
16 | scanf("%d%d" , &a , &b);
| ~~~~~^~~~~~~~~~~~~~~~~~