Problem watching
User brat
Submission Time 2025-11-19 10:18:01
Score 0
Max Time N/A
Max Memory N/A

Compile Error

watching.cpp:7:9: error: array bound is not an integer constant before ‘]’ token
7 | int dp[n][p+1];
| ^
watching.cpp:7:14: error: array bound is not an integer constant before ‘]’ token
7 | int dp[n][p+1];
| ^
watching.cpp: In function ‘bool cond(long long int)’:
watching.cpp:20:21: error: ‘dp’ was not declared in this scope; did you mean ‘p’?
20 | if(x[i]==n) dp[i][0]=1; //if next unc event doesnt exist, with 0 small, need 1 big
| ^~
| p
watching.cpp:21:14: error: ‘dp’ was not declared in this scope; did you mean ‘p’?
21 | else dp[i][0]=dp[x[i]][0]+1;
| ^~
| p
watching.cpp:24:25: error: ‘dp’ was not declared in this scope; did you mean ‘p’?
24 | if(x[i]==n) dp[i][j]=1;
| ^~
| p
watching.cpp:25:18: error: