foo.cc: In function 'void dfs1(int)':
foo.cc:22:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = 0; i < edge[x].size(); ++i) {
~~^~~~~~~~~~~~~~~~
foo.cc: In function 'void dfs2(int, int)':
foo.cc:45:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = 0; i < edge[x].size(); ++i) {
~~^~~~~~~~~~~~~~~~
foo.cc: In function 'int main()':
foo.cc:56:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d", &n, &m);
~~~~~^~~~~~~~~~~~~~~~
foo.cc:59:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d", &u, &v);
~~~~~^~~~~~~~~~~~~~~~