row_id large_string | sid large_string | submission_id large_string | pid large_string | problem_id large_string | uid large_string | user_id large_string | date int64 | date_iso timestamp[ms] | source_name large_string | code large_string | compilemessage large_string | compile_status large_string | exit_code int64 | javac_version large_string | category large_string | label_status large_string | taxonomy_version large_string | session_id large_string | session_6h large_string | source large_string | original_status large_string | code_size int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
v2_s779550483 | s779550483 | s779550483 | p03163 | p03163 | u505022189 | u505022189 | 1,593,172,169 | 2020-06-26T11:49:29 | Main.java | 54 | Main.java:1: error: class, interface, enum, or record expected
54
^
1 error
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u505022189|p03163|3 | u505022189|p03163|3 | codenet | Compile Error | 2 | |
v2_s831882043 | s831882043 | s831882043 | p03163 | p03163 | u566333991 | u566333991 | 1,546,912,351 | 2019-01-08T01:52:31 | Main.java | #include <iostream>
using namespace std;
int main()
{
int n,W;
cin >> n >> W;
int v[n+1];
int w[n+1];
for(int i = 1 ; i <= n ; i++) cin >> w[i] >> v[i];
long long int dp[n+1][W+1];
for(int i = 0 ; i < W+1 ; i++) dp[0][i] = 0;
for(int i = 1 ; i < n+1 ; i++)
{
for(int j = 1 ; j < W+1 ; j++)
{
... | Main.java:1: error: illegal character: '#'
#include <iostream>
^
Main.java:1: error: class, interface, enum, or record expected
#include <iostream>
^
Main.java:6: error: not a statement
cin >> n >> W;
^
Main.java:7: error: not a statement
int v[n+1];
^
Main.java:8: error: not a statement
i... | compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u566333991|p03163|0 | u566333991|p03163|0 | codenet | Compile Error | 479 | |
v2_s800822965 | s800822965 | s800822965 | p03163 | p03163 | u582225339 | u582225339 | 1,599,157,859 | 2020-09-03T18:30:59 | Main.java | 6 15
6 5
5 6
6 4
6 6
3 5
7 2 | Main.java:1: error: class, interface, enum, or record expected
6 15
^
1 error
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u582225339|p03163|0 | u582225339|p03163|0 | codenet | Compile Error | 28 | |
v2_s780861579 | s780861579 | s780861579 | p03163 | p03163 | u582397785 | u582397785 | 1,591,555,438 | 2020-06-07T18:43:58 | Main.java | import java.util.*;
import java.io.*;
class Main{
public static long func(int weight[], long value[], int total, int weightnow, int index, int n, long dp[][] )
{
if(index>=n)
{
return 0;
}
if(dp[index][weightnow]!=-1)
{
return dp[inde... | Main.java:97: error: class, interface, enum, or record expected
}import java.util.*;
^
Main.java:98: error: class, interface, enum, or record expected
import java.io.*;
^
2 errors
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u582397785|p03163|0 | u582397785|p03163|0 | codenet | Compile Error | 5,092 | |
v2_s454584340 | s454584340 | s454584340 | p03163 | p03163 | u584924463 | u584924463 | 1,591,013,803 | 2020-06-01T12:16:43 | Main.java | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int W = sc.nextInt();
long[] w = new long[N];
long[] v = new long[N];
for (int i = 0; i < N; i++) {
w[i] = sc... | Main.java:20: error: ')' expected
long ans = (rec(w,v,0,W);
^
Main.java:22: error: ';' expected
System.out.println(ans));
^
2 errors
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u584924463|p03163|3 | u584924463|p03163|2 | codenet | Compile Error | 1,022 | |
v2_s508384681 | s508384681 | s508384681 | p03163 | p03163 | u587093160 | u587093160 | 1,599,133,145 | 2020-09-03T11:39:05 | Main.java | import java.util.Scanner;
class Solution
{
public static int knapsack(int[] wt, int[] val, int n, int w, int[][] dp)
{
for(int i = 1; i <= n; i++)
{
for(int j = 1; j <= w; j++)
{
if(wt[i - 1] <= j)
{
dp[i][j] = Math.max((val[i - 1] + dp[i - 1][j - wt[i - 1]), dp[i - 1][... | Main.java:12: error: ']' expected
dp[i][j] = Math.max((val[i - 1] + dp[i - 1][j - wt[i - 1]), dp[i - 1][j]);
^
Main.java:16: error: ';' expected
dp[i][j] = dp[i - 1][j]
... | compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u587093160|p03163|0 | u587093160|p03163|0 | codenet | Compile Error | 1,173 | |
v2_s344627321 | s344627321 | s344627321 | p03163 | p03163 | u587093160 | u587093160 | 1,599,161,197 | 2020-09-03T19:26:37 | Main.java | import java.util.Scanner;
class Solution
{
public static int knapsack(int[] wt, int[] val, int n, int w, int[][] dp)
{
for(int i = 1; i <= n; i++)
{
for(int j = 1; j <= w; j++)
{
if(wt[i - 1] <= j)
{
dp[i][j] = Math.max((val[i - 1] + dp[i - 1][j - wt[i - 1]), dp[i - 1][... | Main.java:12: error: ']' expected
dp[i][j] = Math.max((val[i - 1] + dp[i - 1][j - wt[i - 1]), dp[i - 1][j]);
^
Main.java:16: error: ';' expected
dp[i][j] = dp[i - 1][j]
... | compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u587093160|p03163|1 | u587093160|p03163|1 | codenet | Compile Error | 1,173 | |
v2_s673325233 | s673325233 | s673325233 | p03163 | p03163 | u587093160 | u587093160 | 1,599,161,249 | 2020-09-03T19:27:29 | Main.java | import java.util.Scanner;
class Solution
{
public static int knapsack(int[] wt, int[] val, int n, int w, int[][] dp)
{
for(int i = 1; i <= n; i++)
{
for(int j = 1; j <= w; j++)
{
if(wt[i - 1] <= j)
{
dp[i][j] = Math.max((val[i - 1] + dp[i - 1][j - wt[i - 1]), dp[i - 1][... | Main.java:12: error: ']' expected
dp[i][j] = Math.max((val[i - 1] + dp[i - 1][j - wt[i - 1]), dp[i - 1][j]);
^
1 error
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u587093160|p03163|1 | u587093160|p03163|1 | codenet | Compile Error | 1,174 | |
v2_s176657190 | s176657190 | s176657190 | p03163 | p03163 | u587093160 | u587093160 | 1,599,161,310 | 2020-09-03T19:28:30 | Main.java | import java.util.Scanner;
class Solution
{
public static int knapsack(int[] wt, int[] val, int n, int w, int[][] dp)
{
for(int i = 1; i <= n; i++)
{
for(int j = 1; j <= w; j++)
{
if(wt[i - 1] <= j)
{
dp[i][j] = Math.max((val[i - 1] + dp[i - 1][j - wt[i - 1]]), dp[i - 1]... | Main.java:16: error: ';' expected
dp[i][j] = dp[i - 1][j]
^
1 error
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u587093160|p03163|1 | u587093160|p03163|1 | codenet | Compile Error | 1,174 | |
v2_s794549714 | s794549714 | s794549714 | p03163 | p03163 | u592531224 | u592531224 | 1,590,855,859 | 2020-05-30T16:24:19 | Main.java | �������7�;
��� ��
��
���
��
�!�" ��#
�$�%�&�'�<init>�()V�Code�LineNumberTable�main�([Ljava/lang/String;)V�
StackMapTable�(�)�*�
SourceFile�gh.java�
��java/util/Scanner�+�,�-�
�.�/�0�[[J�1�2�3�4�5�6�7�8�9�:�gh�java/lang/Object�[Ljava/lang/String;�[I�[J�java... | Main.java:1: error: illegal character: '\ufffd'
???????7?;
^
Main.java:1: error: illegal character: '\ufffd'
???????7?;
^
Main.java:1: error: illegal character: '\ufffd'
???????7?;
^
Main.java:1: error: illegal character: '\ufffd'
???????7?;
^
Main.java:1: error: illegal character: '\ufffd'
???????7?;
^
Main.... | compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u592531224|p03163|0 | u592531224|p03163|0 | codenet | Compile Error | 1,620 | |
v2_s125503952 | s125503952 | s125503952 | p03163 | p03163 | u596129397 | u596129397 | 1,581,153,483 | 2020-02-08T09:18:03 | Main.java | class Main {
// dp
public static long knapsack1(int[] w, long[] v, int C) {
int n = w.length;
long[][] dp = new long[n][C+1];
for (int c = 1; c <= C; c++) {
dp[0][c] = (c >= w[0]) ? v[0] : 0;
}
for (int i = 1; i < n; i++) {
for (int c = 1; c <=... | Main.java:23: error: cannot find symbol
Scanner in = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:23: error: cannot find symbol
Scanner in = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u596129397|p03163|0 | u596129397|p03163|0 | codenet | Compile Error | 1,016 | |
v2_s524612356 | s524612356 | s524612356 | p03163 | p03163 | u625261658 | u625261658 | 1,561,967,673 | 2019-07-01T07:54:33 | knapsack.java | import java.util.*;
public class knapsack
{
public static void main(String args[])
{
Scanner sc=new Scanner(System.in);
int n=sc.nextInt();
int c=sc.nextInt();
long val[]=new long[n+1];
long wt[]=new long[n+1];
for(int i=1;i<=n;i++)
{
wt[i]=sc.nextInt();
val[i]=sc.... | knapsack.java:34: error: class, interface, enum, or record expected
}import java.util.*;
^
1 error
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u625261658|p03163|0 | u625261658|p03163|0 | codenet | Compile Error | 1,246 | |
v2_s525151980 | s525151980 | s525151980 | p03163 | p03163 | u625261658 | u625261658 | 1,561,967,697 | 2019-07-01T07:54:57 | Main.java | import java.util.*;
public class Main
{
public static void main(String args[])
{
Scanner sc=new Scanner(System.in);
int n=sc.nextInt();
int c=sc.nextInt();
long val[]=new long[n+1];
long wt[]=new long[n+1];
for(int i=1;i<=n;i++)
{
wt[i]=sc.nextInt();
val[i]=sc.next... | Main.java:34: error: class, interface, enum, or record expected
}import java.util.*;
^
1 error
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u625261658|p03163|0 | u625261658|p03163|0 | codenet | Compile Error | 1,242 | |
v2_s094562389 | s094562389 | s094562389 | p03163 | p03163 | u652019094 | u652019094 | 1,587,309,688 | 2020-04-19T15:21:28 | Main.java | import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;
/**
* Built using CHelper plug-in
* Actual solution is at the top
*
* @author Shivam
*/
public class Mai... | Main.java:31: error: array required, but long found
dp[n][c] = knapsack(w, v, n - 1, c);
^
Main.java:33: error: array required, but long found
dp[n][c] = 0;
^
Main.java:35: error: array required, but long found
dp[n][c] = Math.max(knaps... | compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u652019094|p03163|1 | u652019094|p03163|1 | codenet | Compile Error | 3,364 | |
v2_s443033414 | s443033414 | s443033414 | p03163 | p03163 | u656393766 | u656393766 | 1,598,746,841 | 2020-08-30T00:20:41 | Main.java | import java.util.*;
public class Main{
public static void sortbyColumn(int arr[][], int col)
{
// Using built-in sort function Arrays.sort
Arrays.sort(arr, new Comparator<int[]>() {
@Override
// Compare values according to columns
public ... | Main.java:25: error: cannot find symbol
N=onj.nextInt();
^
symbol: variable onj
location: class Main
Main.java:48: error: incompatible types: unexpected return value
return v;
^
2 errors
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u656393766|p03163|0 | u656393766|p03163|0 | codenet | Compile Error | 1,153 | |
v2_s480846900 | s480846900 | s480846900 | p03163 | p03163 | u656393766 | u656393766 | 1,598,814,842 | 2020-08-30T19:14:02 | Main.java | import java.util.*;
public class Main{
public static void sortbyColumn(int arr[][], int col)
{
// Using built-in sort function Arrays.sort
Arrays.sort(arr, new Comparator<int[]>() {
@Override
// Compare values according to columns
public ... | Main.java:42: error: ';' expected
dp[i][j]=arr[i][0]+dp[i][j-arr[i][0]]
^
Main.java:47: error: <identifier> expected
System.out.println(dp[N][W]);
^
Main.java:47: error: ']' expected
System.out.println(dp[N][W]);
^
Main.java:47: erro... | compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u656393766|p03163|1 | u656393766|p03163|1 | codenet | Compile Error | 1,199 | |
v2_s591133491 | s591133491 | s591133491 | p03163 | p03163 | u656393766 | u656393766 | 1,598,814,999 | 2020-08-30T19:16:39 | Main.java | import java.util.*;
public class Main{
public static void sortbyColumn(int arr[][], int col)
{
// Using built-in sort function Arrays.sort
Arrays.sort(arr, new Comparator<int[]>() {
@Override
// Compare values according to columns
public ... | Main.java:41: error: ';' expected
dp[i][j]=arr[i][0]+dp[i][j-arr[i][0]]
^
1 error
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u656393766|p03163|1 | u656393766|p03163|1 | codenet | Compile Error | 1,176 | |
v2_s970178670 | s970178670 | s970178670 | p03163 | p03163 | u704858254 | u704858254 | 1,578,389,240 | 2020-01-07T09:27:20 | Main.java | class Main{
public static void main(String... args){
private static long bruteGo(int[] weight, int[] value, int W, int index, long v){
if(index >= weight.length) return v;
if(W <= 0) return v;
if(W >= weight[index])
return Math.max(bruteGo(weight, value, W, index+1, v),
... | Main.java:4: error: illegal start of expression
private static long bruteGo(int[] weight, int[] value, int W, int index, long v){
^
1 error
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u704858254|p03163|0 | u704858254|p03163|0 | codenet | Compile Error | 967 | |
v2_s835680068 | s835680068 | s835680068 | p03163 | p03163 | u704858254 | u704858254 | 1,578,389,359 | 2020-01-07T09:29:19 | Main.java | class Main{
private static long bruteGo(int[] weight, int[] value, int W, int index, long v){
if(index >= weight.length) return v;
if(W <= 0) return v;
//if(index < weight.length && W == weight[index])
//return v + value[index];
if(W >= weight[index])
return Math.max(brute... | Main.java:21: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:21: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u704858254|p03163|0 | u704858254|p03163|0 | codenet | Compile Error | 1,012 | |
v2_s916213417 | s916213417 | s916213417 | p03163 | p03163 | u704858254 | u704858254 | 1,578,612,495 | 2020-01-09T23:28:15 | Main.java | import java.util.*;
class Main{
public static void main(String... args){
Scanner sc = new Scanner(System.in);
int N, W;
N = sc.nextInt();
W = sc.nextInt();
long[] dp = new long[W+1];
for(int i = 0; i < N; i++){
dp[i] = -1;
int w = sc.nextInt();
int v = sc.nextInt();
... | Main.java:21: error: variable i is already defined in method main(String...)
for(int i = 0; i < W+1; i++)
^
Main.java:22: error: incompatible types: possible lossy conversion from long to int
ans = Math.max(ans, dp[i]);
^
Main.java:24: error: incompatible types: unexpec... | compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u704858254|p03163|4 | u704858254|p03163|3 | codenet | Compile Error | 593 | |
v2_s228065146 | s228065146 | s228065146 | p03163 | p03163 | u704858254 | u704858254 | 1,578,612,716 | 2020-01-09T23:31:56 | Main.java | import java.util.*;
class Main{
private static long go(int N, int W){
long[] dp = new long[W+1];
for(int i = 0; i < N; i++){
dp[i] = -1;
int w = sc.nextInt();
int v = sc.nextInt();
for(int existing_wt = w; existing_wt >= 0; existing_wt--){
dp[i] = Math.max(dp[existing_wt], ... | Main.java:21: error: illegal start of expression
public static void main(String... args){
^
Main.java:30: error: class, interface, enum, or record expected
}
^
2 errors
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u704858254|p03163|4 | u704858254|p03163|3 | codenet | Compile Error | 672 | |
v2_s253362616 | s253362616 | s253362616 | p03163 | p03163 | u704858254 | u704858254 | 1,578,612,790 | 2020-01-09T23:33:10 | Main.java | import java.util.*;
class Main{
private static long go(int N, int W){
long[] dp = new long[W+1];
for(int i = 0; i < N; i++){
dp[i] = -1;
int w = sc.nextInt();
int v = sc.nextInt();
for(int existing_wt = w; existing_wt >= 0; existing_wt--){
dp[i] = Math.max(dp[existing_wt], ... | Main.java:22: error: illegal start of expression
public static void main(String... args){
^
1 error
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u704858254|p03163|4 | u704858254|p03163|3 | codenet | Compile Error | 671 | |
v2_s860849537 | s860849537 | s860849537 | p03163 | p03163 | u704858254 | u704858254 | 1,578,613,782 | 2020-01-09T23:49:42 | Main.java | import java.util.*;
class Main{
/**
* dp[i] = Maximum value by having exact weight of i
*/
long[] dp = new long[W + 1];
for (int i = 0; i < N; i++) {
dp[i] = -1;
int w = sc.nextInt();
int v = sc.nextInt();
for (int existing_wt = W - w; existing_wt >= 0; existing_wt--) {
dp[existing_wt + w] = M... | Main.java:9: error: illegal start of type
for (int i = 0; i < N; i++) {
^
Main.java:9: error: > or ',' expected
for (int i = 0; i < N; i++) {
^
Main.java:9: error: <identifier> expected
for (int i = 0; i < N; i++) {
^
Main.java:19: error: illegal start of type
... | compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u704858254|p03163|4 | u704858254|p03163|3 | codenet | Compile Error | 655 | |
v2_s226568286 | s226568286 | s226568286 | p03163 | p03163 | u704858254 | u704858254 | 1,578,844,005 | 2020-01-12T15:46:45 | Main.java | import java.util.Scanner;
class Main{
public static void main(String... args){
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int W = sc.nextInt();
int[] dp = new int[W+1];
for(int i = 0; i < N; i++){
int weight = sc.nextInt();
int value = sc.nextInt();
... | Main.java:22: error: cannot find symbol
for(i = 0; i <= W; i++){
^
symbol: variable i
location: class Main
Main.java:22: error: cannot find symbol
for(i = 0; i <= W; i++){
^
symbol: variable i
location: class Main
Main.java:22: error: cannot find symbol
for(i = 0... | compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u704858254|p03163|5 | u704858254|p03163|4 | codenet | Compile Error | 659 | |
v2_s178261705 | s178261705 | s178261705 | p03163 | p03163 | u742526194 | u742526194 | 1,588,392,036 | 2020-05-02T04:00:36 | Main.java |
※ Your source cod import java.util.*;
import java.io.*;
public class Main {
static int n,wi[],W;
static long dp[][],vi[];
public static void main(String[] args) throws IOException{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
int t=1;
// Integer.parseInt(br.readLine().trim())... | Main.java:2: error: illegal character: '\u203b'
? Your source cod import java.util.*;
^
Main.java:2: error: class, interface, enum, or record expected
? Your source cod import java.util.*;
^
Main.java:3: error: class, interface, enum, or record expected
import java.io.*;
^
3 errors
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u742526194|p03163|1 | u742526194|p03163|0 | codenet | Compile Error | 1,238 | |
v2_s936667200 | s936667200 | s936667200 | p03163 | p03163 | u804375030 | u804375030 | 1,586,439,530 | 2020-04-09T13:38:50 | Main.java | class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt(), w = sc.nextInt();
int[] ws = new int[n];
long[] vs = new long[n];
long[][] dp = new long[n][w + 1];
for (int i = 0; i < n; i++) {
ws[i] = sc.n... | Main.java:3: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:3: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u804375030|p03163|4 | u804375030|p03163|3 | codenet | Compile Error | 857 | |
v2_s807150451 | s807150451 | s807150451 | p03163 | p03163 | u816631826 | u816631826 | 1,595,141,634 | 2020-07-19T06:53:54 | Main.java | package Knapsack;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;
protected class Knapsack {
static int n;
static int w;
static int[] value;
static int[] weight;
static long[][] dp;... | Main.java:10: error: modifier protected not allowed here
protected class Knapsack {
^
1 error
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u816631826|p03163|14 | u816631826|p03163|10 | codenet | Compile Error | 1,366 | |
v2_s044590403 | s044590403 | s044590403 | p03163 | p03163 | u817596860 | u817596860 | 1,586,990,893 | 2020-04-15T22:48:13 | Main.java | import java.util.Scanner;
public class Main {
public static void main(String args[]) {
Scanner kb = new Scanner(System.in);
int numitems = kb.nextInt(), maxw = kb.nextInt();
int[] v = new int[numitems];
int[] w = new int[numitems];
for(int i = 0; i < numitems; i++) {
w[i] = kb.nextInt();
v[i]... | Main.java:2: error: illegal character: '\u200b'
?
^
1 error
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u817596860|p03163|1 | u817596860|p03163|1 | codenet | Compile Error | 764 | |
v2_s617509762 | s617509762 | s617509762 | p03163 | p03163 | u844738948 | u844738948 | 1,594,587,875 | 2020-07-12T21:04:35 | Main.java | import java.util.*;
class Main
{
public static void main(String args[])
{
Scanner in=new Scanner(System.in);
int t,n,i,j,l;
t=in.nextInt();
while(t--!=0)
{
n=in.nextInt();
l=in.nextInt();
int w[]=new int[n];
int v[]=new int[n];
int p[][]=new int[n+1][l+1] ;
for(i=0;i<n;i++)
... | Main.java:30: error: cannot find symbol
ghkll ob=new ghkll();
^
symbol: class ghkll
location: class Main
Main.java:30: error: cannot find symbol
ghkll ob=new ghkll();
^
symbol: class ghkll
location: class Main
2 errors
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u844738948|p03163|0 | u844738948|p03163|0 | codenet | Compile Error | 941 | |
v2_s324158131 | s324158131 | s324158131 | p03163 | p03163 | u863370423 | u863370423 | 1,579,079,152 | 2020-01-15T09:05:52 | Main.java |
import java.io.*;
import java.util.*;
public class Main {
static long[][] dp = new long[105][1000000+5];
public static long f(int[] arr,int[] w,int n,int sum,int W) {
if(n==arr.l... | Main.java:26: error: cannot find symbol
pw.println(f(arr,w,0,0,W));
^
symbol: variable pw
location: class Main
Main.java:27: error: cannot find symbol
pw.flush();
^
symbol: variable pw
location: class Main
Main.java:28: ... | compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u863370423|p03163|2 | u863370423|p03163|2 | codenet | Compile Error | 1,408 | |
v2_s697073420 | s697073420 | s697073420 | p03163 | p03163 | u863370423 | u863370423 | 1,584,574,791 | 2020-03-18T23:39:51 | Main.java |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.StringTokenizer;
static int N, INF = (int) 1e9;
static Long[][] memo;
static int[] values;
static int[] weights;
static Long solve(int idx, int remA) {
if (remA < 0)
r... | Main.java:10: error: class, interface, enum, or record expected
static int N, INF = (int) 1e9;
^
Main.java:11: error: unnamed classes are a preview feature and are disabled by default.
static Long[][] memo;
^
(use --enable-preview to enable unnamed classes)
2 errors
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u863370423|p03163|10 | u863370423|p03163|9 | codenet | Compile Error | 1,230 | |
v2_s299337200 | s299337200 | s299337200 | p03163 | p03163 | u875818555 | u875818555 | 1,594,914,314 | 2020-07-16T15:45:14 | Main.java | import java.util.*;
import java.io.*;
public class Main{
public static void main(String[] args) throws IOException{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String[] s = br.readLine().split(" ");
int n = Integer.parseInt(s[0]);
int W = Integer.parseInt(s[1]);
long... | Main.java:24: error: incompatible types: possible lossy conversion from long to int
dp[i][j] = Math.max(dp[i-1][j], val[i-1] + dp[i-1][j-wt[i-1]]);
^
1 error
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u875818555|p03163|0 | u875818555|p03163|0 | codenet | Compile Error | 952 | |
v2_s644380507 | s644380507 | s644380507 | p03163 | p03163 | u901677550 | u901677550 | 1,586,981,082 | 2020-04-15T20:04:42 | Main.java | import java.util.*;
public class Main{
public static void main(String[] args){
Scanner s=new Scanner(System.in);
int n=s.nextInt();
int w=s.nextInt();
int[] weights=new int[n];
int[] value=new int[n];
for(int i=0;i<n;i++){
weights[i]=s.nextInt();
value[i]=s.nextInt();
}
int... | Main.java:25: error: reached end of file while parsing
}
^
1 error
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u901677550|p03163|0 | u901677550|p03163|0 | codenet | Compile Error | 657 | |
v2_s978795767 | s978795767 | s978795767 | p03163 | p03163 | u916055599 | u916055599 | 1,595,094,780 | 2020-07-18T17:53:00 | Main.java | import java.io.*;
import java.util.*;
public class Main{
/*public int minRec(int a[],int dp[],int i,int j)
{
if(i==n && j==n)
return dp[n][n];
if(
return Math.min( Math.abs(a[]
}*/
public static void main(String args[]) throws IOException{
Scanner sc = new Scanner(System.i... | Main.java:44: error: cannot find symbol
return Math.max(v[pos]+ maxSum(wt, v, W-wr[pos], pos+1), maxSum(wt, v, W, pos+1));
^
symbol: variable wr
location: class Main
1 error
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u916055599|p03163|0 | u916055599|p03163|0 | codenet | Compile Error | 1,136 | |
v2_s790365864 | s790365864 | s790365864 | p03163 | p03163 | u916055599 | u916055599 | 1,595,095,554 | 2020-07-18T18:05:54 | Main.java | import java.io.*;
import java.util.*;
public class Main{
/*public int minRec(int a[],int dp[],int i,int j)
{
if(i==n && j==n)
return dp[n][n];
if(
return Math.min( Math.abs(a[]
}*/
public static void main(String args[]) throws IOException{
Scanner sc = new Scanner(System.i... | Main.java:46: error: method maxSum in class Main cannot be applied to given types;
return dp[pos][W] = maxSum(wt, v, W, pos+1);
^
required: int[],int[],int,int,int[][]
found: int[],int[],int,int
reason: actual and formal argument lists differ in length
Main.java:48: error: metho... | compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u916055599|p03163|0 | u916055599|p03163|0 | codenet | Compile Error | 1,235 | |
v2_s074285229 | s074285229 | s074285229 | p03163 | p03163 | u916055599 | u916055599 | 1,595,095,867 | 2020-07-18T18:11:07 | Main.java | import java.io.*;
import java.util.*;
public class Main{
/*public int minRec(int a[],int dp[],int i,int j)
{
if(i==n && j==n)
return dp[n][n];
if(
return Math.min( Math.abs(a[]
}*/
public static void main(String args[]) throws IOException{
Scanner sc = new Scanner(System.i... | Main.java:46: error: incompatible types: possible lossy conversion from long to int
return dp[pos][W] = maxSum(wt, v, W, pos+1, dp);
^
Main.java:48: error: incompatible types: possible lossy conversion from long to int
return dp[pos][W] = Math.max(v[pos]+ maxSum(wt, v, W-wt[pos... | compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u916055599|p03163|0 | u916055599|p03163|0 | codenet | Compile Error | 1,248 | |
v2_s994497748 | s994497748 | s994497748 | p03163 | p03163 | u916055599 | u916055599 | 1,595,095,917 | 2020-07-18T18:11:57 | Main.java | import java.io.*;
import java.util.*;
public class Main{
/*public int minRec(int a[],int dp[],int i,int j)
{
if(i==n && j==n)
return dp[n][n];
if(
return Math.min( Math.abs(a[]
}*/
public static void main(String args[]) throws IOException{
Scanner sc = new Scanner(System.i... | Main.java:28: error: incompatible types: long[][] cannot be converted to int[][]
System.out.println(maxSum(w, v, W, 0, dp));
^
Main.java:46: error: incompatible types: possible lossy conversion from long to int
return dp[pos][W] = maxSum(wt, v, W, pos+1, dp);
... | compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u916055599|p03163|0 | u916055599|p03163|0 | codenet | Compile Error | 1,250 | |
v2_s405930946 | s405930946 | s405930946 | p03163 | p03163 | u947911678 | u947911678 | 1,594,854,893 | 2020-07-15T23:14:53 | Main.java | import java.util.*;
import java.io.*;
class Item {
int weight, val;
public Item(int weight, int val) {
this.weight = weight;
this.val = val;
}
}
public class Main {
public static void main(String[] args) {
Main answer = new Main();
System.out.println(answer.solve());
}
private long solve() {
Scanne... | Main.java:55: error: reached end of file while parsing
}
^
1 error
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u947911678|p03163|1 | u947911678|p03163|1 | codenet | Compile Error | 1,110 | |
v2_s776656390 | s776656390 | s776656390 | p03163 | p03163 | u963939864 | u963939864 | 1,588,252,656 | 2020-04-30T13:17:36 | Main.java | import java.io.*;
import java.util.*;
class Main {
public static long maxVal(int n, int w, int wi[], int vi[]) {
long dp[][] = new long[n+1][w+1];
for (int i = 0 ; i <= w ; ++i) {
dp[0][i] = 0;
}
for (int i = 1 ; i <= n ; ++i) {
dp[i][0] = 0;
}
... | Main.java:36: error: variable i is already defined in method main(String[])
for (int i = 0 ; i < n ; ++i) {
^
1 error
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u963939864|p03163|0 | u963939864|p03163|0 | codenet | Compile Error | 1,272 | |
v2_s129470112 | s129470112 | s129470112 | p03163 | p03163 | u963939864 | u963939864 | 1,588,252,700 | 2020-04-30T13:18:20 | Main.java | import java.io.*;
import java.util.*;
class Main {
public static long maxVal(int n, int w, int wi[], int vi[]) {
long dp[][] = new long[n+1][w+1];
for (int i = 0 ; i <= w ; ++i) {
dp[0][i] = 0;
}
for (int i = 1 ; i <= n ; ++i) {
dp[i][0] = 0;
}
... | Main.java:30: error: unreported exception IOException; must be caught or declared to be thrown
String nw[] = br.readLine().split(" ");
^
Main.java:37: error: unreported exception IOException; must be caught or declared to be thrown
String in[] = br.readLine().split(" ");... | compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u963939864|p03163|0 | u963939864|p03163|0 | codenet | Compile Error | 1,262 | |
v2_s488043800 | s488043800 | s488043800 | p03163 | p03163 | u964879860 | u964879860 | 1,592,050,172 | 2020-06-13T12:09:32 | Main.java | import java.util.*;
class Main{
public static int knapsack(long[] wt,long[] val,int w,int n)
{
int[][] t = new int[n+1][w+1];
for(int i=0;i<n+1;i++)
{
for(int j=0;j<w+1;j++)
{
if(i==0||j==0)
t[i][j]=0;
}
}
for(int i=1;i<n+1;i++)
{
for(int j=1;j<... | Main.java:20: error: incompatible types: possible lossy conversion from long to int
t[i][j]=Math.max(val[i-1]+t[i-1][j-wt[i-1]],t[i-1][j]);
^
Main.java:20: error: incompatible types: possible lossy conversion from long to int
t[i][j]=Math.max(val[i-1]+t[i-... | compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u964879860|p03163|0 | u964879860|p03163|0 | codenet | Compile Error | 838 | |
v2_s613289621 | s613289621 | s613289621 | p03163 | p03163 | u964879860 | u964879860 | 1,592,050,290 | 2020-06-13T12:11:30 | Main.java | import java.util.*;
class Main{
public static long knapsack(long[] wt,long[] val,int w,int n)
{
long[][] t = new long[n+1][w+1];
for(int i=0;i<n+1;i++)
{
for(int j=0;j<w+1;j++)
{
if(i==0||j==0)
t[i][j]=0;
}
}
for(long i=1;i<n+1;i++)
{
for(long j... | Main.java:19: error: incompatible types: possible lossy conversion from long to int
if(wt[i-1]<=j)
^
Main.java:20: error: incompatible types: possible lossy conversion from long to int
t[i][j]=Math.max(val[i-1]+t[i-1][j-wt[i-1]],t[i-1][j]);
^
Main.java:20: error: incompatibl... | compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u964879860|p03163|0 | u964879860|p03163|0 | codenet | Compile Error | 843 | |
v2_s779012128 | s779012128 | s779012128 | p03163 | p03163 | u964879860 | u964879860 | 1,592,050,778 | 2020-06-13T12:19:38 | Main.java | import java.util.*;
class Main{
public static long knapsack(long[] wt,long[] val,int w,int n)
{
long[][] t = new ilong[n+1][w+1];
for(int i=0;i<n+1;i++)
{
for(int j=0;j<w+1;j++)
{
if(i==0||j==0)
t[i][j]=0;
}
}
for(int i=1;i<n+1;i++)
{
for(int j=... | Main.java:5: error: cannot find symbol
long[][] t = new ilong[n+1][w+1];
^
symbol: class ilong
location: class Main
Main.java:20: error: incompatible types: possible lossy conversion from long to int
t[i][j]=Math.max(val[i-1]+t[i-1][j-wt[i-1]],t[i-1][j]);
... | compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u964879860|p03163|0 | u964879860|p03163|0 | codenet | Compile Error | 836 | |
v2_s184609925 | s184609925 | s184609925 | p03163 | p03163 | u970592358 | u970592358 | 1,568,304,267 | 2019-09-12T16:04:27 | Main.java | import java.util.*;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int w = sc.nextInt();
long dp = new long[w+1];
dp[0] = 0;
int wt[] = new int[n];
int v[] = new int[n];
long ans = 0;
for (int i=0; i<n; i++) {
... | Main.java:8: error: incompatible types: long[] cannot be converted to long
long dp = new long[w+1];
^
Main.java:9: error: array required, but long found
dp[0] = 0;
^
Main.java:15: error: array required, but long found
dp[W] = Math.max(dp[W], dp[W-wt[i]] + v[i]);
^
Main.java... | compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u970592358|p03163|0 | u970592358|p03163|0 | codenet | Compile Error | 491 | |
v2_s787289664 | s787289664 | s787289664 | p03163 | p03163 | u997385790 | u997385790 | 1,583,840,879 | 2020-03-10T11:47:59 | Main.java | import java.util.*;
public class Main{
public static void main(String[] args) {
Scanner s = new Scanner(new BufferedInputStream(System.in));
int N = s.nextInt();
int W = s.nextInt();
int[] wg = new int[N];
int[] v = new int[N];
int[][] dp = new int[N][W+1];
... | Main.java:8: error: cannot find symbol
Scanner s = new Scanner(new BufferedInputStream(System.in));
^
symbol: class BufferedInputStream
location: class Main
1 error
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u997385790|p03163|0 | u997385790|p03163|0 | codenet | Compile Error | 933 | |
v2_s380171161 | s380171161 | s380171161 | p03163 | p03163 | u997385790 | u997385790 | 1,583,841,756 | 2020-03-10T12:02:36 | Main.java | import java.util.*;
public class Main{
public static void main(String[] args) {
Scanner s = new Scanner(new BufferedInputStream(System.in));
int N = s.nextInt();
int W = s.nextInt();
int[] wg = new int[N];
int[] v = new int[N];
int[][] dp = new int[N][W+1];
... | Main.java:8: error: cannot find symbol
Scanner s = new Scanner(new BufferedInputStream(System.in));
^
symbol: class BufferedInputStream
location: class Main
1 error
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u997385790|p03163|0 | u997385790|p03163|0 | codenet | Compile Error | 933 | |
v2_s122399758 | s122399758 | s122399758 | p03164 | p03164 | u001533689 | u001533689 | 1,585,572,936 | 2020-03-30T12:55:36 | Main.java | public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int W = sc.nextInt();
int[] w = new int[N];
int[] v = new int[N];
for (int i = 0; i < N; i++) {
w[i] = sc.nextInt();
v[i] ... | Main.java:4: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:4: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u001533689|p03164|0 | u001533689|p03164|0 | codenet | Compile Error | 1,179 | |
v2_s278520693 | s278520693 | s278520693 | p03164 | p03164 | u012823956 | u012823956 | 1,578,260,278 | 2020-01-05T21:37:58 | Main.java |
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
class Solution {
private int N;
private int W;
private List<Integer> w;
private List<Integer> v;
public int calculate(int weight, List<Integer> w, List<Integer> v) {
W = weight;
this.v = v;
this... | Main.java:45: error: no suitable method found for calculate(no arguments)
int result = s.calculate();
^
method Solution.calculate(int,List<Integer>,List<Integer>) is not applicable
(actual and formal argument lists differ in length)
method Solution.calculate(int,int) is not a... | compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u012823956|p03164|0 | u012823956|p03164|0 | codenet | Compile Error | 1,169 | |
v2_s389385015 | s389385015 | s389385015 | p03164 | p03164 | u051402580 | u051402580 | 1,589,311,739 | 2020-05-12T19:28:59 | Main.java | import java.util.Scanner;
import java.util.*;
public class Main {
public static long KnapsackM(long weight[] , long value[] ,long mw,long n) {
long dp[][] = new long[n+1][mw+1];
for(long i=0;i<=n;i++) {
for(long w=0;w<=mw;w++) {
if(i==0 || w==0) {
dp[i][w] = 0;
}else if(weight[i-1] <= w) {... | Main.java:8: error: incompatible types: possible lossy conversion from long to int
long dp[][] = new long[n+1][mw+1];
^
Main.java:8: error: incompatible types: possible lossy conversion from long to int
long dp[][] = new long[n+1][mw+1];
^
Main.java:13: erro... | compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u051402580|p03164|0 | u051402580|p03164|0 | codenet | Compile Error | 998 | |
v2_s061379007 | s061379007 | s061379007 | p03164 | p03164 | u058653484 | u058653484 | 1,598,973,051 | 2020-09-01T15:10:51 | Main.java | /* package codechef; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
public class Main
{
public static int minCost(int []w , int []v , int curr_ind , int n , int [][]dp , int k_w){
if(curr_ind... | Main.java:16: error: incompatible types: possible lossy conversion from long to int
int a = Long.MIN_VALUE;
^
1 error
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u058653484|p03164|0 | u058653484|p03164|0 | codenet | Compile Error | 1,772 | |
v2_s852745380 | s852745380 | s852745380 | p03164 | p03164 | u068098242 | u068098242 | 1,551,792,077 | 2019-03-05T13:21:17 | Main.java | import java.util.*;
public class Main
{
static long oo = (long)1e18;
public static void main(String[] args)
{
Scanner in = new Scanner(System.in);
int n = in.nextInt();
int w = in.nextInt();
long[] W = new long[n];
int[] V = new int[n];
for (int i = 0; i < n; i++)
{
W[i] = in.nextL... | Main.java:19: error: incompatible types: int[] cannot be converted to long[]
long[] min = new int[1000*100+1];
^
1 error
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u068098242|p03164|0 | u068098242|p03164|0 | codenet | Compile Error | 756 | |
v2_s272520130 | s272520130 | s272520130 | p03164 | p03164 | u203304947 | u203304947 | 1,588,099,407 | 2020-04-28T18:43:27 | Main.java |
import java.util.Scanner;
public class Main{
public static void main(String[] args)
{
Scanner s=new Scanner(System.in);
int n=s.nextInt();
long totalWt=s.nextLong();
long wt[]=new long[n];
long profit[]=new long[n];
for(int i=0;i<n;i++ )
{
wt[i]=s.nextLong();
profi... | Main.java:21: error: incompatible types: possible lossy conversion from long to int
long dp[][]=new long[n][totalWt+1];
^
Main.java:28: error: incompatible types: possible lossy conversion from long to int
dp[0][i]=profit[0];
^
Main.java:36: error: incompatible typ... | compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u203304947|p03164|0 | u203304947|p03164|0 | codenet | Compile Error | 874 | |
v2_s317677695 | s317677695 | s317677695 | p03164 | p03164 | u219029557 | u219029557 | 1,568,245,934 | 2019-09-11T23:52:14 | Main.java | import java.util.HashMap;
import java.util.Scanner;
public class Main {
// static long[][] dp;
static Map<Data,Long> ddp = new TreeMap();
static long max(long a, long b){
if(a > b)
return a;
return b;
}
static long calculate(int[][] arr, int pos, int currentWeigth){
... | Main.java:8: error: cannot find symbol
static Map<Data,Long> ddp = new TreeMap();
^
symbol: class Map
location: class Main
Main.java:8: error: cannot find symbol
static Map<Data,Long> ddp = new TreeMap();
^
symbol: class TreeMap
location: class Main
2 e... | compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u219029557|p03164|0 | u219029557|p03164|0 | codenet | Compile Error | 1,483 | |
v2_s303381493 | s303381493 | s303381493 | p03164 | p03164 | u275481897 | u275481897 | 1,596,996,697 | 2020-08-09T18:11:37 | knapsack1bottomup.java | import java.util.*;
public class knapsack1bottomup {
public static void main(String args[]){
Scanner sc=new Scanner(System.in);
int n=sc.nextInt();
int w=sc.nextInt();
long value[]=new long[n];
long weight[]=new long[n];
for(int i=0;i<n;i++){
weight[i]=sc.nextLong();
value[i]=sc.nextLong();
}
lon... | knapsack1bottomup.java:35: error: reached end of file while parsing
}
^
1 error
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u275481897|p03164|0 | u275481897|p03164|0 | codenet | Compile Error | 794 | |
v2_s737291108 | s737291108 | s737291108 | p03164 | p03164 | u275481897 | u275481897 | 1,596,998,088 | 2020-08-09T18:34:48 | Main.java | import java.util.*;
public class Main {
public static void main(String args[]){
Scanner sc=new Scanner(System.in);
int n=sc.nextInt();
long w=sc.nextLong();
long value[]=new long[n];
long weight[]=new long[n];
for(int i=0;i<n;i++){
weight[i]=sc.nextLong();
value[i]=sc.nextLong();
}
long dp[][]=ne... | Main.java:29: error: incompatible types: possible lossy conversion from long to int
System.out.println(dp[n][w]);
^
1 error
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u275481897|p03164|0 | u275481897|p03164|0 | codenet | Compile Error | 669 | |
v2_s050339033 | s050339033 | s050339033 | p03164 | p03164 | u314470965 | u314470965 | 1,574,897,042 | 2019-11-27T23:24:02 | Main.java | import java.util.*;
class Main{
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
String[] hiki = scan.nextLine().split(" ");
int n = Integer.parseInt(hiki[0]);
int w = Integer.parseInt(hiki[1]);
int[] weight = new int[n];
int[] value = new int[n];
for(int i =... | Main.java:19: error: array required, but int found
for(int j = 0;j < dp.length[i];j ++){
^
1 error
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u314470965|p03164|0 | u314470965|p03164|0 | codenet | Compile Error | 1,037 | |
v2_s637147211 | s637147211 | s637147211 | p03164 | p03164 | u345932819 | u345932819 | 1,550,344,821 | 2019-02-16T19:20:21 | Main.java |
public static void main(String[] args) {
new Main().solveA();
// new Main().solveB();
// new Main().solveC();
// new Main().solveD();
}
int numN = 0;
int totalWeight = 0;
int[][] wAndV;
int[][] iAndWeight;
private int getValue(int currentI, int nowWeight) {
if (iAndWeight[currentI][nowWeight] != In... | Main.java:2: error: unnamed classes are a preview feature and are disabled by default.
public static void main(String[] args) {
^
(use --enable-preview to enable unnamed classes)
Main.java:61: error: class, interface, enum, or record expected
}
^
2 errors
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u345932819|p03164|0 | u345932819|p03164|0 | codenet | Compile Error | 1,391 | |
v2_s298166142 | s298166142 | s298166142 | p03164 | p03164 | u358612288 | u358612288 | 1,585,326,313 | 2020-03-27T16:25:13 | Main.java | import org.springframework.util.MultiValueMap;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Scanner;
import static java.lang.Math.max;
import static java.lang.Math.min;
public class Main{
public static void main(String[] args) {
Scanner scanner = new Scan... | Main.java:1: error: package org.springframework.util does not exist
import org.springframework.util.MultiValueMap;
^
1 error
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u358612288|p03164|0 | u358612288|p03164|0 | codenet | Compile Error | 1,261 | |
v2_s248605405 | s248605405 | s248605405 | p03164 | p03164 | u391528671 | u391528671 | 1,547,360,445 | 2019-01-13T06:20:45 | Main.java | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int W = sc.nextInt();
int[][] dp = new int[2][W + 1];
int[] w = new int[N];
int[] v = new int[N];
for (int i = 0; i < N; i++) {
w[i] = sc.nextI... | Main.java:22: error: ')' or ',' expected
System.out.println(dp[N % 2][W];
^
1 error
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u391528671|p03164|0 | u391528671|p03164|0 | codenet | Compile Error | 660 | |
v2_s872470693 | s872470693 | s872470693 | p03164 | p03164 | u444726423 | u444726423 | 1,551,322,973 | 2019-02-28T03:02:53 | Main.java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
import java.util.*;
import java.io.*;
/**
*
* @author arvin
*/
public class Main {
static int val[],weight[],dp[][];
... | Main.java:56: error: cannot find symbol
br.close();
^
symbol: variable br
location: class Main
1 error
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u444726423|p03164|0 | u444726423|p03164|0 | codenet | Compile Error | 1,302 | |
v2_s959546042 | s959546042 | s959546042 | p03164 | p03164 | u492107003 | u492107003 | 1,586,056,136 | 2020-04-05T03:08:56 | Main.java | import java.util.*;
class Main{
private static long solver(long[] w, long[] v, int n, int max){
long[][] dp = new long[n + 1][max + 1];
for(long[] row: dp) Arrays.fill(row, 0);
for(int i = 1; i <= n; i++){
for(int j = 1; j <= max; j++){
if(w[i-1] <=... | Main.java:16: error: incompatible types: possible lossy conversion from long to int
int emptyCapacity = j - w[i-1];
^
Main.java:40: error: incompatible types: int[] cannot be converted to long[]
System.out.println(solver(w, v, n, max));
... | compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u492107003|p03164|0 | u492107003|p03164|0 | codenet | Compile Error | 1,066 | |
v2_s901584172 | s901584172 | s901584172 | p03164 | p03164 | u492107003 | u492107003 | 1,586,056,318 | 2020-04-05T03:11:58 | Main.java | import java.util.*;
class Main{
private static int solver(int[] w, int[] v, int n, int max){
int[][] dp = new int[n + 1][max + 1];
for(long[] row: dp) Arrays.fill(row, 0);
for(int i = 1; i <= n; i++){
for(int j = 1; j <= max; j++){
if(w[i-1] <= j) {... | Main.java:9: error: incompatible types: int[] cannot be converted to long[]
for(long[] row: dp) Arrays.fill(row, 0);
^
1 error
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u492107003|p03164|0 | u492107003|p03164|0 | codenet | Compile Error | 1,062 | |
v2_s797563147 | s797563147 | s797563147 | p03164 | p03164 | u492107003 | u492107003 | 1,586,108,342 | 2020-04-05T17:39:02 | Main.java |
class Main{
/**
* https://atcoder.jp/contests/dp/tasks/dp_e
*
* In this question, W <= 10>9 which is aa huge number to have as dp dimension
* instead of maximizing value subject to max weight we minimize weight
* subject to value.
*/
private static int sum(int[] v){
int... | Main.java:23: error: cannot find symbol
itn sumValues = sum(v);
^
symbol: class itn
location: class Main
Main.java:25: error: cannot find symbol
Arrays.fill(dp, Integer.MAX_VALUE);
^
symbol: variable Arrays
location: class Main
Main.java:45: error: incompatible types: possibl... | compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u492107003|p03164|1 | u492107003|p03164|1 | codenet | Compile Error | 1,732 | |
v2_s869619746 | s869619746 | s869619746 | p03164 | p03164 | u532252958 | u532252958 | 1,596,298,895 | 2020-08-01T16:21:35 | Main.java | using namespace std;
int main() {
int n,w,gmax=0;
cin>>n>>w;
vector<int> weights(n,0),values(n,0);
for(int i=0;i<n;i++)
cin>>weights[i]>>values[i];
vector<long long int> dp(100001);
for(int i=0;i<=n;i++)
{
for(int j=0;j<100001;j++)
{
if(j==0)
{
... | Main.java:1: error: class, interface, enum, or record expected
using namespace std;
^
Main.java:5: error: not a statement
cin>>n>>w;
^
Main.java:6: error: not a statement
vector<int> weights(n,0),values(n,0);
^
Main.java:9: error: not a statement
cin>>weights[i]>>values[i];
... | compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u532252958|p03164|0 | u532252958|p03164|0 | codenet | Compile Error | 745 | |
v2_s072539163 | s072539163 | s072539163 | p03164 | p03164 | u575348118 | u575348118 | 1,589,960,898 | 2020-05-20T07:48:18 | Main.java | import java.io.*;
import java.util.*;
class Main {
// Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools (tips: You use the default template now. You can remove this line by using your custom template)
public static void main(String[] args) throws Exception {
final Scanner sc = new S... | Main.java:35: error: incompatible types: possible lossy conversion from long to int
for (int i = V; i >= 0; i--){
^
1 error
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u575348118|p03164|1 | u575348118|p03164|0 | codenet | Compile Error | 1,258 | |
v2_s814711671 | s814711671 | s814711671 | p03164 | p03164 | u582397785 | u582397785 | 1,593,036,553 | 2020-06-24T22:09:13 | Main.java | import java.util.*;
import java.io.*;
class Main{
public static long func(long weight[], long value[], long total, long weightnow, int index, int n, long dp[][] )
{
if(index>=n)
{
return 0;
}
if(dp[index][weightnow]!=-1)
{
return dp[index][... | Main.java:96: error: class, interface, enum, or record expected
}
^
1 error
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u582397785|p03164|0 | u582397785|p03164|0 | codenet | Compile Error | 2,554 | |
v2_s817464183 | s817464183 | s817464183 | p03164 | p03164 | u582397785 | u582397785 | 1,593,036,609 | 2020-06-24T22:10:09 | Main.java | import java.util.*;
import java.io.*;
class Main{
public static long func(long weight[], long value[], long total, long weightnow, int index, int n, long dp[][] )
{
if(index>=n)
{
return 0;
}
if(dp[index][weightnow]!=-1)
{
return dp[i... | Main.java:17: error: incompatible types: possible lossy conversion from long to int
if(dp[index][weightnow]!=-1)
^
Main.java:19: error: incompatible types: possible lossy conversion from long to int
return dp[index][weightnow];
^
Main.java:38: error: inc... | compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u582397785|p03164|0 | u582397785|p03164|0 | codenet | Compile Error | 2,556 | |
v2_s239325143 | s239325143 | s239325143 | p03164 | p03164 | u584924463 | u584924463 | 1,551,186,334 | 2019-02-26T13:05:34 | Main.java | import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int W = sc.nextInt();
int[] w = new int[N];
int[] v = new int[N];
for(in... | Main.java:63: error: reached end of file while parsing
}
^
1 error
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u584924463|p03164|0 | u584924463|p03164|0 | codenet | Compile Error | 1,719 | |
v2_s193828946 | s193828946 | s193828946 | p03164 | p03164 | u584924463 | u584924463 | 1,587,371,829 | 2020-04-20T08:37:09 | Main.java | public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int W = sc.nextInt();
int[] w = new int[N];
int[] v = new int[N];
long[][] dp = new long[N+1][100_001];
for (int i = 0; i < N; i++) {
... | Main.java:4: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:4: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u584924463|p03164|1 | u584924463|p03164|1 | codenet | Compile Error | 1,141 | |
v2_s202556610 | s202556610 | s202556610 | p03164 | p03164 | u656393766 | u656393766 | 1,598,873,209 | 2020-08-31T11:26:49 | Main.java | import java.util.*;
public class Main{
public static void sortbyColumn(long arr[][], int col)
{
// Using built-in sort function Arrays.sort
Arrays.sort(arr, new Comparator<int[]>() {
@Override
// Compare values according to columns
public... | Main.java:6: error: no suitable method found for sort(long[][],<anonymous Comparator<int[]>>)
Arrays.sort(arr, new Comparator<int[]>() {
^
method Arrays.<T#1>sort(T#1[],Comparator<? super T#1>) is not applicable
(inference variable T#1 has incompatible bounds
upper bounds: int[]... | compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u656393766|p03164|0 | u656393766|p03164|0 | codenet | Compile Error | 1,349 | |
v2_s535814302 | s535814302 | s535814302 | p03164 | p03164 | u663195754 | u663195754 | 1,578,271,761 | 2020-01-06T00:49:21 | Main.java | import java.util.*;
public class Main {
public static void main(String args[]) {
Scanner scan = new Scanner(System.in);
int n = scan.nextInt();
int maxWeight = scan.nextInt();
int[] weights = new int[n];
int[] values = new int[n];
for (int i = 0; i < n; i++) {
weights[i] = sca... | Main.java:30: error: cannot find symbol
for (int val = MAX_VALUE - values[k]; value >= 0; value--) {
^
symbol: variable value
location: class Main
Main.java:30: error: cannot find symbol
for (int val = MAX_VALUE - values[k]; value >= 0; value--) {
... | compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u663195754|p03164|0 | u663195754|p03164|0 | codenet | Compile Error | 1,309 | |
v2_s850752596 | s850752596 | s850752596 | p03164 | p03164 | u704858254 | u704858254 | 1,578,507,475 | 2020-01-08T18:17:55 | Main.java | import java.util.Scanner;
class Main{
private static long solve(long[] weight, long[] value, int N, int W) {
if(weight == null || value == null)
return 0;
long[][] T = new long[N][W+1];
if(weight[0] <= W)
T[0][weight[0]] = value[0];
for(int i = 1; i < N; i++) {
for(int w = 1... | Main.java:11: error: incompatible types: possible lossy conversion from long to int
T[0][weight[0]] = value[0];
^
Main.java:16: error: incompatible types: possible lossy conversion from long to int
T[i][w] = Math.max(T[i-1][w], T[i-1][w - weight[i]] + value[i]);
... | compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u704858254|p03164|0 | u704858254|p03164|0 | codenet | Compile Error | 972 | |
v2_s863009109 | s863009109 | s863009109 | p03164 | p03164 | u704858254 | u704858254 | 1,578,507,585 | 2020-01-08T18:19:45 | Main.java | import java.util.Scanner;
class Main{
private static long solve(long[] weight, long[] value, int N, long W) {
if(weight == null || value == null)
return 0;
long[][] T = new long[N][W+1];
if(weight[0] <= W)
T[0][weight[0]] = value[0];
for(int i = 1; i < N; i++) {
for(long w =... | Main.java:8: error: incompatible types: possible lossy conversion from long to int
long[][] T = new long[N][W+1];
^
Main.java:11: error: incompatible types: possible lossy conversion from long to int
T[0][weight[0]] = value[0];
^
Main.java:16: error: incompatible types: p... | compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u704858254|p03164|0 | u704858254|p03164|0 | codenet | Compile Error | 977 | |
v2_s730850004 | s730850004 | s730850004 | p03164 | p03164 | u704858254 | u704858254 | 1,578,846,421 | 2020-01-12T16:27:01 | Main.java | import java.util.Scanner;
class Main{
public static void main(String... args){
final int (int)(10e9 + 7);
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int W = sc.nextInt();
int V = 1000*100;
//dp[i] = minimum weight by having exact value of i.
//since here ... | Main.java:6: error: <identifier> expected
final int (int)(10e9 + 7);
^
Main.java:6: error: not a statement
final int (int)(10e9 + 7);
^
Main.java:6: error: ';' expected
final int (int)(10e9 + 7);
^
3 errors
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u704858254|p03164|2 | u704858254|p03164|1 | codenet | Compile Error | 1,024 | |
v2_s140288336 | s140288336 | s140288336 | p03164 | p03164 | u704858254 | u704858254 | 1,578,846,566 | 2020-01-12T16:29:26 | Main.java | import java.util.Scanner;
class Main{
public static void main(String... args){
final int INF = -(int)(10e9 + 7);
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int W = sc.nextInt();
int V = 1000*100;
//dp[i] = minimum weight by having exact value of i.
//sinc... | Main.java:19: error: cannot find symbol
for(int existing_val = value; existing_value <= V; existing_value++){
^
symbol: variable existing_value
location: class Main
Main.java:19: error: cannot find symbol
for(int existing_val = value; existing_value <= V; exis... | compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u704858254|p03164|2 | u704858254|p03164|1 | codenet | Compile Error | 1,027 | |
v2_s871427923 | s871427923 | s871427923 | p03164 | p03164 | u704858254 | u704858254 | 1,578,847,921 | 2020-01-12T16:52:01 | Main.java | import java.util.Scanner;
class Main{
public static void main(String... args){
final int MINUS_INF = -(int)(10e9 + 7);
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int W = sc.nextInt();
int[] weight = new int[N];
int[] value = new int[N];
int sum_val... | Main.java:49: error: reached end of file while parsing
}
^
1 error
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u704858254|p03164|2 | u704858254|p03164|1 | codenet | Compile Error | 1,370 | |
v2_s044691786 | s044691786 | s044691786 | p03164 | p03164 | u839411334 | u839411334 | 1,582,662,434 | 2020-02-25T20:27:14 | Main.java | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
public class Main {
public static long maxK(int[] weights, int[] values, int W){
int[] dp = new int[W+1];
for (int i = 0; i < weights.length; i++) {
for (int we... | Main.java:14: error: incompatible types: int[] cannot be converted to long[]
return max(dp);
^
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
1 error
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u839411334|p03164|0 | u839411334|p03164|0 | codenet | Compile Error | 1,411 | |
v2_s608786625 | s608786625 | s608786625 | p03164 | p03164 | u859674311 | u859674311 | 1,591,917,507 | 2020-06-11T23:18:27 | Main.java | public class Main {
public static void main(String[] args) throws IOException {
FastScanner fs = new FastScanner();
int noOfIt = fs.nextInt();
int capacity = fs.nextInt();
int w[] = new int[noOfIt];
int[] pr = new int[noOfIt];
for (int i = 0; i < noOfIt; i++) {
w[i] = fs.nextInt();
pr[i] = fs.nextIn... | Main.java:3: error: cannot find symbol
public static void main(String[] args) throws IOException {
^
symbol: class IOException
location: class Main
Main.java:47: error: cannot find symbol
StringTokenizer tok = new StringTokenizer("");
^
symbol: class StringTok... | compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u859674311|p03164|0 | u859674311|p03164|0 | codenet | Compile Error | 1,435 | |
v2_s601100472 | s601100472 | s601100472 | p03164 | p03164 | u861453554 | u861453554 | 1,573,562,271 | 2019-11-12T12:37:51 | Main.java | import java.util.Scanner;
public class Main {
private static long[][] dp;
private static int[] w;
private static int[] v;
public static void main( String[] args ) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
long w1 = sc.nextLong();
dp = new long[n + ... | Main.java:33: error: incompatible types: possible lossy conversion from long to int
System.out.println(nap(n, w1));
^
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
1 error
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u861453554|p03164|1 | u861453554|p03164|1 | codenet | Compile Error | 1,360 | |
v2_s605523683 | s605523683 | s605523683 | p03164 | p03164 | u861453554 | u861453554 | 1,573,562,338 | 2019-11-12T12:38:58 | Main.java | import java.util.Scanner;
public class Main {
private static long[][] dp;
private static int[] w;
private static int[] v;
public static void main( String[] args ) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
long w1 = sc.nextLong();
dp = new long[n + ... | Main.java:38: error: incompatible types: possible lossy conversion from long to int
if (dp[i][j] >= 0)
^
Main.java:39: error: incompatible types: possible lossy conversion from long to int
return dp[i][j];
^
Main.java:53: error: incompatible types: possible... | compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u861453554|p03164|1 | u861453554|p03164|1 | codenet | Compile Error | 1,361 | |
v2_s679124067 | s679124067 | s679124067 | p03164 | p03164 | u875818555 | u875818555 | 1,594,927,443 | 2020-07-16T19:24:03 | Main.java | import java.util.*;
import java.io.*;
public class Main{
public static void main(String[] args) throws IOException{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String[] s = br.readLine().split(" ");
long n = Long.parseLong(s[0]);
long W = Long.parseLong(s[1]);
long[... | Main.java:10: error: incompatible types: possible lossy conversion from long to int
long[] val = new long[n];
^
Main.java:11: error: incompatible types: possible lossy conversion from long to int
long[] wt = new long[n];
^
2 errors
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u875818555|p03164|0 | u875818555|p03164|0 | codenet | Compile Error | 1,077 | |
v2_s702124546 | s702124546 | s702124546 | p03164 | p03164 | u875818555 | u875818555 | 1,594,928,826 | 2020-07-16T19:47:06 | Main.java | import java.util.*;
import java.io.*;
public class Main{
public static void main(String[] args) throws IOException{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String[] s = br.readLine().split(" ");
long n = Long.parseLong(s[0]);
long W = Long.parseLong(s[1]);
long[... | Main.java:12: error: incompatible types: possible lossy conversion from long to int
int maxValue = n*1000;
^
1 error
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u875818555|p03164|0 | u875818555|p03164|0 | codenet | Compile Error | 1,205 | |
v2_s433503325 | s433503325 | s433503325 | p03164 | p03164 | u875818555 | u875818555 | 1,594,982,949 | 2020-07-17T10:49:09 | Main.java | import java.util.*;
import java.io.*;
public class Main{
public static void main(String[] args) throws IOException{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String[] s = br.readLine().split(" ");
int n = Integer.parseInt(s[0]);
int W = Integer.parseInt(s[1]);
long... | Main.java:37: error: incompatible types: possible lossy conversion from long to int
if(dp[n][i]<=W)
^
Main.java:38: error: incompatible types: possible lossy conversion from long to int
max = dp[n][i];
^
2 errors
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u875818555|p03164|1 | u875818555|p03164|1 | codenet | Compile Error | 1,212 | |
v2_s537634386 | s537634386 | s537634386 | p03164 | p03164 | u875818555 | u875818555 | 1,594,983,964 | 2020-07-17T11:06:04 | Main.java | import java.util.*;
import java.io.*;
public class Main{
public static void main(String[] args) throws IOException{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String[] s = br.readLine().split(" ");
int n = Integer.parseInt(s[0]);
int W = Integer.parseInt(s[1]);
long... | Main.java:34: error: incompatible types: possible lossy conversion from long to int
if(dp[i][j]<=W)
^
Main.java:34: error: incompatible types: possible lossy conversion from long to int
if(dp[i][j]<=W)
^
2 errors
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u875818555|p03164|1 | u875818555|p03164|1 | codenet | Compile Error | 1,255 | |
v2_s748715421 | s748715421 | s748715421 | p03164 | p03164 | u885222079 | u885222079 | 1,595,851,069 | 2020-07-27T11:57:49 | Main.java |
import java.util.*;
public class Main{
static Scanner sc = new Scanner(System.in);
public static void main(String[] args){
int size = sc.nextInt();
long maxWeight = sc.nextLong();
long values[] = new long[size];
long weight[] = new long[size];
for(int i=0;i<values.length;i++){
weight[i]=sc.nextLong();
... | Main.java:15: error: incompatible types: possible lossy conversion from long to int
long dp[][] = new long[values.length+1][maxWeight+1];
^
Main.java:20: error: incompatible types: possible lossy conversion from long to int
dp[i][j]=Math.max(dp[i-1][j],dp[i-1][j... | compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u885222079|p03164|0 | u885222079|p03164|0 | codenet | Compile Error | 715 | |
v2_s217039471 | s217039471 | s217039471 | p03164 | p03164 | u947911678 | u947911678 | 1,594,607,822 | 2020-07-13T02:37:02 | Main.java | class Item {
int val;
int weight;
public Item(int weight, int value) {
this.val = value;
this. weight = weight;
}
}
public class Main {
public static void main(String[]abc) {
Main answer = new Main();
long solution = answer.solve();
System.out.println(solution);
}
private void ... | Main.java:13: error: incompatible types: void cannot be converted to long
long solution = answer.solve();
^
Main.java:18: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:18: error: cannot find symbol
Sc... | compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u947911678|p03164|1 | u947911678|p03164|0 | codenet | Compile Error | 1,246 | |
v2_s420270756 | s420270756 | s420270756 | p03164 | p03164 | u947911678 | u947911678 | 1,594,607,952 | 2020-07-13T02:39:12 | Main.java | import java.util.*;
import java.io.*;
class Item {
int val;
int weight;
public Item(int weight, int value) {
this.val = value;
this. weight = weight;
}
}
public class Main {
public static void main(String[]abc) {
Main answer = new Main();
long solution = answer.solve();
System.out.pr... | Main.java:16: error: incompatible types: void cannot be converted to long
long solution = answer.solve();
^
Main.java:30: error: incompatible types: possible lossy conversion from long to int
dp[1][i]= INF;
^
Main.java:41: error: cannot find symbol
i... | compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u947911678|p03164|1 | u947911678|p03164|0 | codenet | Compile Error | 1,326 | |
v2_s300959756 | s300959756 | s300959756 | p03164 | p03164 | u947911678 | u947911678 | 1,594,608,025 | 2020-07-13T02:40:25 | Main.java | import java.util.*;
import java.io.*;
class Item {
int val;
int weight;
public Item(int weight, int value) {
this.val = value;
this. weight = weight;
}
}
public class Main {
public static void main(String[]abc) {
Main answer = new Main();
long solution = answer.solve();
System.out.pr... | Main.java:27: error: incompatible types: int[][] cannot be converted to long[][]
long [][] dp = new int[N+1][maxValue];
^
1 error
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u947911678|p03164|1 | u947911678|p03164|0 | codenet | Compile Error | 1,289 | |
v2_s208313809 | s208313809 | s208313809 | p03164 | p03164 | u947911678 | u947911678 | 1,594,622,864 | 2020-07-13T06:47:44 | Main.java | import java.util.*;
import java.io.*;
class Item {
int weight, val;
public Item(int weight, int val) {
this.weight = weight;
this.val = val;
}
}
public class Main {
public static void main(String []abc) {
Main sol = new Main();
long answer=sol.solve();
System.out.println(answer... | Main.java:46: error: incompatible types: possible lossy conversion from long to int
if (dp[N][i]<=maxWeight) bestVal = Math.max(bestVal, dp[N][i]);
^
1 error
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u947911678|p03164|2 | u947911678|p03164|0 | codenet | Compile Error | 1,269 | |
v2_s334392509 | s334392509 | s334392509 | p03164 | p03164 | u947911678 | u947911678 | 1,594,759,466 | 2020-07-14T20:44:26 | Main.java | import java.util.*;
import java.io.*;
class Item{
long val, weight;
public Item(long weight, long val){
this.weight = weight;
this.val = val;
}
}
public class Main {
public static void main(String[]abc) {
Main ans = new Main();
long solution = ans.solve();
System.out.print... | Main.java:28: error: ';' expected
long [][] dp = new long[N+1][maxValue+1]
^
1 error
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u947911678|p03164|3 | u947911678|p03164|1 | codenet | Compile Error | 1,345 | |
v2_s349703465 | s349703465 | s349703465 | p03164 | p03164 | u947911678 | u947911678 | 1,594,759,495 | 2020-07-14T20:44:55 | Main.java | import java.util.*;
import java.io.*;
class Item{
long val, weight;
public Item(long weight, long val){
this.weight = weight;
this.val = val;
}
}
public class Main {
public static void main(String[]abc) {
Main ans = new Main();
long solution = ans.solve();
System.out.print... | Main.java:24: error: incompatible types: possible lossy conversion from long to int
Item [] array = new Item[N];
^
Main.java:28: error: incompatible types: possible lossy conversion from long to int
long [][] dp = new long[N+1][maxValue+1];
^
Mai... | compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u947911678|p03164|3 | u947911678|p03164|1 | codenet | Compile Error | 1,347 | |
v2_s594233057 | s594233057 | s594233057 | p03164 | p03164 | u947911678 | u947911678 | 1,594,759,542 | 2020-07-14T20:45:42 | Main.java | import java.util.*;
import java.io.*;
class Item{
long val, weight;
public Item(long weight, long val){
this.weight = weight;
this.val = val;
}
}
public class Main {
public static void main(String[]abc) {
Main ans = new Main();
long solution = ans.solve();
System.out.print... | Main.java:21: error: incompatible types: possible lossy conversion from long to int
int maxWeight = sc.nextLong();
^
Main.java:24: error: incompatible types: possible lossy conversion from long to int
Item [] array = new Item[N];
^
Main.java:28... | compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u947911678|p03164|3 | u947911678|p03164|1 | codenet | Compile Error | 1,346 | |
v2_s182449021 | s182449021 | s182449021 | p03164 | p03164 | u947911678 | u947911678 | 1,594,759,615 | 2020-07-14T20:46:55 | Main.java | import java.util.*;
import java.io.*;
class Item{
long val, weight;
public Item(long weight, long val){
this.weight = weight;
this.val = val;
}
}
public class Main {
public static void main(String[]abc) {
Main ans = new Main();
long solution = ans.solve();
System.out.print... | Main.java:20: error: incompatible types: possible lossy conversion from long to int
int N = sc.nextLong();
^
Main.java:28: error: incompatible types: possible lossy conversion from long to int
long [][] dp = new long[N+1][maxValue+1];
^
Mai... | compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u947911678|p03164|3 | u947911678|p03164|1 | codenet | Compile Error | 1,351 | |
v2_s531852899 | s531852899 | s531852899 | p03164 | p03164 | u947911678 | u947911678 | 1,594,760,331 | 2020-07-14T20:58:51 | Main.java | import java.util.*;
import java.io.*;
class Item{
long val, weight;
public Item(long weight, long val){
this.weight = weight;
this.val = val;
}
}
public class Main {
public static void main(String[]abc) {
Main ans = new Main();
long solution = ans.solve();
System.out.print... | Main.java:23: error: cannot find symbol
ing maxValue = N*1000;
^
symbol: class ing
location: class Main
Main.java:33: error: incompatible types: possible lossy conversion from long to int
dp[1][array[0].val]= array[0].weight;
^
Main.java:39: error: incompatible types: possibl... | compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u947911678|p03164|3 | u947911678|p03164|1 | codenet | Compile Error | 1,342 | |
v2_s431447492 | s431447492 | s431447492 | p03164 | p03164 | u947911678 | u947911678 | 1,594,760,449 | 2020-07-14T21:00:49 | Main.java | import java.util.*;
import java.io.*;
class Item{
long val, weight;
public Item(long weight, long val){
this.weight = weight;
this.val = val;
}
}
public class Main {
public static void main(String[]abc) {
Main ans = new Main();
long solution = ans.solve();
System.out.print... | Main.java:20: error: incompatible types: possible lossy conversion from long to int
int N = sc.nextLong();
^
Main.java:33: error: incompatible types: possible lossy conversion from long to int
dp[1][array[0].val]= array[0].weight;
^
Main.java:37: error: incompati... | compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u947911678|p03164|3 | u947911678|p03164|1 | codenet | Compile Error | 1,359 | |
v2_s835880016 | s835880016 | s835880016 | p03164 | p03164 | u947911678 | u947911678 | 1,594,760,577 | 2020-07-14T21:02:57 | Main.java | import java.util.*;
import java.io.*;
class Item{
long val, weight;
public Item(long weight, long val){
this.weight = weight;
this.val = val;
}
}
public class Main {
public static void main(String[]abc) {
Main ans = new Main();
long solution = ans.solve();
System.out.print... | Main.java:33: error: incompatible types: possible lossy conversion from long to int
dp[1][array[0].val]= array[0].weight;
^
Main.java:39: error: incompatible types: possible lossy conversion from long to int
dp[i][val] = Math.min(dp[i][val], dp[i-1][val-array[i].val]);
... | compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u947911678|p03164|3 | u947911678|p03164|1 | codenet | Compile Error | 1,344 | |
v2_s359627814 | s359627814 | s359627814 | p03164 | p03164 | u947911678 | u947911678 | 1,594,760,868 | 2020-07-14T21:07:48 | Main.java | import java.util.*;
import java.io.*;
class Item{
int val, weight;
public Item(int weight, int val){
this.weight = weight;
this.val = val;
}
}
public class Main {
public static void main(String[]abc) {
Main ans = new Main();
long solution = ans.solve();
System.out.println(... | Main.java:45: error: cannot find symbol
bestVal = Math.max(bestVal, i);
^
symbol: variable i
location: class Main
1 error
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u947911678|p03164|3 | u947911678|p03164|1 | codenet | Compile Error | 1,346 | |
v2_s918532660 | s918532660 | s918532660 | p03164 | p03164 | u970592358 | u970592358 | 1,568,306,051 | 2019-09-12T16:34:11 | Main.java | import java.util.*;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int w = sc.nextInt();
int sum = 0;
int wt[] = new int[n];
int v[] = new int[n];
for (int i=0; i<n; i++) {
wt[i] = sc.nextInt();
v[i] = sc.n... | Main.java:18: error: integer number too large
long inf = 1234567890987;
^
1 error
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u970592358|p03164|0 | u970592358|p03164|0 | codenet | Compile Error | 769 | |
v2_s775980562 | s775980562 | s775980562 | p03165 | p03165 | u051402580 | u051402580 | 1,589,313,323 | 2020-05-12T19:55:23 | Main.java | import java.util.Scanner;
import java.util.*;
public class Main {
public static int LCS_DP(String s , String t) {
int m = s.length();
int n = t.length();
int storage[][] = new int[m+1][n+1];
storage[0][0] = 0;
for (int i=0; i<=n; i++) {
storage[0][i] = 0;
}
for (int j=0; j<=m; j++) {
storage[j][0... | Main.java:33: error: variable s is already defined in method main(String[])
String s = s.next();
^
Main.java:33: error: cannot find symbol
String s = s.next();
^
symbol: method next()
location: variable s of type String
Main.java:34: error: cannot find symbol
String t = s.next... | compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u051402580|p03165|0 | u051402580|p03165|0 | codenet | Compile Error | 765 | |
v2_s475296600 | s475296600 | s475296600 | p03165 | p03165 | u089230684 | u089230684 | 1,585,981,291 | 2020-04-04T06:21:31 | Main.java | import java.io.IOException;
public class Main{
public static void main(String[] args) throws IOException {
Scanner sc = new Scanner(System.in);
String xx = sc.next();
String yy = sc.next();
char[] x = xx.toCharArray();
char[] y = yy.toCharArray();
int[][] L = new int[x.length + 1][y.length + 1];
for (... | Main.java:6: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:6: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
| compile_error | 1 | OpenJDK 21.0.12.1 | unlabelled | 2.1 | u089230684|p03165|6 | u089230684|p03165|6 | codenet | Compile Error | 864 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.