training.cpp: In function 'void dfs(int)':
training.cpp:33:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i=0; i<gp[x].size(); i++){
~^~~~~~~~~~~~~
training.cpp: In function 'int lca(int, int)':
training.cpp:57:1: warning: no return statement in function returning non-void [-Wreturn-type]
}
^
training.cpp: In function 'void dfs2(int)':
training.cpp:61:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i=0; i<gp[x].size(); i++){
~^~~~~~~~~~~~~
training.cpp:67:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i=0; i<gp2[x].size(); i++){
~^~~~~~~~~~~~~~
training.cpp:70:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int j=0; j<gp[x].size(); j++){
~^~~~~~~~~~~~~
training.cpp: In function 'int main()':
training.cpp:106:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i=0; i<e.size(); i++){
~^~~~~~~~~
training.cpp:84:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d", &N, &M);
~~~~~^~~~~~~~~~~~~~~~
training.cpp:88:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d%d", &a, &b, &c);
~~~~~^~~~~~~~~~~~~~~~~~~~~~
training.cpp:115:13: warning: 'now' may be used uninitialized in this function [-Wmaybe-uninitialized]
ans-=dp[now];
~~~~~~^