foo.cc: In function 'int dfs(int, int)':
foo.cc:11:9: warning: unused variable 'ans' [-Wunused-variable]
int ans=0;
^~~
foo.cc: In function 'int main()':
foo.cc:16:9: warning: unused variable 'res' [-Wunused-variable]
int res;
^~~
foo.cc: In function 'int dfs(int, int)':
foo.cc:14:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
foo.cc: In function 'int main()':
foo.cc:17:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d",&n,&m);
~~~~~^~~~~~~~~~~~~~