paprike.cpp: In function 'int dfs(int, int)':
paprike.cpp:8:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i=0;i<G[u].size();i++){
~^~~~~~~~~~~~
paprike.cpp:15:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(last = 0;last < child.size();last ++)
~~~~~^~~~~~~~~~~~~~
paprike.cpp: In function 'int main()':
paprike.cpp:27:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d",&n,&val);
~~~~~^~~~~~~~~~~~~~~~~
paprike.cpp:29:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&w[i]);
~~~~~^~~~~~~~~~~~
paprike.cpp:32:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d",&x,&y);
~~~~~^~~~~~~~~~~~~~~