0_0_26770916_7286.cpp:1:1: error: 'import' does not name a type
import java.util.*;
^
0_0_26770916_7286.cpp:4:9: error: expected ':' before 'static'
public static void main(String[] args) {
^
0_0_26770916_7286.cpp:4:26: error: 'String' has not been declared
public static void main(String[] args) {
^
0_0_26770916_7286.cpp:4:35: error: expected ',' or '...' before 'args'
public static void main(String[] args) {
^
0_0_26770916_7286.cpp:29:1: error: expected ';' after class definition
}
^
0_0_26770916_7286.cpp: In static member function 'static void Main::main(int*)':
0_0_26770916_7286.cpp:5:3: error: 'Scanner' was not declared in this scope
Scanner in = new Scanner(System.in);
^
0_0_26770916_7286.cpp:6:14: error: 'in' was not declared in this scope
int test = in.nextInt();
^
0_0_26770916_7286.cpp:9:7: error: expected unqualified-id before '[' token
int[] v = new int[n], b = new int[n], p = new int[n];
^
0_0_26770916_7286.cpp:10:24: error: 'n' was not declared in this scope
for (int i = 0; i < n; i++) {
^
0_0_26770916_7286.cpp:11:5: error: 'v' was not declared in this scope
v[i] = in.nextInt();
^
0_0_26770916_7286.cpp:12:5: error: 'b' was not declared in this scope
b[i] = in.nextInt();
^
0_0_26770916_7286.cpp:13:5: error: 'p' was not declared in this scope
p[i] = in.nextInt();
^
0_0_26770916_7286.cpp:16:7: error: expected unqualified-id before '[' token
int[] dp = new int[c+1];
^
0_0_26770916_7286.cpp:18:24: error: 'n' was not declared in this scope
for (int i = 0; i < n; i++) {
^
0_0_26770916_7286.cpp:19:26: error: 'p' was not declared in this scope
for (int k = 1; k <= p[i]; k++) {
^
0_0_26770916_7286.cpp:20:27: error: 'v' was not declared in this scope
for (int j = c; j >= v[i]; j--) {
^
0_0_26770916_7286.cpp:21:7: error: 'dp' was not declared in this scope
dp[j] = Math.max(dp[j-v[i]]+b[i], dp[j]);
^
0_0_26770916_7286.cpp:21:15: error: 'Math' was not declared in this scope
dp[j] = Math.max(dp[j-v[i]]+b[i], dp[j]);
^
0_0_26770916_7286.cpp:21:35: error: 'b' was not declared in this scope
dp[j] = Math.max(dp[j-v[i]]+b[i], dp[j]);
^
0_0_26770916_7286.cpp:26:4: error: 'System' was not declared in this scope
System.out.println(ans);
^
|