0_0_35030683_5904.cpp:2:21: error: expected ',' or '...' before 'a'
int dynamicM2(int[] a, int m) {
^
0_0_35030683_5904.cpp: In function 'int dynamicM2(int*)':
0_0_35030683_5904.cpp:4:13: error: 'a' was not declared in this scope
int n = a.length;
^
0_0_35030683_5904.cpp:6:8: error: expected unqualified-id before '[' token
int[] max = new int[100];
^
0_0_35030683_5904.cpp:8:8: error: expected unqualified-id before '[' token
int[] dp = new int[100];
^
0_0_35030683_5904.cpp:10:16: error: 'Integer' was not declared in this scope
int mMax = Integer.MIN_VALUE;
^
0_0_35030683_5904.cpp:12:26: error: 'm' was not declared in this scope
for (int i = 1; i <= m; i++) {
^
0_0_35030683_5904.cpp:18:13: error: 'dp' was not declared in this scope
dp[j] = Math.max(dp[j - 1] + a[j], max[j - 1] + a[j]);
^
0_0_35030683_5904.cpp:18:21: error: 'Math' was not declared in this scope
dp[j] = Math.max(dp[j - 1] + a[j], max[j - 1] + a[j]);
^
0_0_35030683_5904.cpp:18:48: error: 'max' was not declared in this scope
dp[j] = Math.max(dp[j - 1] + a[j], max[j - 1] + a[j]);
^
|