chase.cpp: In function 'void dfs(int, int)':
chase.cpp:17:12: warning: unused variable 'j' [-Wunused-variable]
int i, j, chd=0;
^
chase.cpp: In function 'int main()':
chase.cpp:46:12: warning: unused variable 'j' [-Wunused-variable]
int i, j;
^
chase.cpp:48: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:49: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:53:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d", &u, &v);
~~~~~^~~~~~~~~~~~~~~~