0_0_39176581_8272.cpp:4:1: error: expected unqualified-id before 'int'
4 | int dp[6005][3],a[6006],in[6006];
| ^~~
0_0_39176581_8272.cpp: In function 'void dfs(int, int)':
0_0_39176581_8272.cpp:8:6: error: 'dp' was not declared in this scope
8 | dp[x][0]=a[x];
| ^~
0_0_39176581_8272.cpp:8:15: error: 'a' was not declared in this scope
8 | dp[x][0]=a[x];
| ^
0_0_39176581_8272.cpp: In function 'int main()':
0_0_39176581_8272.cpp:22:16: error: 'dp' was not declared in this scope
22 | dp[i][0]=dp[i][1]=in[i]=0,ve[i].clear();
| ^~
0_0_39176581_8272.cpp:22:34: error: 'in' was not declared in this scope; did you mean 'i'?
22 | dp[i][0]=dp[i][1]=in[i]=0,ve[i].clear();
| ^~
| i
0_0_39176581_8272.cpp:23:44: error: 'a' was not declared in this scope
23 | for(int i=1;i<=n;i++) scanf("%d",a+i);
| ^
0_0_39176581_8272.cpp:25:33: error: 'in' was not declared in this scope; did you mean 'sin'?
25 | ve[y].push_back(x), in[x]++;
| ^~
| sin
0_0_39176581_8272.cpp:27:19: error: 'in' was not declared in this scope; did you mean 'i'?
27 | if(in[i]==0) {
| ^~
| i
0_0_39176581_8272.cpp:31:21: error: 'dp' was not declared in this scope
31 | cout<<max(dp[rt][0],dp[rt][1])<<"\n";
| ^~
|