watching.cpp: In function 'bool check(long long int)':
watching.cpp:14:4: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
if(dp[i][j]!=-1)
^~
watching.cpp:16:5: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
dp[i+1][j]=max(dp[i+1][j],rchm[dp[i][j]]);
^~
watching.cpp: In function 'int main()':
watching.cpp:25:22: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'long long int*' [-Wformat=]
scanf("%I64d",&a[i]);
~~~~~^
watching.cpp:25:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%I64d",&a[i]);
~~~~~^~~~~~~~~~~~~~~