magictree.cpp: In function 'long long int ans(int, int)':
magictree.cpp:18:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
18 | for(int i=0;i<son[v].size();i++){
| ~^~~~~~~~~~~~~~
magictree.cpp: In function 'int main()':
magictree.cpp:29:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
29 | scanf("%d %d %d",&n,&m,&k);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~
magictree.cpp:32:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
32 | scanf("%d",&p);
| ~~~~~^~~~~~~~~
magictree.cpp:38:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
38 | scanf("%d %d %d",&v,&d,&w);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~