0_0_38015505_11380.cpp:6:1: error: expected unqualified-id before numeric constant
66
^
0_0_38015505_11380.cpp: In function 'int dfs(int, int, int)':
0_0_38015505_11380.cpp:11:23: error: 'n' was not declared in this scope
if (pos + step + 2 > n){
^
0_0_38015505_11380.cpp:12:3: error: 'dp' was not declared in this scope
dp[pos][step][p] = 0;
^
0_0_38015505_11380.cpp:15:6: error: 'dp' was not declared in this scope
if (dp[pos][step][p] != INF) return dp[pos][step][p];
^
0_0_38015505_11380.cpp:21:3: error: 'dp' was not declared in this scope
dp[pos][step][p] = max(d1 + a[pos + step + 1] - a[pos - 1], d2 + a[pos + step + 2] - a[pos - 1]);
^
0_0_38015505_11380.cpp:21:31: error: 'a' was not declared in this scope
dp[pos][step][p] = max(d1 + a[pos + step + 1] - a[pos - 1], d2 + a[pos + step + 2] - a[pos - 1]);
^
0_0_38015505_11380.cpp:23:3: error: 'dp' was not declared in this scope
dp[pos][step][p] = min(d1 + a[pos + step + 1] - a[pos - 1], d2 + a[pos + step + 2] - a[pos - 1]);
^
0_0_38015505_11380.cpp:23:31: error: 'a' was not declared in this scope
dp[pos][step][p] = min(d1 + a[pos + step + 1] - a[pos - 1], d2 + a[pos + step + 2] - a[pos - 1]);
^
0_0_38015505_11380.cpp:24:9: error: 'dp' was not declared in this scope
return dp[pos][step][p];
^
0_0_38015505_11380.cpp: In function 'void solve()':
0_0_38015505_11380.cpp:28:14: error: 'n' was not declared in this scope
scanf("%d",&n);
^
0_0_38015505_11380.cpp:30:15: error: 'a' was not declared in this scope
scanf("%d",&a[i]);
^
0_0_38015505_11380.cpp:33:4: error: 'dp' was not declared in this scope
dp[i][j][0] = dp[i][j][1] = INF;
^
0_0_38015505_11380.cpp:36:21: error: 'dp' was not declared in this scope
printf("%d\n", max(dp[1][0][0], dp[1][1][0]));
^
|