chase.cpp: In function 'void dfs1(int, int)':
chase.cpp:17:12: warning: unused variable 'j' [-Wunused-variable]
int i, j;
^
chase.cpp: In function 'void dfs2(int, int)':
chase.cpp:41:9: warning: unused variable 'i' [-Wunused-variable]
int i, j;
^
chase.cpp:41:12: warning: unused variable 'j' [-Wunused-variable]
int i, j;
^
chase.cpp: In function 'int main()':
chase.cpp:51:12: warning: unused variable 'j' [-Wunused-variable]
int i, j;
^
chase.cpp:53:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d", &N, &K);
~~~~~^~~~~~~~~~~~~~~~
chase.cpp:54:30: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
for(i=1; i<=N; i++) scanf("%lld", &P[i]);
~~~~~^~~~~~~~~~~~~~~
chase.cpp:58:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d", &u, &v);
~~~~~^~~~~~~~~~~~~~~~