ballmachine.cpp: In function 'void dfscalc(int)':
ballmachine.cpp:11:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i=0;i<g[s].size();i++) dfscalc(g[s][i]);
~^~~~~~~~~~~~
ballmachine.cpp:12:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i=0;i<g[s].size();i++) dd[s]=min(dd[s],dd[g[s][i]]);
~^~~~~~~~~~~~
ballmachine.cpp: In function 'int dfs(int)':
ballmachine.cpp:17:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i=0;i<g[s].size();i++) ord.push(make_pair(-dd[g[s][i]],g[s][i]));
~^~~~~~~~~~~~
ballmachine.cpp:24:1: warning: no return statement in function returning non-void [-Wreturn-type]
}
^
ballmachine.cpp: In function 'int main()':
ballmachine.cpp:28:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d",&n,&q);
~~~~~^~~~~~~~~~~~~~
ballmachine.cpp:32:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&t);
~~~~~^~~~~~~~~
ballmachine.cpp:44:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d",&t,&a);
~~~~~^~~~~~~~~~~~~~
ballmachine.cpp:39:5: warning: 'root' may be used uninitialized in this function [-Wmaybe-uninitialized]
dfs(root);
~~~^~~~~~