magictree.cpp: In function 'int main()':
magictree.cpp:6:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d %d", &V, &f, &md);
~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
magictree.cpp:9:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &par[i]);
~~~~~^~~~~~~~~~~~~~~
magictree.cpp:14:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d %d", &v, &d, &w);
~~~~~^~~~~~~~~~~~~~~~~~~~~~~~