watching.cpp: In function ‘bool f(int, int, int)’:
watching.cpp:14:60: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
return dp[x][y][z] = f(nxt[x],y-1,z) || f(nxt2[x],y,z-1);
^
watching.cpp: In function ‘bool trial(int)’:
watching.cpp:22:28: error: ‘memset’ was not declared in this scope
memset(dp,-1,sizeof(dp));
^
watching.cpp: In function ‘int main()’:
watching.cpp:27:31: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d %d",&n,&p,&q);
^
watching.cpp:29:26: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&a[i]);
^