Language: C++

import java.util.*;
class Main{
	public static void main(String args[]){
		int table[][]=new int[100][100];
		int dp[][]=new int[100][100];
		Scanner s=new Scanner(System.in);
		int count=0;
		for(int i=0;i<100;i++)
			for(int j=0;j<100;j++)
				table[i][j]=dp[i][j]=0;
		
		while(s.hasNext()){
			String str=s.next();
			String[] dat=str.split(",");
			for(int i=0;i<dat.length;i++){
				table[count][i]=Integer.parseInt(dat[i]);
			}
			count++;
		}
		dp[0][0]=table[0][0];
		for(int i=1;i<count;i++){
			for(int j=0;j<count;j++){
				if(i<count/2){
					if(j==0)dp[i][j]=dp[i-1][j]+table[i][j];
					else dp[i][j]=Math.max(dp[i-1][j],dp[i-1][j-1])+table[i][j];
				}else{
					dp[i][j]=Math.max(dp[i-1][j],dp[i-1][j+1])+table[i][j];
				}
			}
		}
		System.out.println(dp[count-1][0]);
	}
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.*;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:15: error: expected ':' before 'static'
    3 |         public static void main(String args[]){
      |               ^~~~~~~
      |               :
a.cc:3:33: error: 'String' has not been declared
    3 |         public static void main(String args[]){
      |                                 ^~~~~~
a.cc:33:2: error: expected ';' after class definition
   33 | }
      |  ^
      |  ;
a.cc: In static member function 'static void Main::main(int*)':
a.cc:4:21: error: declaration of 'table' as multidimensional array must have bounds for all dimensions except the first
    4 |                 int table[][]=new int[100][100];
      |                     ^~~~~
a.cc:5:21: error: declaration of 'dp' as multidimensional array must have bounds for all dimensions except the first
    5 |                 int dp[][]=new int[100][100];
      |                     ^~
a.cc:6:17: error: 'Scanner' was not declared in this scope
    6 |                 Scanner s=new Scanner(System.in);
      |                 ^~~~~~~
a.cc:10:33: error: 'table' was not declared in this scope; did you mean 'mutable'?
   10 |                                 table[i][j]=dp[i][j]=0;
      |                                 ^~~~~
      |                                 mutable
a.cc:10:45: error: 'dp' was not declared in this scope
   10 |                                 table[i][j]=dp[i][j]=0;
      |                                             ^~
a.cc:12:23: error: 's' was not declared in this scope
   12 |                 while(s.hasNext()){
      |                       ^
a.cc:13:25: error: 'String' was not declared in this scope
   13 |                         String str=s.next();
      |                         ^~~~~~
a.cc:14:32: error: expected primary-expression before ']' token
   14 |                         String[] dat=str.split(",");
      |                                ^
a.cc:15:39: error: 'dat' was not declared in this scope
   15 |                         for(int i=0;i<dat.length;i++){
      |                                       ^~~
a.cc:16:33: error: 'table' was not declared in this scope; did you mean 'mutable'?
   16 |                                 table[count][i]=Integer.parseInt(dat[i]);
      |                                 ^~~~~
      |                                 mutable
a.cc:16:49: error: 'Integer' was not declared in this scope
   16 |                                 table[count][i]=Integer.parseInt(dat[i]);
      |                                                 ^~~~~~~
a.cc:20:17: error: 'dp' was not declared in this scope
   20 |                 dp[0][0]=table[0][0];
      |                 ^~
a.cc:20:26: error: 'table' was not declared in this scope; did you mean 'mutable'?
   20 |                 dp[0][0]=table[0][0];
      |                          ^~~~~
      |                          mutable
a.cc:25:55: error: 'Math' was not declared in this scope
   25 |                                         else dp[i][j]=Math.max(dp[i-1][j],dp[i-1][j-1])+table[i][j];
      |                                                       ^~~~
a.cc:27:50: error: 'Math' was not declared in this scope
   27 |                                         dp[i][j]=Math.max(dp[i-1][j],dp[i-1][j+1])+table[i][j];
      |                                                  ^~~~
a.cc:31:17: error: 'System' was not declared in this scope
   31 |                 System.out.println(dp[count-1][0]);
      |                 ^~~~~~