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_s455183833
s455183833
s455183833
p03161
p03161
u786755919
u786755919
1,589,303,762
2020-05-12T17:16:02
Main.java
import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.ArrayList; class Solution {public static void main(String args[]) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer str = new StringTokenizer(br.readLine()); int n = Int...
Main.java:10: error: cannot find symbol StringTokenizer str = new StringTokenizer(br.readLine()); ^ symbol: class StringTokenizer location: class Solution Main.java:10: error: cannot find symbol StringTokenizer str = new StringTokenizer(br.readLine()); ^ symbol: class StringT...
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u786755919|p03161|0
u786755919|p03161|0
codenet
Compile Error
1,005
v2_s521804539
s521804539
s521804539
p03161
p03161
u786755919
u786755919
1,589,303,812
2020-05-12T17:16:52
Main.java
import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.StringTokenizer; class Solution {public static void main(String args[]) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer str = new StringTokeni...
Main.java:19: error: cannot find symbol System.out.println(frog(a,m)); ^ symbol: variable a location: class Solution 1 error
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u786755919|p03161|0
u786755919|p03161|0
codenet
Compile Error
1,038
v2_s075818918
s075818918
s075818918
p03161
p03161
u815784554
u815784554
1,586,414,421
2020-04-09T06:40:21
Main.java
import java.util.*; import java.lang.*; import java.io.*; public final class Main { public static void main (String[] args) throws java.lang.Exception { Scanner in = new Scanner(System.in); int n = in.nextInt(); int[] arr = new int[n]; for(int i =0; i< n; i++) arr[i]= in.next...
Main.java:19: error: ';' expected for(int j =1; j<=k: j++){ ^ Main.java:19: error: ';' expected for(int j =1; j<=k: j++){ ^ 2 errors
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u815784554|p03161|0
u815784554|p03161|0
codenet
Compile Error
711
v2_s032803281
s032803281
s032803281
p03161
p03161
u815784554
u815784554
1,586,414,465
2020-04-09T06:41:05
Main.java
import java.util.*; import java.lang.*; import java.io.*; public final class Main { public static void main (String[] args) throws java.lang.Exception { Scanner in = new Scanner(System.in); int n = in.nextInt(); int[] arr = new int[n]; for(int i =0; i< n; i++) arr[i]= in.next...
Main.java:19: error: cannot find symbol for(int j =1; j<=k;j++){ ^ symbol: variable k location: class Main 1 error
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u815784554|p03161|0
u815784554|p03161|0
codenet
Compile Error
711
v2_s288521485
s288521485
s288521485
p03161
p03161
u844005364
u844005364
1,564,593,844
2019-07-31T17:24:04
Main.java
public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = Integer.parseInt(sc.next()); int k = Integer.parseInt(sc.next()); int[] heights = new int[n]; for (int i = 0; i < n; i++) { heights[i] = Integer.parseInt(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
u844005364|p03161|2
u844005364|p03161|2
codenet
Compile Error
725
v2_s608274410
s608274410
s608274410
p03161
p03161
u844005364
u844005364
1,564,593,889
2019-07-31T17:24:49
Main.java
import java.util.* public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = Integer.parseInt(sc.next()); int k = Integer.parseInt(sc.next()); int[] heights = new int[n]; for (int i = 0; i < n; i++) { heights[i] = I...
Main.java:1: error: ';' expected import java.util.* ^ 1 error
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u844005364|p03161|2
u844005364|p03161|2
codenet
Compile Error
746
v2_s701964566
s701964566
s701964566
p03161
p03161
u861453554
u861453554
1,570,891,714
2019-10-12T14:48:34
Main.java
public class Main { private static int[] dp = null; //https://atcoder.jp/contests/dp/tasks/dp_b public static void main( String[] args ) { Scanner scanner = new Scanner(System.in); int n = scanner.nextInt(); int k = scanner.nextInt(); int[] arr = new int[n]; for (...
Main.java:8: error: cannot find symbol Scanner scanner = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:8: error: cannot find symbol Scanner scanner = new Scanner(System.in); ^ symbol: class Scanner location: class Main Ma...
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u861453554|p03161|0
u861453554|p03161|0
codenet
Compile Error
1,193
v2_s079521094
s079521094
s079521094
p03161
p03161
u861453554
u861453554
1,570,895,505
2019-10-12T15:51:45
Main.java
import java.util.Arrays; import java.util.Scanner; public class Main { private static int[] dp = null; //https://atcoder.jp/contests/dp/tasks/dp_b public static void main( String[] args ) { Scanner scanner = new Scanner(System.in); int n = scanner.nextInt(); int k = scanner.nextI...
Main.java:30: error: cannot find symbol Arrays.fill(dp, INF); ^ symbol: variable INF location: class Main 1 error
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u861453554|p03161|0
u861453554|p03161|0
codenet
Compile Error
1,219
v2_s794241234
s794241234
s794241234
p03161
p03161
u863370423
u863370423
1,574,939,990
2019-11-28T11:19:50
Main.java
#include <iostream> #include <math.h> using namespace std; int menorCusto = 2000000000; int dMax = 0; void geraComb(int posAtual, int qtdCand, int passoMax, int *n, bool vBool[], int v[], int *dMax); void verifSolucao(bool vBool[], int v[], int k, int *n); int main(){ int num; int n; int k; int high; //cin ...
Main.java:1: error: illegal character: '#' #include <iostream> ^ Main.java:2: error: illegal character: '#' #include <math.h> ^ Main.java:6: error: unnamed classes are a preview feature and are disabled by default. int menorCusto = 2000000000; ^ (use --enable-preview to enable unnamed classes) Main.java:9: error: <id...
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u863370423|p03161|1
u863370423|p03161|1
codenet
Compile Error
2,187
v2_s272132098
s272132098
s272132098
p03161
p03161
u863370423
u863370423
1,593,064,653
2020-06-25T05:57:33
Frog2.java
public class Frog2 { static int[]dp = new int[100000]; static int[]stones = new int[100000]; static int N, K; public static void main(String[]args){ Scanner in = new Scanner(System.in); N = in.nextInt(); K = in.nextInt(); for(int i = 0 ; i < N ; ++i) stones[i]...
Frog2.java:6: error: cannot find symbol Scanner in = new Scanner(System.in); ^ symbol: class Scanner location: class Frog2 Frog2.java:6: error: cannot find symbol Scanner in = new Scanner(System.in); ^ symbol: class Scanner location: class Frog2 2 errors
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u863370423|p03161|2
u863370423|p03161|2
codenet
Compile Error
782
v2_s606480187
s606480187
s606480187
p03161
p03161
u916055599
u916055599
1,595,086,540
2020-07-18T15:35:40
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:15: error: cannot find symbol int arr[]=new int[size]; ^ symbol: variable size location: class Main Main.java:16: error: cannot find symbol for(int i=0;i<size;i++) ^ symbol: variable size location: class Main Main.java:19: error: cannot find ...
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u916055599|p03161|0
u916055599|p03161|0
codenet
Compile Error
1,049
v2_s935817923
s935817923
s935817923
p03161
p03161
u947911678
u947911678
1,594,763,444
2020-07-14T21:50:44
Main.java
import java.util.*; import java.io.*; public class Main { public static void main(String[]abc){ Main ans = new Main(); int sol = ans.solve(); System.out.println(sol); } private int solve() { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int K = sc.nextInt...
Main.java:21: error: cannot find symbol Arrays.fill(dp, Integer,MAX_VALUE); ^ symbol: variable Integer location: class Main Main.java:21: error: cannot find symbol Arrays.fill(dp, Integer,MAX_VALUE); ^ symbol: variable MAX_VALUE location: class...
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u947911678|p03161|1
u947911678|p03161|1
codenet
Compile Error
814
v2_s221970097
s221970097
s221970097
p03161
p03161
u949850744
u949850744
1,592,982,104
2020-06-24T07:01:44
Main.java
import java.util.Scanner; import java.lang.Math; class Main{ static int solve(int n, int k, int[] arr){ int[] dp = new int[n]; dp[0] = arr[0]; dp[1] = arr[1]; for(int i = 2; i < n; i++){ int min = dp[i-1] + Math.abs(arr[i-1], arr[i]); for(int j = 1...
Main.java:12: error: no suitable method found for abs(int,int) int min = dp[i-1] + Math.abs(arr[i-1], arr[i]); ^ method Math.abs(int) is not applicable (actual and formal argument lists differ in length) method Math.abs(long) is not applicable (actual and fo...
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u949850744|p03161|0
u949850744|p03161|0
codenet
Compile Error
964
v2_s402370634
s402370634
s402370634
p03161
p03161
u997385790
u997385790
1,583,769,167
2020-03-09T15:52:47
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 k = s.nextInt(); int[] nums = new int[n]; int[] dp = new int[n]; for (int i = 0;i < n;i++) { ...
Main.java:7: 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|p03161|0
u997385790|p03161|0
codenet
Compile Error
769
v2_s452209627
s452209627
s452209627
p03162
p03162
u087075373
u087075373
1,591,832,198
2020-06-10T23:36:38
Main.java
public class Main { public static Scanner scanner = new Scanner(System.in); public static void main(String[] args) { int n = scanner.nextInt(); int dp[][] = new int[n+1][4]; int activity[][] = new int[n+1][4]; for(int i = 1 ; i<=n ; i++){ for(int j = 1 ; j<=3 ; j++){...
Main.java:2: error: cannot find symbol public static Scanner scanner = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:2: error: cannot find symbol public static Scanner scanner = new Scanner(System.in); ^ symbol: ...
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u087075373|p03162|0
u087075373|p03162|0
codenet
Compile Error
967
v2_s509003062
s509003062
s509003062
p03162
p03162
u089230684
u089230684
1,574,975,985
2019-11-28T21:19:45
Main.java
#include<iostream> using namespace std; int main(){ int n; int blockCol; int pts = 0; int p = 0; int aux; scanf("%d", &n); int m[n][3]; for(int i = 0; i < n; i++){ p = 0; for(int j = 0; j < 3; j++){ scanf("%d", &m[i][j]); if(m[i][j] > p && ( i == 0 || (i > 0 && blockCol != j))){ p = m[i][j...
Main.java:1: error: illegal character: '#' #include<iostream> ^ Main.java:1: error: class, interface, enum, or record expected #include<iostream> ^ Main.java:14: error: not a statement int m[n][3]; ^ Main.java:5: error: unnamed classes are a preview feature and are disabled by default. int main(){ ^ (...
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u089230684|p03162|0
u089230684|p03162|0
codenet
Compile Error
400
v2_s863576213
s863576213
s863576213
p03162
p03162
u168621426
u168621426
1,551,025,269
2019-02-24T16:21:09
Main.java
using System; using System.Linq; using System.Collections.Generic; class Cmondai { static void Main() { var N = Int32.Parse(Console.ReadLine()); var dp = new int[N,N]; for (int i=0;i<N;++i) { var line = Console.ReadLine().Split(' ').Select(x => Int32.Parse(x)).ToArra...
Main.java:1: error: unnamed classes are a preview feature and are disabled by default. using System; ^ (use --enable-preview to enable unnamed classes) Main.java:2: error: class, interface, enum, or record expected using System.Linq; ^ Main.java:3: error: class, interface, enum, or record expected using System.Collec...
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u168621426|p03162|0
u168621426|p03162|0
codenet
Compile Error
654
v2_s060779262
s060779262
s060779262
p03162
p03162
u181039779
u181039779
1,560,286,068
2019-06-11T20:47:48
Main.java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.OutputStream; import java.io.PrintWriter; import java.math.BigDecimal; import java.text.DecimalFormat; import java.util.AbstractMap; import java.util.ArrayDeque; import java.util.Array...
Main.java:55: error: incompatible types: int[][] cannot be converted to long[][] long[][] ABC = new int[N][3]; ^ 1 error
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u181039779|p03162|0
u181039779|p03162|0
codenet
Compile Error
9,867
v2_s604255897
s604255897
s604255897
p03162
p03162
u238904265
u238904265
1,583,197,628
2020-03-03T01:07:08
Main.java
package javaapplication9; import java.util.*; import java.io.*; public class Main { // // public static int frog(int arr[], int i, int prev){ // if(i >= arr.length) // return 0; // if(i == arr.length-1) // return Math.abs(arr[prev]- arr[i]); // int a = 0; int b = 0; // if(prev == -1){...
Main.java:72: error: incompatible types: int[][] cannot be converted to long[][] long[][] dp = new int[n+10][n+10]; ^ 1 error
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u238904265|p03162|0
u238904265|p03162|0
codenet
Compile Error
2,601
v2_s574786739
s574786739
s574786739
p03162
p03162
u279388857
u279388857
1,594,031,064
2020-07-06T10:24:24
Main.java
public class Main { public static void main(String args[]) { Scanner scan = new Scanner(System.in); int days = scan.nextInt(); int activites[][] = new int[days+1][4]; for(int i=1;i<=days;i++) { activites[i][1] = scan.nextInt(); activites[i][2] = scan.nextInt(); activites[i][3] = scan.nextInt(); } ...
Main.java:4: error: cannot find symbol Scanner scan = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:4: error: cannot find symbol Scanner scan = new Scanner(System.in); ^ symbol: class Scanner location: class Main 2 errors
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u279388857|p03162|0
u279388857|p03162|0
codenet
Compile Error
1,001
v2_s346669848
s346669848
s346669848
p03162
p03162
u334615307
u334615307
1,588,468,607
2020-05-03T01:16:47
Main.java
import java.util.*; public class Main{ static class tutt{ int a,b,c; tut(int a,int b,int c){ this.a=a; this.b=b; this.c=c; } } static long[][] aa; static long maxx(tutt[] tut,int flag,int ind){ if(ind>=tut.length){return 0;} if(aa[ind][flag]!=-1){return aa[ind][fla...
Main.java:5: error: invalid method declaration; return type required tut(int a,int b,int c){ ^ 1 error
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u334615307|p03162|0
u334615307|p03162|0
codenet
Compile Error
1,538
v2_s508965575
s508965575
s508965575
p03162
p03162
u334615307
u334615307
1,588,468,639
2020-05-03T01:17:19
Main.java
import java.util.*; public class Main{ static class tutt{ int a,b,c; tutt(int a,int b,int c){ this.a=a; this.b=b; this.c=c; } } static long[][] aa; static long maxx(tutt[] tut,int flag,int ind){ if(ind>=tut.length){return 0;} if(aa[ind][flag]!=-1){return aa[ind][fl...
Main.java:42: error: cannot find symbol tutt[] arr=new tut[n]; ^ symbol: class tut location: class Main 1 error
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u334615307|p03162|0
u334615307|p03162|0
codenet
Compile Error
1,539
v2_s859326089
s859326089
s859326089
p03162
p03162
u373595996
u373595996
1,597,378,902
2020-08-14T04:21:42
Main.java
import java.util.*; public class Main { public static void main (String[] args) { Scanner sc = new Scanner(System.in); int t= sc.nextInt(); int[][] arr = new int[t][3]; for(int i =0;i<t;i++){ for(int j =0;j<3;j++){ arr[i][j]= sc.nextInt(); } } ...
Main.java:26: error: ')' or ',' expected System.out.println(Math.max(result[t-1][0],Math.max(result[t-1][1],result[t-1][2])); ^ 1 error
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u373595996|p03162|0
u373595996|p03162|0
codenet
Compile Error
823
v2_s113897705
s113897705
s113897705
p03162
p03162
u391528671
u391528671
1,547,375,556
2019-01-13T10:32:36
Main.java
import java.util.Scanner; public class Main { static int N; static int[][] A; public static void main(String[] args) { Scanner sc = new Scanner(System.in); N = sc.nextInt(); A = new int[N][3]; for (int i = 0; i < N; i++) { for (int j = 0; j < 3; j++) { A[i][j] = sc.nextInt(); }...
Main.java:24: error: missing return statement } ^ 1 error
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u391528671|p03162|0
u391528671|p03162|0
codenet
Compile Error
582
v2_s655165329
s655165329
s655165329
p03162
p03162
u420622981
u420622981
1,589,834,826
2020-05-18T20:47:06
Main.java
import java.util.*; import java.util.function.*; import java.math.*; public class Main { public static void main(String[] args){ Scanner s = new Scanner(System.in); int N = s.nextInt(); int[][] A = new int[N][3]; for(int i = 0; i < N; i++) { A[i][0] = s.nextInt(); A[i][1] = s.nextInt(); A[i][2] = s...
Main.java:28: error: reached end of file while parsing } ^ 1 error
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u420622981|p03162|0
u420622981|p03162|0
codenet
Compile Error
700
v2_s176846911
s176846911
s176846911
p03162
p03162
u471575463
u471575463
1,587,958,490
2020-04-27T03:34:50
force.java
import java.util.*; import java.lang.*; public class force{ public static int Main(int arr[][],int i,int j,int n,int dp[][]){ //Base Case if(i==n-1)return arr[i][j]; if(dp[i][j]!=0)return dp[i][j]; //Recursive Approach int max=0; for(int k=0;k<3;k++){ ...
force.java:13: error: cannot find symbol int op=calc(arr,i+1,k,n,dp)+arr[i][j]; ^ symbol: method calc(int[][],int,int,int,int[][]) location: class force force.java:37: error: cannot find symbol int res=Math.max(calc(arr,0,0,n,dp),Math.max(calc(arr,0,1,n,dp),calc(arr,...
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u471575463|p03162|0
u471575463|p03162|0
codenet
Compile Error
971
v2_s846796403
s846796403
s846796403
p03162
p03162
u492107003
u492107003
1,586,049,420
2020-04-05T01:17:00
Main.java
class Main{ /** * https://atcoder.jp/contests/dp/tasks/dp_c */ public static void main(String[] args) { Scanner in = new Scanner(System.in); int n = in.nextInt(); int[] dp = new int[3]; for(int i = 0; i < n; i++){ int[] temp = new int[3]; ...
Main.java:10: error: cannot find symbol Scanner in = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:10: 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
u492107003|p03162|0
u492107003|p03162|0
codenet
Compile Error
762
v2_s188781599
s188781599
s188781599
p03162
p03162
u498752475
u498752475
1,590,830,764
2020-05-30T09:26:04
Main.java
public Main{ public static void main(String args[]){ Scanner sc=new Scanner(System.in); int m=sc.nextInt(); int arr[][]=new int[m][3]; for(int i=0;i<m;i++){ for(int j=0;j<3;j++){ arr[i][j]=sc.nextInt(); } } int sto[][]=new int[m+1][3]; sto[1][0]=arr[0][0]; sto[1][1]=arr[0][1]; sto[1][2]=arr[...
Main.java:1: error: class, interface, enum, or record expected public Main{ ^ 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:24: error: class, interface, en...
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u498752475|p03162|0
u498752475|p03162|0
codenet
Compile Error
631
v2_s034874801
s034874801
s034874801
p03162
p03162
u498752475
u498752475
1,590,830,835
2020-05-30T09:27:15
Main.java
class Main{ public static void main(String args[]){ Scanner sc=new Scanner(System.in); int m=sc.nextInt(); int arr[][]=new int[m][3]; for(int i=0;i<m;i++){ for(int j=0;j<3;j++){ arr[i][j]=sc.nextInt(); } } int sto[][]=new int[m+1][3]; sto[1][0]=arr[0][0]; sto[1][1]=arr[0][1]; sto[1][2]=arr[0...
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 Main.java:20: error: cannot find symbol int maxi=Math...
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u498752475|p03162|0
u498752475|p03162|0
codenet
Compile Error
631
v2_s637159165
s637159165
s637159165
p03162
p03162
u498752475
u498752475
1,590,830,911
2020-05-30T09:28:31
Main.java
import java.util.*; public Main{ public static void main(String args[]){ Scanner sc=new Scanner(System.in); int m=sc.nextInt(); int arr[][]=new int[m][3]; for(int i=0;i<m;i++){ for(int j=0;j<3;j++){ arr[i][j]=sc.nextInt(); } } int sto[][]=new int[m+1][3]; sto[1][0]=arr[0][0]; sto[1][1]=arr[0][...
Main.java:2: error: class, interface, enum, or record expected public Main{ ^ Main.java:3: 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:25: error: class, interface, en...
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u498752475|p03162|0
u498752475|p03162|0
codenet
Compile Error
652
v2_s224181010
s224181010
s224181010
p03162
p03162
u540491484
u540491484
1,552,915,069
2019-03-18T13:17:49
Main.java
java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.*; public class Main { public static void main(String[] args) { PrintWriter out = new PrintWriter(System.out); InputStreamScanner in = new InputStreamScanner(System.in); new Main().solve(in, out); ...
Main.java:1: error: class, interface, enum, or record expected java.io.IOException; ^ Main.java:2: error: class, interface, enum, or record expected import java.io.InputStream; ^ Main.java:3: error: class, interface, enum, or record expected import java.io.PrintWriter; ^ Main.java:4: error: class, interface, enum, or r...
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u540491484|p03162|0
u540491484|p03162|0
codenet
Compile Error
2,895
v2_s612669724
s612669724
s612669724
p03162
p03162
u540825034
u540825034
1,562,278,463
2019-07-04T22:14:23
Main.java
import java.util.*; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int days = sc.nextInt(); int[][] input = new int[days][3]; for(int i=0; i< days; i++){ input[i][0] = sc.nextInt(); input[i][1] = sc.nextInt(); ...
Main.java:13: error: no suitable method found for min(int) input[j][0] += Math.min(input[j-1][1] + input[j-1][2]); ^ method Math.min(int,int) is not applicable (actual and formal argument lists differ in length) method Math.min(long,long) is not applicable (actua...
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u540825034|p03162|0
u540825034|p03162|0
codenet
Compile Error
737
v2_s449377583
s449377583
s449377583
p03162
p03162
u540825034
u540825034
1,562,278,560
2019-07-04T22:16:00
Main.java
import java.util.*; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int days = sc.nextInt(); int[][] input = new int[days][3]; for(int i=0; i< days; i++){ input[i][0] = sc.nextInt(); input[i][1] = sc.nextInt(); ...
Main.java:21: error: class, interface, enum, or record expected import java.util.*; ^ 1 error
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u540825034|p03162|0
u540825034|p03162|0
codenet
Compile Error
1,476
v2_s335022607
s335022607
s335022607
p03162
p03162
u540825034
u540825034
1,562,278,629
2019-07-04T22:17:09
Main.java
import java.util.*; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int days = sc.nextInt(); int[][] input = new int[days][3]; for(int i=0; i< days; i++){ input[i][0] = sc.nextInt(); input[i][1] = sc.nextInt(); ...
Main.java:18: error: cannot find symbol scanner.close(); ^ symbol: variable scanner location: class Main 1 error
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u540825034|p03162|0
u540825034|p03162|0
codenet
Compile Error
738
v2_s628364582
s628364582
s628364582
p03162
p03162
u563321291
u563321291
1,597,498,078
2020-08-15T13:27:58
Main.java
7 6 7 8 8 8 3 2 5 2 7 8 6 4 6 8 2 3 4 7 5 1
Main.java:1: error: class, interface, enum, or record expected 7 ^ 1 error
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u563321291|p03162|0
u563321291|p03162|0
codenet
Compile Error
43
v2_s078205632
s078205632
s078205632
p03162
p03162
u584924463
u584924463
1,548,653,242
2019-01-28T05:27:22
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[][] hap= new int[N][3]; for(int i=0;i<N;i++){ hap[i][0] = sc.nextInt(); hap[i][1] = sc.nextInt(); ...
Main.java:52: error: cannot find symbol System.out.println(Arrays.toString(dp[1])); ^ symbol: variable Arrays location: class Main 1 error
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u584924463|p03162|0
u584924463|p03162|0
codenet
Compile Error
1,538
v2_s440200188
s440200188
s440200188
p03162
p03162
u625261658
u625261658
1,560,555,777
2019-06-14T23:42:57
Main.java
import java.util.*; public class Main { public static void main(String args[]) { Scanner sc=new Scanner(System.in); int days=sc.nextInt(); int act[]=new int[n][3]; for(int i=0;i<n;i++) { for(int j=0;j<3;j++) { act[i][j]=sc.nextInt(); } } int sum=0,prev=-1;; for(int i=0;i<...
Main.java:8: error: cannot find symbol int act[]=new int[n][3]; ^ symbol: variable n location: class Main Main.java:8: error: incompatible types: int[][] cannot be converted to int[] int act[]=new int[n][3]; ^ Main.java:9: error: cannot find symbol for(int i=0;i<n;i++) ...
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u625261658|p03162|0
u625261658|p03162|0
codenet
Compile Error
530
v2_s869913388
s869913388
s869913388
p03162
p03162
u625261658
u625261658
1,561,897,326
2019-06-30T12:22:06
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[] sea=new int[n]; int[] bugs=new int[n]; int[] hw=new int[n] for(int i=0;i<n;i++) { sea[i]=sc.nextInt(); bugs[i]=sc.nextInt(); hw[i]...
Main.java:9: error: ';' expected int[] hw=new int[n] ^ 1 error
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u625261658|p03162|1
u625261658|p03162|1
codenet
Compile Error
752
v2_s790158750
s790158750
s790158750
p03162
p03162
u656393766
u656393766
1,598,659,950
2020-08-29T00:12:30
Main.java
public class Main { public static void main(String args[]){ int t=0; Scanner obj=new Scanner(System.in); t=obj.nextInt(); if(t<1) return 0; int arr[][]=new int[t][3]; for(int i=0;i<t;i++){ for(int j=0;j<3;j++){ arr[i][j]=obj.nextInt(); } } int dp[][]=new int[t][3]; dp[0][0]=Math.max(arr[0][1],arr[0][2]); dp[0][1...
Main.java:19: error: illegal start of expression d[[i][0]=Math.max(dp[i-1][1]+arr[i][0],dp[i-1][2]+arr[i][0]); ^ Main.java:20: error: illegal start of expression d[[i][1]=Math.max(dp[i-1][0]+arr[i][1],dp[i-1][2]+arr[i][1]); ^ Main.java:21: error: illegal start of expres...
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u656393766|p03162|0
u656393766|p03162|0
codenet
Compile Error
718
v2_s244078067
s244078067
s244078067
p03162
p03162
u656393766
u656393766
1,598,660,009
2020-08-29T00:13:29
Main.java
public class Main { public static void main(String args[]){ int t=0; Scanner obj=new Scanner(System.in); t=obj.nextInt(); if(t<1) return 0; int arr[][]=new int[t][3]; for(int i=0;i<t;i++){ for(int j=0;j<3;j++){ arr[i][j]=obj.nextInt(); } } int dp[][]=new int[t][3]; dp[0][0]=Math.max(arr[0][1],arr[0][2]); dp[0][1...
Main.java:4: error: cannot find symbol Scanner obj=new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:4: error: cannot find symbol Scanner obj=new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:7: error: incompatible types: unexpected r...
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u656393766|p03162|0
u656393766|p03162|0
codenet
Compile Error
719
v2_s175906352
s175906352
s175906352
p03162
p03162
u656393766
u656393766
1,598,660,043
2020-08-29T00:14:03
Main.java
import java.util.*; public class Main { public static void main(String args[]){ int t=0; Scanner obj=new Scanner(System.in); t=obj.nextInt(); if(t<1) return 0; int arr[][]=new int[t][3]; for(int i=0;i<t;i++){ for(int j=0;j<3;j++){ arr[i][j]=obj.nextInt(); } } int dp[][]=new int[t][3]; dp[0][0]=Math.max(arr[0][1]...
Main.java:8: error: incompatible types: unexpected return value return 0; ^ Main.java:24: error: cannot find symbol System.out.println(math.max(dp[t-1][0],Math.max(dp[t-1][1],dp[t-1][2]))); ^ symbol: variable math location: class Main 2 errors
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u656393766|p03162|0
u656393766|p03162|0
codenet
Compile Error
739
v2_s917152231
s917152231
s917152231
p03162
p03162
u657121555
u657121555
1,599,445,251
2020-09-07T02:20:51
Main.java
import java.util.*; import java.io.*; public class Main static FastReader in = new FastReader(); public static void main(String[] args) { solve(); } static void solve() { int n = in.nextInt(); int[][] arr = new int[n][3]; for(int i = 0; i < n; i++) arr[i] = in.readarr(3); int[][] dp = new int[n][3]...
Main.java:5: error: '{' expected public class Main ^ Main.java:8: 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:81: error: class, interface, enum, or recor...
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u657121555|p03162|0
u657121555|p03162|0
codenet
Compile Error
1,585
v2_s852002840
s852002840
s852002840
p03162
p03162
u815784554
u815784554
1,586,635,993
2020-04-11T20:13:13
Main.java
import java.util.*; import java.lang.*; import java.io.*; public final class Main { public static void main (String[] args) throws java.lang.Exception { Scanner in = new Scanner(System.in); int n = in.nextInt(); int[] a = new int[n+1]; int[] b = new int[n+1]; int[] c = new ...
Main.java:36: error: reached end of file while parsing } ^ 1 error
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u815784554|p03162|0
u815784554|p03162|0
codenet
Compile Error
1,067
v2_s263072515
s263072515
s263072515
p03162
p03162
u815784554
u815784554
1,586,636,072
2020-04-11T20:14:32
Main.java
import java.util.*; import java.lang.*; import java.io.*; public final class Main { public static void main (String[] args) throws java.lang.Exception { Scanner in = new Scanner(System.in); int n = in.nextInt(); int[] a = new int[n+1]; int[] b = new int[n+1]; int[] c = new ...
Main.java:26: error: cannot find symbol dp[i][j] =a[i]+ Math.max(pd[i-1][2],dp[i-1][3]); ^ symbol: variable pd location: class Main Main.java:34: error: cannot find symbol System.out.println(Math.max(dp[n][1], Math.max(dp[n][2], Math.dp[n][3]))); ...
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u815784554|p03162|0
u815784554|p03162|0
codenet
Compile Error
1,070
v2_s502824308
s502824308
s502824308
p03162
p03162
u847470298
u847470298
1,589,990,194
2020-05-20T15:56:34
Main.java
import java.util.*; public class Main{ public static void main(String Args[]){ Scanner ob=new Scanner(System.in); int n=ob.nextInt(); int a=0,b=0,c=0,sum=0; int d=-1; for(int i=0;i<n;i++){ a=ob.nextInt(); b=ob.nextInt(); c=ob.nextInt(); if(d==0){ sum+=math.max(b,c);...
Main.java:13: error: cannot find symbol sum+=math.max(b,c); ^ symbol: variable math location: class Main 1 error
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u847470298|p03162|0
u847470298|p03162|0
codenet
Compile Error
788
v2_s702008980
s702008980
s702008980
p03162
p03162
u896506124
u896506124
1,592,969,077
2020-06-24T03:24:37
Main.java
public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int n = scanner.nextInt(); int[][] arr = new int[n][3]; for (int i = 0; i < n; i++) { for (int j = 0; j < 3; j++) { arr[i][j] = scanner.nextInt(); ...
Main.java:4: error: cannot find symbol Scanner scanner = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:4: error: cannot find symbol Scanner scanner = new Scanner(System.in); ^ symbol: class Scanner location: class Main 2 ...
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u896506124|p03162|0
u896506124|p03162|0
codenet
Compile Error
660
v2_s634012750
s634012750
s634012750
p03162
p03162
u901677550
u901677550
1,586,979,923
2020-04-15T19:45:23
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[][] arr=new int[n][3]; for(int i=0;i<n;i++){ arr[i][0]=s.nextInt(); arr[i][1]=s.nextInt(); arr[i][2]=s.nextInt(); } int[][] dp=new int[n][3]...
Main.java:33: error: reached end of file while parsing } ^ 1 error
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u901677550|p03162|0
u901677550|p03162|0
codenet
Compile Error
880
v2_s816663703
s816663703
s816663703
p03162
p03162
u901677550
u901677550
1,586,979,981
2020-04-15T19:46:21
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[][] arr=new int[n][3]; for(int i=0;i<n;i++){ arr[i][0]=s.nextInt(); arr[i][1]=s.nextInt(); arr[i][2]=s.nextInt(); } int[][] dp=new int[n][3]...
Main.java:36: error: illegal start of type import java.util.*; ^ Main.java:36: error: <identifier> expected import java.util.*; ^ Main.java:69: error: reached end of file while parsing } ^ 3 errors
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u901677550|p03162|0
u901677550|p03162|0
codenet
Compile Error
1,766
v2_s827862759
s827862759
s827862759
p03162
p03162
u916055599
u916055599
1,595,088,058
2020-07-18T16:00:58
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:33: error: ';' expected return dp[pos][prevSelected] ^ 1 error
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u916055599|p03162|0
u916055599|p03162|0
codenet
Compile Error
1,173
v2_s342334116
s342334116
s342334116
p03162
p03162
u947911678
u947911678
1,594,758,046
2020-07-14T20:20:46
Main.java
import java.util.*; import java.io.*; public class Main { public static void main(String[]abc) { Main ans = new Main(); long solution = ans.solve(); System.out.println(solution); } private long solve() { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int [] d...
Main.java:22: error: cannot find symbol best_a = Math.max(dp[0], Math.max(best.b, best.c)); ^ symbol: variable best location: class Main Main.java:22: error: cannot find symbol best_a = Math.max(dp[0], Math.max(best.b, best.c)); ...
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u947911678|p03162|2
u947911678|p03162|2
codenet
Compile Error
909
v2_s838794552
s838794552
s838794552
p03162
p03162
u970592358
u970592358
1,568,302,015
2019-09-12T15:26:55
Main.java
import java.util.* class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int dp[][] = new int[n+1][3]; int a[] = new int[n] int b[] = new int[n]; int c[] = new int[n]; for (int i=0; i<n; i++) a[i] = sc.next...
Main.java:1: error: ';' expected import java.util.* ^ Main.java:8: error: ';' expected int a[] = new int[n] ^ 2 errors
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u970592358|p03162|0
u970592358|p03162|0
codenet
Compile Error
846
v2_s381697435
s381697435
s381697435
p03162
p03162
u970592358
u970592358
1,568,302,289
2019-09-12T15:31:29
Main.java
import java.util.*; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int dp[][] = new int[n+1][3]; int a[] = new int[n]; int b[] = new int[n]; int c[] = new int[n]; for (int i=0; i<n; i++) a[i] = sc.ne...
Main.java:16: error: no suitable method found for max(int,int,int) dp[i][0] = Math.max(Math.max(dp[i-1][0], dp[i-1][1], dp[i-1][2])) + Math.max(b[i-1], c[i-1]); ^ method Math.max(int,int) is not applicable (actual and formal argument lists differ in length) method...
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u970592358|p03162|0
u970592358|p03162|0
codenet
Compile Error
946
v2_s581963177
s581963177
s581963177
p03162
p03162
u970592358
u970592358
1,568,302,332
2019-09-12T15:32:12
Main.java
import java.util.*; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int dp[][] = new int[n+1][3]; int a[] = new int[n]; int b[] = new int[n]; int c[] = new int[n]; for (int i=0; i<n; i++) a[i] = sc.ne...
Main.java:16: error: ';' expected dp[i][0] = Math.max(Math.max(dp[i-1][0], dp[i-1][1]), dp[i-1][2])) + Math.max(b[i-1], c[i-1]); ^ Main.java:17: error: ';' expected dp[i][1] = Math.max(Math.max(dp[i-1][1],dp[i-1][0]), dp[i-1]...
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u970592358|p03162|0
u970592358|p03162|0
codenet
Compile Error
949
v2_s821794191
s821794191
s821794191
p03162
p03162
u970592358
u970592358
1,568,303,837
2019-09-12T15:57:17
Main.java
import java.util.*; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int dp[][] = new int[n+1][3]; int a[] = new int[n]; int b[] = new int[n]; int c[] = new int[n]; for (int i=0; i<n; i++) a[i] = sc.ne...
Main.java:11: error: ';' expected for (int i=0; i<n; i++) a[i] = sc.nextInt(), b[i] = sc.nextInt(), c[i] = sc.nextInt(); ^ Main.java:11: error: ';' expected for (int i=0; i<n; i++) a[i] = sc.nextInt(), b[i] = sc.nextInt(), c[i] = sc.nextInt(); ...
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u970592358|p03162|0
u970592358|p03162|0
codenet
Compile Error
851
v2_s290737466
s290737466
s290737466
p03162
p03162
u987412812
u987412812
1,578,966,013
2020-01-14T01:40:13
Main.java
import java.util.*; import java.util.function.Predicate; public class Main { public static void main(String[] args) { new Main().run(); } void run() { Scanner cin = new Scanner(System.in); N = cin.nextInt(); A = new int[N]; B = new int[N]; C = new int[N]; ...
Main.java:49: error: ';' expected return dp[day][preChoice] Math.max(chooseA, Math.max(chooseB, chooseC)); ^ 1 error
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u987412812|p03162|0
u987412812|p03162|0
codenet
Compile Error
1,938
v2_s677195109
s677195109
s677195109
p03163
p03163
u004257084
u004257084
1,598,308,681
2020-08-24T22:38:01
Main.java
import java.util.*; import java.io.*; class Main{ public static void main(String args[]) throws IOException { BufferedReader reader = new BufferedReader(new InputStreamBuffer(System.in)); int N = Integer.parseInt(reader.readLine()); int w[] = new int[N]; int v[] = new int[N]; for(int i=0; i<N;...
Main.java:38: error: ']' expected dp[i][j] = Math.max(dp[i-1][j], v[i] + dp[i-1][j-w[i]); ^ 1 error
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u004257084|p03163|0
u004257084|p03163|0
codenet
Compile Error
1,331
v2_s651801566
s651801566
s651801566
p03163
p03163
u004257084
u004257084
1,598,308,866
2020-08-24T22:41:06
Main.java
import java.util.*; import java.io.*; class Main{ public static void main(String args[]) throws IOException { BufferedReader reader = new BufferedReader(new InputStreamBuffer(System.in)); int N = Integer.parseInt(reader.readLine()); int w[] = new int[N]; int v[] = new int[N]; for(int i=0; i<...
Main.java:8: error: cannot find symbol BufferedReader reader = new BufferedReader(new InputStreamBuffer(System.in)); ^ symbol: class InputStreamBuffer location: class Main 1 error
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u004257084|p03163|0
u004257084|p03163|0
codenet
Compile Error
1,304
v2_s760312250
s760312250
s760312250
p03163
p03163
u004257084
u004257084
1,598,308,978
2020-08-24T22:42:58
Main.java
import java.util.*; import java.io.*; class Main{ public static void main(String args[]) throws IOException { BufferedReader reader = new BufferedReader(new InputStreamBuffer(System.in)); int N = Integer.parseInt(reader.readLine()); int w[] = new int[N]; int v[] = new int[N]; for(int i=0; i<...
Main.java:50: error: class, interface, enum, or record expected import java.util.*; ^ Main.java:51: error: class, interface, enum, or record expected import java.io.*; ^ 2 errors
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u004257084|p03163|0
u004257084|p03163|0
codenet
Compile Error
2,609
v2_s699039014
s699039014
s699039014
p03163
p03163
u018679195
u018679195
1,574,828,723
2019-11-27T04:25:23
Main.java
public class Main{ public static void main(String[] args) { //Lê as entradas do teclado Scanner sc = new Scanner(System.in); int n = Integer.parseInt(sc.next()); int w = Integer.parseInt(sc.next()); //Inicializa os parametros long[][] matriz = new long[n+1][w+1]; int[] p = new i...
Main.java:5: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:5: 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
u018679195|p03163|0
u018679195|p03163|0
codenet
Compile Error
1,138
v2_s338644555
s338644555
s338644555
p03163
p03163
u018679195
u018679195
1,595,589,358
2020-07-24T11:15:58
public.java
import java.util.*; import java.io.*; public class public { static int []w,v; static int n,s; static int [][]dp; public static int dp(int index,int remw) { if(remw<0) return -(int)1e9; if(index==n) return 0; if(dp[index][remw]!=-1) return dp[index][remw]; int take=v[index]+dp...
public.java:3: error: <identifier> expected public class public { ^ public.java:3: error: class, interface, enum, or record expected public class public { ^ public.java:6: error: class, interface, enum, or record expected static int n,s; ^ public.java:7: error: unnamed classes a...
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u018679195|p03163|17
u018679195|p03163|13
codenet
Compile Error
1,634
v2_s603160529
s603160529
s603160529
p03163
p03163
u018679195
u018679195
1,595,589,562
2020-07-24T11:19:22
Main.java
public class Main { static int []w,v; static int n,s; static int [][]dp; public static int dp(int index,int remw) { if(remw<0) return -(int)1e9; if(index==n) return 0; if(dp[index][remw]!=-1) return dp[index][remw]; int take=v[index]+dp(index+1,remw-w[index]); int leave=dp...
Main.java:24: error: cannot find symbol public static void main (String []args) throws IOException { ^ symbol: class IOException location: class Main Main.java:48: error: cannot find symbol BufferedReader br; ^ symbol: class BufferedReader location: class...
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u018679195|p03163|17
u018679195|p03163|13
codenet
Compile Error
1,592
v2_s034969489
s034969489
s034969489
p03163
p03163
u068098242
u068098242
1,551,784,163
2019-03-05T11:09:23
Main.java
import java.util.*; public class Main { static int n, w; static int[] W, V; static Long[][] memo; public static void main(String[] args) { Scanner in = new Scanner(System.in); n = in.nextInt(); w = in.nextInt(); W = new int[n]; V = new int[n]; for (int i = 0; i < n; i++) { W[i]...
Main.java:39: error: reached end of file while parsing } ^ 1 error
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u068098242|p03163|0
u068098242|p03163|0
codenet
Compile Error
800
v2_s804202530
s804202530
s804202530
p03163
p03163
u068098242
u068098242
1,551,784,222
2019-03-05T11:10:22
Main.java
import java.util.*; public class Main { static int n, w; static int[] W, V; static Long[][] memo; public static void main(String[] args) { Scanner in = new Scanner(System.in); n = in.nextInt(); w = in.nextInt(); W = new int[n]; V = new int[n]; for (int i = 0; i < n; i++) { W[i]...
Main.java:39: error: reached end of file while parsing } ^ 1 error
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u068098242|p03163|0
u068098242|p03163|0
codenet
Compile Error
801
v2_s016131433
s016131433
s016131433
p03163
p03163
u079288996
u079288996
1,587,665,967
2020-04-23T18:19: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(); int[] wt = new int[N]; int[] val = new int[N]; for (int i = 0; i < N; i++) { wt[i] = sc.nextInt...
Main.java:25: error: incompatible types: int[][] cannot be converted to long[][] long[][] dp = new int[N+1][W+1]; ^ 1 error
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u079288996|p03163|1
u079288996|p03163|0
codenet
Compile Error
1,004
v2_s167018741
s167018741
s167018741
p03163
p03163
u079438235
u079438235
1,592,712,949
2020-06-21T04:15:49
Main.java
ort java.util.*; class Main{ static Integer[][]cache; public static void main(String[] args){ Scanner sc=new Scanner(System.in); int n=sc.nextInt(); int w=sc.nextInt(); int []x=new int[n]; int []v=new int[n]; for(int i=0;i<n;i++){ x[i]=sc.nextInt(); v[i]=sc.nextInt(); } c...
Main.java:1: error: class, interface, enum, or record expected ort java.util.*; ^ 1 error
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u079438235|p03163|0
u079438235|p03163|0
codenet
Compile Error
853
v2_s729693701
s729693701
s729693701
p03163
p03163
u079438235
u079438235
1,592,712,974
2020-06-21T04:16:14
Main.java
import java.util.*; class Main{ static Integer[][]cache; public static void main(String[] args){ Scanner sc=new Scanner(System.in); int n=sc.nextInt(); int w=sc.nextInt(); int []x=new int[n]; int []v=new int[n]; for(int i=0;i<n;i++){ x[i]=sc.nextInt(); v[i]=sc.nextInt(); } ...
Main.java:30: error: incompatible types: long cannot be converted to Integer return cache[index][W]=Math.max(include,exclude); ^ 1 error
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u079438235|p03163|0
u079438235|p03163|0
codenet
Compile Error
856
v2_s493767721
s493767721
s493767721
p03163
p03163
u085634651
u085634651
1,577,929,409
2020-01-02T01:43:29
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 W = scan.nextInt(); int[][] weightValues = new int[2][N]; for (int i = 0; i < N; i++) { for (int j = 0; j < 2; j++) { weightValues[j][...
Main.java:32: error: ';' expected int candidateMinimum = weightLeftover < 0 : Integer.MAX_VALUE : dp[weightLeftover]; ^ Main.java:32: error: not a statement int candidateMinimum = weightLeftover < 0 : Integer.MAX_VALUE : dp[weightLeftover]; ...
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u085634651|p03163|0
u085634651|p03163|0
codenet
Compile Error
1,111
v2_s263793243
s263793243
s263793243
p03163
p03163
u089230684
u089230684
1,579,035,653
2020-01-14T21:00:53
Main.java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Arrays; import java.util.StringTokenizer; import java.util.TreeMap; import javafx.util.Pair; public class Main{ // static int[][] memo = new int[][]; public static Pair<Integer, Long> dp(int[] weights, lo...
Main.java:10: error: package javafx.util does not exist import javafx.util.Pair; ^ Main.java:15: error: cannot find symbol public static Pair<Integer, Long> dp(int[] weights, long[] values, int i, int N, int W) { ^ symbol: class Pair location: class Main Main.java:17: error: cann...
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u089230684|p03163|2
u089230684|p03163|2
codenet
Compile Error
1,958
v2_s766816412
s766816412
s766816412
p03163
p03163
u096578408
u096578408
1,561,402,393
2019-06-24T18:53:13
Main.java
public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int numOfItems = sc.nextInt(); int knapSackWeight = sc.nextInt(); long[] itemValue = new long[numOfItems+1]; long[] itemWeight = new long[numOfItems+1]; for(int i =1;i<=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
u096578408|p03163|0
u096578408|p03163|0
codenet
Compile Error
1,109
v2_s529464071
s529464071
s529464071
p03163
p03163
u246364288
u246364288
1,587,792,675
2020-04-25T05:31:15
Expert.java
import java.util.*; import javafx.util.*; public class Expert { public static Scanner in = new Scanner(System.in); public static int n = 0, k = 0; public static int[] weight = new int[10001]; public static int[] benifit = new int[10001]; public static int[][] dp = new int[10001][10001]; publ...
Expert.java:3: error: package javafx.util does not exist import javafx.util.*; ^ 1 error
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u246364288|p03163|0
u246364288|p03163|0
codenet
Compile Error
1,230
v2_s622002195
s622002195
s622002195
p03163
p03163
u250414052
u250414052
1,600,562,122
2020-09-20T00:35:22
Main.java
public class Main{ public static void main(String[] args) throws Exception{ //BufferedInputStream bs = new BufferedInputStream(new FileInputStream(new File("data.txt"))); //Scanner sc = new Scanner(bs); Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int W = sc.nextInt(); int[][] items = new int...
Main.java:5: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:5: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:26: error: cannot find symbol ...
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u250414052|p03163|0
u250414052|p03163|0
codenet
Compile Error
823
v2_s584322871
s584322871
s584322871
p03163
p03163
u294678209
u294678209
1,596,046,564
2020-07-29T18:16:04
Main.java
//package godiji; import java.util.Scanner; import java.util.Stack; import java.util.StringTokenizer; import java.util.TreeMap; import src.Knapsack; import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.FileWriter; import java.io.IOException; import java.io.InputStreamReader; import java.math....
Main.java:8: error: package src does not exist import src.Knapsack; ^ 1 error
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u294678209|p03163|1
u294678209|p03163|1
codenet
Compile Error
3,797
v2_s156597527
s156597527
s156597527
p03163
p03163
u314470965
u314470965
1,574,895,949
2019-11-27T23:05:49
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:11: error: cannot find symbol for(int i = 0;i < day;i ++){ ^ symbol: variable day location: class Main 1 error
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u314470965|p03163|0
u314470965|p03163|0
codenet
Compile Error
891
v2_s343293931
s343293931
s343293931
p03163
p03163
u334615307
u334615307
1,588,470,065
2020-05-03T01:41:05
Main.java
import java.util.*; public class Main{ static long aa[][]; static int maxx(int[] ww,int[] v,int ind,int w){ if(ind>=v.length || w==0 ){return 0;) if(aa[ind][w]!=-1){return aa[ind][w];} if(w-ww[ind]<0){ return aa[ind][w]=maxx(ww,v,ind+1,w); } else{ ...
Main.java:5: error: illegal start of expression if(ind>=v.length || w==0 ){return 0;) ^ Main.java:16: error: illegal start of expression public static void main(String[] args){ ^ 2 errors
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u334615307|p03163|0
u334615307|p03163|0
codenet
Compile Error
836
v2_s239241427
s239241427
s239241427
p03163
p03163
u334615307
u334615307
1,588,470,136
2020-05-03T01:42:16
Main.java
import java.util.*; public class Main{ static long aa[][]; static int maxx(int[] ww,int[] v,int ind,int w){ if(ind>=v.length || w==0 ){return 0;} if(aa[ind][w]!=-1){return aa[ind][w];} if(w-ww[ind]<0){ return aa[ind][w]=maxx(ww,v,ind+1,w); } else{ ...
Main.java:6: error: incompatible types: possible lossy conversion from long to int if(aa[ind][w]!=-1){return aa[ind][w];} ^ Main.java:8: error: incompatible types: possible lossy conversion from long to int return aa[ind][w]=maxx(ww,v,ind+1,w); ...
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u334615307|p03163|0
u334615307|p03163|0
codenet
Compile Error
836
v2_s919618299
s919618299
s919618299
p03163
p03163
u345932819
u345932819
1,549,912,863
2019-02-11T19:21:03
Main.java
import java.util.Arrays; import java.util.Scanner; public class Main { public static void main(String[] args) { new SaikiMain2().solve(); } private long getValue(int currentI, int currentWeight) { if (arrayMemo[currentI][currentWeight] != Integer.MIN_VALUE) { return arrayMemo[currentI][currentWeight]; ...
Main.java:9: error: cannot find symbol new SaikiMain2().solve(); ^ symbol: class SaikiMain2 location: class Main 1 error
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u345932819|p03163|1
u345932819|p03163|1
codenet
Compile Error
1,471
v2_s712246186
s712246186
s712246186
p03163
p03163
u353919145
u353919145
1,574,828,871
2019-11-27T04:27:51
Main.java
public class Main{ public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = Integer.parseInt(sc.next()); int w = Integer.parseInt(sc.next()); long[][] matriz = new long[n+1][w+1]; int[] p = new int[n]; int[] v = new int[n]; for(int ...
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...
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u353919145|p03163|0
u353919145|p03163|0
codenet
Compile Error
862
v2_s749862517
s749862517
s749862517
p03163
p03163
u353919145
u353919145
1,595,589,279
2020-07-24T11:14:39
Public.java
import java.util.*; import java.io.*; public class Public { static int []w,v; static int n,s; static int [][]dp; public static int dp(int index,int remw) { if(remw<0) return -(int)1e9; if(index==n) return 0; if(dp[index][remw]!=-1) return dp[index][remw]; int take=v[index]+dp...
Public.java:49: error: reached end of file while parsing } ^ 1 error
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u353919145|p03163|20
u353919145|p03163|17
codenet
Compile Error
868
v2_s482384305
s482384305
s482384305
p03163
p03163
u358612288
u358612288
1,585,316,928
2020-03-27T13:48:48
MainApp.java
import org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider; import java.util.Scanner; import static java.lang.Math.max; public class MainApp extends ClassPathScanningCandidateComponentProvider{ public static void main(String[] args) throws InterruptedException { Scanner...
MainApp.java:3: error: package org.springframework.context.annotation does not exist import org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider; ^ MainApp.java:10: error: cannot find symbol public class MainApp extends ClassPathScanningCandidat...
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u358612288|p03163|0
u358612288|p03163|0
codenet
Compile Error
1,097
v2_s193003352
s193003352
s193003352
p03163
p03163
u391528671
u391528671
1,547,376,064
2019-01-13T10:41:04
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[] w = new int[N]; int[] v = new int[N]; for (int i = 0; i < N; i++) { w[i] = sc.nextInt(); v[i] = sc.nextInt(); ...
Main.java:23: error: reached end of file while parsing } ^ 1 error
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u391528671|p03163|0
u391528671|p03163|0
codenet
Compile Error
636
v2_s102803529
s102803529
s102803529
p03163
p03163
u424244734
u424244734
1,595,468,165
2020-07-23T01:36:05
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(); int []w =new int[N]; int []v =new int[N]; for(int i=0;i<N;i++) { w[i]=sc.nextInt(); v[i]=sc.nextInt(); } int [][]dp =n...
Main.java:32: error: ';' expected dp[i][j]= Math.max(v[i]+dp[i-1][j-w[i]], dp[i-1][j]) ^ 1 error
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u424244734|p03163|1
u424244734|p03163|1
codenet
Compile Error
607
v2_s761113578
s761113578
s761113578
p03163
p03163
u426930857
u426930857
1,588,597,134
2020-05-04T12:58:54
Main.java
/*package whatever //do not write package name here */ import java.util.*; import java.lang.*; import java.lang.reflect.Array; import java.io.*; class Main { static long dp[][]; public static long knapsack(int i,int v[],int w[],int C,long value){ if(i==0||C==0)return value; if(dp[i][C]!=-1)r...
Main.java:48: error: class, interface, enum, or record expected import java.util.*; ^ Main.java:49: error: class, interface, enum, or record expected import java.lang.*; ^ Main.java:50: error: class, interface, enum, or record expected import java.lang.reflect.Array; ^ Main.java:51: error: class, interface, enum, or re...
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u426930857|p03163|0
u426930857|p03163|0
codenet
Compile Error
2,712
v2_s362137166
s362137166
s362137166
p03163
p03163
u433323348
u433323348
1,588,102,315
2020-04-28T19:31:55
Main.java
import java.util.Scanner; class Main { static int knapsack(int weight[],int val[],int w,int n) { int i,j; int[][] dp=new int[n+1][w+1]; for(i=0;i<=n;i++) for(j=0;j<=w;j++) { if(i==0||j==0) dp[i][j]=0; else if(weight[i-1]<=j) dp[i][j]=Math.max(val[i-1]+dp[i-1][j-weight[i-1]],dp[...
Main.java:34: error: cannot find symbol s.close(); ^ symbol: variable s location: class Main 1 error
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u433323348|p03163|0
u433323348|p03163|0
codenet
Compile Error
765
v2_s575594934
s575594934
s575594934
p03163
p03163
u456425366
u456425366
1,599,165,396
2020-09-03T20:36:36
Main.java
import java.util.Scanner; class Solution { public static int knapsack(int[] wt, int[] val, int n, int w, int[][] dp) { } public static void main(String[] args) { Scanner scan = new Scanner(System.in); int n = scan.nextInt(); int w = scan.nextInt(); int wt[] = new int[n]; int val[] = new i...
Main.java:7: error: missing return statement } ^ 1 error
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u456425366|p03163|0
u456425366|p03163|0
codenet
Compile Error
1,088
v2_s480559620
s480559620
s480559620
p03163
p03163
u456425366
u456425366
1,599,165,468
2020-09-03T20:37:48
Main.java
import java.util.Scanner; class Solution { public static int knapsack(int[] wt, int[] val, int n, int w, int[][] dp) { } public static void main(String[] args) { Scanner scan = new Scanner(System.in); int n = scan.nextInt(); int w = scan.nextInt(); int wt[] = new int[n]; int val[] = new ...
Main.java:7: error: missing return statement } ^ 1 error
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u456425366|p03163|0
u456425366|p03163|0
codenet
Compile Error
1,089
v2_s496116778
s496116778
s496116778
p03163
p03163
u456425366
u456425366
1,599,165,961
2020-09-03T20:46:01
Main.java
import java.util.Scanner; class Solution { public static long knapsack(long[] wt, long[] val, long n, long w, long[][] dp) { for(long i = 1; i <= n; i++) { for(long 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]]), d...
Main.java:10: error: incompatible types: possible lossy conversion from long to int if(wt[i - 1] <= j) ^ Main.java:12: error: incompatible types: possible lossy conversion from long to int dp[i][j] = Math.max((val[i - 1] + dp[i - 1][j - wt[i - 1]]), dp[i - 1][j]); ^ Main.j...
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u456425366|p03163|0
u456425366|p03163|0
codenet
Compile Error
1,199
v2_s638264102
s638264102
s638264102
p03163
p03163
u456425366
u456425366
1,599,166,035
2020-09-03T20:47:15
Main.java
import java.util.Scanner; class Solution { public static long knapsack(long[] wt, long[] val, long n, long w, long[][] 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[...
Main.java:12: error: incompatible types: possible lossy conversion from long to int dp[i][j] = Math.max((val[i - 1] + dp[i - 1][j - wt[i - 1]]), dp[i - 1][j]); ^ Main.java:22: error: incompatible types: possible lossy conversion from long to int ...
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u456425366|p03163|0
u456425366|p03163|0
codenet
Compile Error
1,196
v2_s735535662
s735535662
s735535662
p03163
p03163
u456425366
u456425366
1,599,166,148
2020-09-03T20:49:08
Main.java
import java.util.Scanner; class Solution { public static long knapsack(long[] wt, long[] val, long n, long w, long[][] 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[...
Main.java:12: error: incompatible types: possible lossy conversion from long to int dp[i][j] = Math.max((val[i - 1] + dp[i - 1][j - wt[i - 1]]), dp[i - 1][j]); ^ Main.java:22: error: incompatible types: possible lossy conversion from long to int ...
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u456425366|p03163|0
u456425366|p03163|0
codenet
Compile Error
1,192
v2_s062771655
s062771655
s062771655
p03163
p03163
u456425366
u456425366
1,599,166,243
2020-09-03T20:50:43
Main.java
import java.util.Scanner; class Main { public static long knapsack(long[] wt, long[] val, long n, long w, long[][] 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 - ...
Main.java:12: error: incompatible types: possible lossy conversion from long to int dp[i][j] = Math.max((val[i - 1] + dp[i - 1][j - wt[i - 1]]), dp[i - 1][j]); ^ Main.java:22: error: incompatible types: possible lossy conversion from long to int ...
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u456425366|p03163|0
u456425366|p03163|0
codenet
Compile Error
1,188
v2_s625614151
s625614151
s625614151
p03163
p03163
u456425366
u456425366
1,599,166,289
2020-09-03T20:51:29
Main.java
import java.util.Scanner; class Main { public static long knapsack(long[] wt, long[] val, long n, long w, long[][] 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 - ...
Main.java:12: error: incompatible types: possible lossy conversion from long to int dp[i][j] = Math.max((val[i - 1] + dp[i - 1][j - wt[i - 1]]), dp[i - 1][j]); ^ Main.java:22: error: incompatible types: possible lossy conversion from long to int ...
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u456425366|p03163|0
u456425366|p03163|0
codenet
Compile Error
1,187
v2_s229233780
s229233780
s229233780
p03163
p03163
u456425366
u456425366
1,599,166,419
2020-09-03T20:53:39
Main.java
import java.util.Scanner; class Main { public static long knapsack(long[] wt, long[] val, long n, long w, long[][] 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 - ...
Main.java:12: error: incompatible types: possible lossy conversion from long to int dp[i][j] = Math.max((val[i - 1] + dp[i - 1][j - wt[i - 1]]), dp[i - 1][j]); ^ Main.java:22: error: incompatible types: possible lossy conversion from long to int ...
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u456425366|p03163|0
u456425366|p03163|0
codenet
Compile Error
1,187
v2_s862977162
s862977162
s862977162
p03163
p03163
u456425366
u456425366
1,599,166,504
2020-09-03T20:55:04
Main.java
import java.util.Scanner; class Main { public static long knapsack(int[] wt, long[] val, long n, long w, long[][] 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:22: error: incompatible types: possible lossy conversion from long to int return dp[n][w]; ^ Main.java:22: error: incompatible types: possible lossy conversion from long to int ...
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u456425366|p03163|0
u456425366|p03163|0
codenet
Compile Error
1,184
v2_s228544602
s228544602
s228544602
p03163
p03163
u456425366
u456425366
1,599,166,546
2020-09-03T20:55:46
Main.java
import java.util.Scanner; class Main { public static long knapsack(int[] wt, long[] val, long n, long w, long[][] 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:22: error: incompatible types: possible lossy conversion from long to int return dp[n][w]; ^ Main.java:22: error: incompatible types: possible lossy conversion from long to int ...
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u456425366|p03163|0
u456425366|p03163|0
codenet
Compile Error
1,183
v2_s044924149
s044924149
s044924149
p03163
p03163
u493628887
u493628887
1,582,914,533
2020-02-28T18:28:53
Main.java
import java.util.*; class Main { public static void main(String[] args) { Scanner stdIn = new Scanner(System.in); int N = stdIn.nextInt(); int W = stdIn.nextInt(); int w[] = new int[N]; int v[] = new int[N]; for (int i = 0; i < N; i++) { w[i] = stdIn.next...
Main.java:14: error: cannot find symbol Knapsak knapsak = new Knapsack(); ^ symbol: class Knapsak location: class Main 1 error
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u493628887|p03163|0
u493628887|p03163|0
codenet
Compile Error
1,174
v2_s463915350
s463915350
s463915350
p03163
p03163
u493628887
u493628887
1,583,683,363
2020-03-08T16:02:43
Main.java
import java.util.*; class Main { public static void main(String[] args) { Scanner stdIn = new Scanner(System.in); int N = stdIn.nextInt(); int W = stdIn.nextInt(); int w[] = new int[N]; int v[] = new int[N]; for (int i = 0; i < N; i++) { w[i] = stdIn.next...
Main.java:34: error: not a statement System ^ Main.java:34: error: ';' expected System ^ 2 errors
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u493628887|p03163|1
u493628887|p03163|1
codenet
Compile Error
1,172
v2_s905589408
s905589408
s905589408
p03163
p03163
u504228740
u504228740
1,556,381,138
2019-04-27T16:05:38
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(); long[] dp=new long[W+1]; int[] w=new int[n]; long[] v=new long[n]; for(int i = 0; i<n; i++){ w[i] =sc.nextInt(); v[i] = sc.nextLong()...
Main.java:15: error: incompatible types: int[] cannot be converted to int for(int j=w; j>=w[i]; j--){ ^ Main.java:19: error: incompatible types: int[] cannot be converted to int System.out.println(dp[w]); ^ 2 errors
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u504228740|p03163|0
u504228740|p03163|0
codenet
Compile Error
471
v2_s032911337
s032911337
s032911337
p03163
p03163
u505022189
u505022189
1,593,099,962
2020-06-25T15:46:02
Main.java
l
Main.java:1: error: reached end of file while parsing l ^ 1 error
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u505022189|p03163|2
u505022189|p03163|2
codenet
Compile Error
2
v2_s153212174
s153212174
s153212174
p03163
p03163
u505022189
u505022189
1,593,101,269
2020-06-25T16:07:49
Main.java
import java.util.*; class Main{ static int knapSack(int W, int wt[], int val[], int n) { int i, w; int K[][] = new int[n + 1][W + 1]; // Build table K[][] in bottom up manner for (i = 0; i <= n; i++) { for (w = 0; w <= W; w++) { if (i == 0 ...
Main.java:28: error: cannot find symbol int N = in.nextInt(); ^ symbol: variable in location: class Main Main.java:29: error: cannot find symbol int W = in.nextInt(); ^ symbol: variable in location: class Main Main.java:36: error: cannot find symbol ...
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u505022189|p03163|2
u505022189|p03163|2
codenet
Compile Error
1,100
v2_s305307276
s305307276
s305307276
p03163
p03163
u505022189
u505022189
1,593,101,313
2020-06-25T16:08:33
Main.java
import java.util.*; class Main{ static final Scanner in = new Scanner(System.in); static int knapSack(int W, int wt[], int val[], int n) { int i, w; int K[][] = new int[n + 1][W + 1]; // Build table K[][] in bottom up manner for (i = 0; i <= n; i++) { for (w...
Main.java:38: error: cannot find symbol items_set.add(i); ^ symbol: variable items_set location: class Main Main.java:40: error: cannot find symbol System.out.println(knapSack(W, wt, v, N)); ^ symbol: variable wt location: class Main 2 errors
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u505022189|p03163|2
u505022189|p03163|2
codenet
Compile Error
1,150
v2_s533649548
s533649548
s533649548
p03163
p03163
u505022189
u505022189
1,593,101,345
2020-06-25T16:09:05
Main.java
import java.util.*; class Main{ static final Scanner in = new Scanner(System.in); static int knapSack(int W, int wt[], int val[], int n) { int i, w; int K[][] = new int[n + 1][W + 1]; // Build table K[][] in bottom up manner for (i = 0; i <= n; i++) { for (w...
Main.java:40: error: cannot find symbol System.out.println(knapSack(W, wt, v, N)); ^ symbol: variable wt location: class Main 1 error
compile_error
1
OpenJDK 21.0.12.1
unlabelled
2.1
u505022189|p03163|2
u505022189|p03163|2
codenet
Compile Error
1,133