net.cpp: In function 'int main()':
net.cpp:41:38: warning: format '%i' expects argument of type 'int', but argument 2 has type 'std::vector<int>::size_type {aka long unsigned int}' [-Wformat=]
printf("%i\n",(leaves.size()+1)/2);
~~~~~~~~~~~~~~~~~~~^
net.cpp:42:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i=0;i<(leaves.size()+1)/2;i++)
~^~~~~~~~~~~~~~~~~~~~
net.cpp:31:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%i",&n);
~~~~~^~~~~~~~~
net.cpp:35:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%i %i",&a,&b);
~~~~~^~~~~~~~~~~~~~~