criyle/codenet-compile-errors huggingface dataset:
Language: C++

#include <cstdio>
using namespace std;

int main(){
	int t;
	__int64 x1, y1, x2, y2, x3, y3, x4, y4;
	double s1, s2, s3, s4, s5, s6, s7, s8;
	scanf("%d", &t);
	while(t--){
		scanf("%lf%lf%lf%lf%lf%lf%lf%lf", &s1, &s2, &s3, &s4, &s5, &s6, &s7, &s8);
		x1 = s1 * 10000; x2 = s3 * 10000; x3 = s5 * 10000; x4 = s7 * 10000;
		y1 = s2 * 10000; y2 = s4 * 10000; y3 = s6 * 10000; y4 = s8 * 10000;
		printf("%s\n", ((x2 - x1) * (y4 - y3) == (x4 - x3) * (y2 - y1))? "YES" : "NO");
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: '__int64' was not declared in this scope; did you mean '__int64_t'?
    6 |         __int64 x1, y1, x2, y2, x3, y3, x4, y4;
      |         ^~~~~~~
      |         __int64_t
a.cc:11:17: error: 'x1' was not declared in this scope; did you mean 's1'?
   11 |                 x1 = s1 * 10000; x2 = s3 * 10000; x3 = s5 * 10000; x4 = s7 * 10000;
      |                 ^~
      |                 s1
a.cc:11:34: error: 'x2' was not declared in this scope; did you mean 's2'?
   11 |                 x1 = s1 * 10000; x2 = s3 * 10000; x3 = s5 * 10000; x4 = s7 * 10000;
      |                                  ^~
      |                                  s2
a.cc:11:51: error: 'x3' was not declared in this scope; did you mean 's3'?
   11 |                 x1 = s1 * 10000; x2 = s3 * 10000; x3 = s5 * 10000; x4 = s7 * 10000;
      |                                                   ^~
      |                                                   s3
a.cc:11:68: error: 'x4' was not declared in this scope; did you mean 's4'?
   11 |                 x1 = s1 * 10000; x2 = s3 * 10000; x3 = s5 * 10000; x4 = s7 * 10000;
      |                                                                    ^~
      |                                                                    s4
a.cc:12:17: error: 'y1' was not declared in this scope; did you mean 's1'?
   12 |                 y1 = s2 * 10000; y2 = s4 * 10000; y3 = s6 * 10000; y4 = s8 * 10000;
      |                 ^~
      |                 s1
a.cc:12:34: error: 'y2' was not declared in this scope; did you mean 's2'?
   12 |                 y1 = s2 * 10000; y2 = s4 * 10000; y3 = s6 * 10000; y4 = s8 * 10000;
      |                                  ^~
      |                                  s2
a.cc:12:51: error: 'y3' was not declared in this scope; did you mean 's3'?
   12 |                 y1 = s2 * 10000; y2 = s4 * 10000; y3 = s6 * 10000; y4 = s8 * 10000;
      |                                                   ^~
      |                                                   s3
a.cc:12:68: error: 'y4' was not declared in this scope; did you mean 's4'?
   12 |                 y1 = s2 * 10000; y2 = s4 * 10000; y3 = s6 * 10000; y4 = s8 * 10000;
      |                                                                    ^~
      |                                                                    s4
Language: C++

#include<iostream>
using namespace std;
int main(){
  double a[2],b[2],c[2],d[2],a,b;
  int n;
  cin >> n;
  for(int i=0;i<n;i++){
    cin >> a[0] >> a[1] >> b[0] >> b[1] >> c[0] >> c[1] >> d[0] >> d[1];
    a = ()
    if((b[1]-a[1])/(b[0]-a[0]))==(d[1]-c[1])/(d[0]-c[0]) cout << "YES" << endl;
    else cout << "NO" << endl;
  }   
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:30: error: conflicting declaration 'double a'
    4 |   double a[2],b[2],c[2],d[2],a,b;
      |                              ^
a.cc:4:10: note: previous declaration as 'double a [2]'
    4 |   double a[2],b[2],c[2],d[2],a,b;
      |          ^
a.cc:4:32: error: conflicting declaration 'double b'
    4 |   double a[2],b[2],c[2],d[2],a,b;
      |                                ^
a.cc:4:15: note: previous declaration as 'double b [2]'
    4 |   double a[2],b[2],c[2],d[2],a,b;
      |               ^
a.cc:9:10: error: expected primary-expression before ')' token
    9 |     a = ()
      |          ^
a.cc:11:5: error: 'else' without a previous 'if'
   11 |     else cout << "NO" << endl;
      |     ^~~~
Language: C++

#include <stdio.h>
#include <conio.h>

int main()
{
	int num ;
	double ax, ay, bx, by, cx, cy, dx, dy ;

	scanf("%d",&num) ;
	for( int i = 0 ; i < num ; i ++ )
	{
		scanf("%lf %lf %lf %lf %lf %lf %lf %lf", ax , ay , bx , by , cx , cy , dx , dy ) ;

		if( ((by-ay)/(bx-ax)) == ((dy-cy)/(dx-cx)) ) printf("YES\n") ;
		else printf("NO\n") ;
	}
	return 0;
}

Compiler output:
a.cc:2:10: fatal error: conio.h: No such file or directory
    2 | #include <conio.h>
      |          ^~~~~~~~~
compilation terminated.
Language: C++

#include <stdio.h>
#include <conio.h>

int main()
{
	int num ;
	double ax, ay, bx, by, cx, cy, dx, dy ;

	scanf("%d",&num) ;
	for( int i = 0 ; i < num ; i ++ )
	{
		scanf("%lf %lf %lf %lf %lf %lf %lf %lf", &ax , &ay , &bx , &by , &cx , &cy , &dx , &dy ) ;

		if( ((by-ay)/(bx-ax)) == ((dy-cy)/(dx-cx)) ) printf("YES\n") ;
		else printf("NO\n") ;
	}
	return 0;
}

Compiler output:
a.cc:2:10: fatal error: conio.h: No such file or directory
    2 | #include <conio.h>
      |          ^~~~~~~~~
compilation terminated.
Language: C++

#include <iostream>
#include <iomanip>
#include <cassert>
#include <algorithm>
#include <functional>
#include <vector>
#include <string>
#include <cstring>
#include <stack>
#include <queue>
#include <map>
#include <bitset>
#include <sstream>
#include <istream>
#include <cmath>
#include <cstdio>

using namespace std;

#define vci vector<int>
#define vcs vector<string>
#define pb push_back
#define sz size()
#define mapci map<char, int>
#define mapsi map<string, int>
#define all(x) x.begin(), x.end()

#define for_(i, a, b) for (int i=(int)a; i<(int)b; i++)
#define for_d(i, a, b) for (int i=(int)a-1; i>=b; i--)
#define for_r(i, a, b, c) for (int i=(int)a; i<(int)b; i += c)
#define for_dr(i, a, b, c) for (int i=(int)a-1; i>=b; i -= c)
#define FOR(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)

#define vcitr vector<int>::iterator
#define vcsitr vector<string>::iterator
#define mapcitr map<char, int>::iterator
#define mapsitr map<string, int>::iterator

typedef long long ll;

const int iINF = 2147483647;
const ll lINF = 9223372036854775807;

template <class T> inline void dbg(T t) { cout << t << endl; }

struct Point2D { 
	double x, y;
	Point2D (double a=0, double b=0) { x=a; y=b; }
};

int main() {
	int n; cin >> n;
	Point2D a, b, c, d;
	
	for (int i=0; i<n; i++) {		
		cin >> a.x >> a.y >> b.x >> b.y >> c.x >> c.y >> d.x >> d.y;
		cout 
		double p = (a.y-b.y)/(a.x-b.x), q = (c.y-d.y)/(c.x-d.x);
		
		if (fabs(p-q) < 1e-9) cout << "YES" << endl;
		else cout << "NO" << endl;
	}
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:57:21: error: expected ';' before 'double'
   57 |                 cout
      |                     ^
      |                     ;
   58 |                 double p = (a.y-b.y)/(a.x-b.x), q = (c.y-d.y)/(c.x-d.x);
      |                 ~~~~~~
a.cc:60:26: error: 'p' was not declared in this scope
   60 |                 if (fabs(p-q) < 1e-9) cout << "YES" << endl;
      |                          ^
a.cc:60:28: error: 'q' was not declared in this scope
   60 |                 if (fabs(p-q) < 1e-9) cout << "YES" << endl;
      |                            ^
Language: C++

#include <iostream>
#include <iomanip>
#include <cassert>
#include <algorithm>
#include <functional>
#include <vector>
#include <string>
#include <cstring>
#include <stack>
#include <queue>
#include <map>
#include <bitset>
#include <sstream>
#include <istream>
#include <cmath>
#include <cstdio>

using namespace std;

#define vci vector<int>
#define vcs vector<string>
#define pb push_back
#define sz size()
#define mapci map<char, int>
#define mapsi map<string, int>
#define all(x) x.begin(), x.end()

#define for_(i, a, b) for (int i=(int)a; i<(int)b; i++)
#define for_d(i, a, b) for (int i=(int)a-1; i>=b; i--)
#define for_r(i, a, b, c) for (int i=(int)a; i<(int)b; i += c)
#define for_dr(i, a, b, c) for (int i=(int)a-1; i>=b; i -= c)
#define FOR(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)

#define vcitr vector<int>::iterator
#define vcsitr vector<string>::iterator
#define mapcitr map<char, int>::iterator
#define mapsitr map<string, int>::iterator

typedef long long ll;

const int iINF = 2147483647;
const ll lINF = 9223372036854775807;

template <class T> inline void dbg(T t) { cout << t << endl; }


struct Point2D { 
	double x, y;
	Point2D (double a=0, double b=0) { x=a; y=b; }
};

typedef Point2D Vector2D;

double dist2D(const Point2D& a, const Point2D& b) { return sqrt( (a.x-b.x)*(a.x-b.x) + (a.y-b.y)*(a.y-b.y) ); }

Vector2D sub_vector2D(const Vector2D& a, const Vector2D& b) {
	Vector2D ret;
	ret.x = a.x - b.x; ret.y = a.y - b.y;
	return ret;
}

double cross_product(const Vector2D& a, const Vector2D& b) { return a.x*b.y - a.y*b.x; }

double inner_product(const Vector2D& a, const Vector2D& b) { return a.x*b.x + a.y*b.y; }

int main() {
	int n; cin >> n;
	Point2D a, b, c, d;
	Vector2D x, y;
	
	for (int i=0; i<n; i++) {		
		cin >> a.x >> a.y >> b.x >> b.y >> c.x >> c.y >> d.x >> d.y;
		
		x = sub_vector(b, a); y = sub_vector(d, c);
		
		if (cross_product(x, y)) cout << "NO" << endl;
		else cout << "YES" << endl;
	}
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:74:21: error: 'sub_vector' was not declared in this scope; did you mean 'sub_vector2D'?
   74 |                 x = sub_vector(b, a); y = sub_vector(d, c);
      |                     ^~~~~~~~~~
      |                     sub_vector2D
Language: C++

#include<cstdio>
#include<iostream>
#include<algorithm>
#include<vector>
#include<string>
#include<map>
#include<stack>
#include<cstring>
#include<cstdlib>

using namespace std;

#define reps(i,f,n) for(int i=f;i<int(n);i++)
#define rep(i,n) reps(i,0,n)

int main(){
	
	int n;
	cin>>n;
	
	rep(t,n){
		double x[4];
		double y[4];
		
		rep(i,4){
			cin>>x[i]>>y[i];
		}
		
		double dx1 = x[0]-x[1];
		double dx2 = x[2]-x[3];
		
		double dy1 = y[0]-y[1];
		double dy2 = y[2]-y[3];
		
		
		if(dx1==0){
			if(dx2==0)puts("YES");
			else puts("NO");
		}else{
			double a1 = dy1/dx1;
			double a2 = dy2/dx2;
			if(fabs(a1-a2)<0.000000001)puts("YES");
			else puts("NO");
		}
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:42:28: error: 'fabs' was not declared in this scope; did you mean 'labs'?
   42 |                         if(fabs(a1-a2)<0.000000001)puts("YES");
      |                            ^~~~
      |                            labs
Language: C++

import java.io.IOException;
import java.util.Locale;
import java.util.Scanner;


public class Main {

	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		while (N-- > 0) {
			double x1 = sc.nextDouble();
			double y1 = sc.nextDouble();
			double x2 = sc.nextDouble();
			double y2 = sc.nextDouble();
			double x3 = sc.nextDouble();
			double y3 = sc.nextDouble();
			double x4 = sc.nextDouble();
			double y4 = sc.nextDouble();

			double[] AB = {x2-x1, y2-y1}, CD = {x4-x3, y4-y3};
			double cross = AB[0]*CD[1]-AB[1]*CD[0];

			if (cross < 1e-10) {
				System.out.println("YES");
			} else {
				System.out.println("NO");
			}

		}

	}
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.io.IOException;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
    2 | import java.util.Locale;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: 'import' does not name a type
    3 | import java.util.Scanner;
      | ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:6:1: error: expected unqualified-id before 'public'
    6 | public class Main {
      | ^~~~~~
Language: C++

#include <complex>
#include <iostream>
#include <cmath>
using namespace std;

typedef complex<double> xy_t;
double cross_product(xy_t a, xy_t b) { return (conj(a)*b).imag(); }
const double eps = 1e-11;
double x[4],y[4];
int N;
int main() {
	cin >> N;
	for (int i=0; i<N; ++i) {
		for (int i=0; i<4; ++i) {
			cin >> x[i] >> y[i];
		}
		xy_t a[2] = {
					xy_t(x[0],y[0]) - xy_t(x[1],y[1]),
					xy_t(x[2],y[2]) - xy_t(x[3],y[3])
				};
		bool p = abs(cross_product(a[0],a[1]))/2 < esp;
		cout << ( p ? "YES" : "NO") << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:60: error: 'esp' was not declared in this scope; did you mean 'exp'?
   21 |                 bool p = abs(cross_product(a[0],a[1]))/2 < esp;
      |                                                            ^~~
      |                                                            exp
Language: C++

#include<algorithm>
#include<vector>
#include<cassert>
#include<string>

using namespace std;

long long N, X[4], Y[4];

string parallel_judge(){
	if ((X[1] * 100000 - X[0] * 100000)*(Y[3] * 100000 - Y[2] * 100000) == (Y[1] * 100000 - Y[0] * 100000)*(X[3] * 100000 - X[2] * 100000)){
		return "YES";
	}
	else{
		return "NO";
	}
}

int main()
{
	cin >> N;
	for (int i = 0; i < N; i++){
		for (int j = 0; j < 4; j++){
			cin >> X[j] >> Y[j];
		}
		cout << parallel_judge() << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:9: error: 'cin' was not declared in this scope
   21 |         cin >> N;
      |         ^~~
a.cc:5:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    4 | #include<string>
  +++ |+#include <iostream>
    5 | 
a.cc:26:17: error: 'cout' was not declared in this scope
   26 |                 cout << parallel_judge() << endl;
      |                 ^~~~
a.cc:26:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:26:45: error: 'endl' was not declared in this scope
   26 |                 cout << parallel_judge() << endl;
      |                                             ^~~~
a.cc:5:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    4 | #include<string>
  +++ |+#include <ostream>
    5 |
Language: C++

// 0021.cpp : コンソール アプリケーションのエントリ ポイントを定義します。
//

#include "stdafx.h"
#include <iostream>
using namespace std;

#define EPS 1e-7

int main()
{
	double x1, y1, x2, y2, x3, y3, x4, y4;
	int n;
	cin >> n;
	for (int i = 0; i < n; i++){
		cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> x4 >> y4;
		if (x1 == x2 && x3 == x4){
			cout << "YES" << endl;
		}
		else if (x1 == x2 || x3 == x4){
			cout << "NO" << endl;
		}
		else if (abs((y2 - y1) / (x2 - x1) - (y4 - y3) / (x4 - x3)) < EPS){
			cout << "YES" << endl;
		}
		else{
			cout << "NO" << endl;
		}
	}
	return 0;
}

Compiler output:
a.cc:4:10: fatal error: stdafx.h: No such file or directory
    4 | #include "stdafx.h"
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

#include<iostream>
#include<string>
#include<algorithm>
#include<map>
#include<vector>
#include<cmath>
#include<cstdio>
#define loop(i,a,b) for(int i=a;i<b;i++) 
#define rep(i,a) loop(i,0,a)
#define pb(in,tmp) in.push_back(tmp)
#define all(in) in.begin(),in.end()
const double PI=acos(-1);
using namespace std;
int main(){
  int n;
  double x[4],y[4];
  cin>>n;
  for(;n--;){
    for(j=0;j<4;j++){
      cin>>x[j];
      cin>>y[j];
    }

    if((x[0]-x[1])*(y[2]-y[3])==(x[2]-x[3])*(y[0]-y[1]))cout<<"YES"<<endl;
    else cout<<"NO"<<endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:9: error: 'j' was not declared in this scope
   19 |     for(j=0;j<4;j++){
      |         ^
Language: C++

#include<iostream>
using namespace std;

int main(){
	int n;
	double a1,a2,b1,b2
	double c1,c2,d1,d2;
	cin>>n;
	for(int i=0;i<n;i++){
		cin>>a1>>a2>>b1>>b2>>c1>>c2>>d1>>d2;
		if( (b2-a2)/(b1-a1) == (d2-c2)/(d1-c1) )
			cout<<"YES"<<endl;
		else 
			cout<<"NO"<<endl;
	}

}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: expected initializer before 'double'
    7 |         double c1,c2,d1,d2;
      |         ^~~~~~
a.cc:10:34: error: 'b2' was not declared in this scope; did you mean 'b1'?
   10 |                 cin>>a1>>a2>>b1>>b2>>c1>>c2>>d1>>d2;
      |                                  ^~
      |                                  b1
a.cc:10:38: error: 'c1' was not declared in this scope; did you mean 'b1'?
   10 |                 cin>>a1>>a2>>b1>>b2>>c1>>c2>>d1>>d2;
      |                                      ^~
      |                                      b1
a.cc:10:42: error: 'c2' was not declared in this scope; did you mean 'a2'?
   10 |                 cin>>a1>>a2>>b1>>b2>>c1>>c2>>d1>>d2;
      |                                          ^~
      |                                          a2
a.cc:10:46: error: 'd1' was not declared in this scope; did you mean 'b1'?
   10 |                 cin>>a1>>a2>>b1>>b2>>c1>>c2>>d1>>d2;
      |                                              ^~
      |                                              b1
a.cc:10:50: error: 'd2' was not declared in this scope; did you mean 'a2'?
   10 |                 cin>>a1>>a2>>b1>>b2>>c1>>c2>>d1>>d2;
      |                                                  ^~
      |                                                  a2
Language: Java

import java.util.Scanner;

public class vol0022 {
	public static void main(String args[]) {
		Scanner scn = new Scanner(System.in);
		int n;
		while((n = scn.nextInt())!=0) {
			long min = 0,max = -1000,buf = 0;
			for(int i = 0;i < n;i++) {
				 buf += scn.nextLong();
				 max = Math.max(max, buf);
				 min = Math.min(min, buf);
			}
			System.out.println(max - min);
		}
		scn.close();
	}

}



Compiler output:
Main.java:3: error: class vol0022 is public, should be declared in a file named vol0022.java
public class vol0022 {
       ^
1 error
Language: Java

import java.util.Scanner;

public class Main{
	public static void main(String args[]) {
		Scanner scn = new Scanner(System.in);
		int n;
		while((n = scn.nextInt())!=0) {
			long min = 0,max = -100000000000l,buf = 0;
			for(int i = 0;i < n;i++) {
				 buf += scn.nextLong();
				 max = Math.max(max, buf);
				 min = Math.min(min, buf);
			}
			System.out.println(max - min);
		}
		scn.close();
	}


Compiler output:
Main.java:17: error: reached end of file while parsing
	}
	 ^
1 error
Language: Java

import java.io.*;

class Main{
public static void main(String[] args){
BufferedReader br=new BufferedReader(new InputStreamReader(System.in);
String str;
while((str=br.readLine())!="0"){
int n=Integer.parseInt(str);
int max=-1000000;
int[] a=new int[n];
int[] s=new int[n+1];
s[0]=0;
for(int i=0;i<n;i++){
a[i]=Integer.parseInt(br.readLine());
s[i+1]+=a[i]
}
for(int a=0;a<n;a++){
for(int b=a+1;b<=n;b++){
max=Math.max(max,s[b]-s[a]);
}
}
System.out.println(max);
}
}
}

Compiler output:
Main.java:5: error: ')' or ',' expected
BufferedReader br=new BufferedReader(new InputStreamReader(System.in);
                                                                     ^
Main.java:15: error: ';' expected
s[i+1]+=a[i]
            ^
2 errors
Language: Java

import java.io.*;

class Main{
public static void main(String[] args){
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String str;
while((str=br.readLine())!="0"){
int n=Integer.parseInt(str);
int max=-1000000;
int[] a=new int[n];
int[] s=new int[n+1];
s[0]=0;
for(int i=0;i<n;i++){
a[i]=Integer.parseInt(br.readLine());
s[i+1]+=a[i];
}
for(int a=0;a<n;a++){
for(int b=a+1;b<=n;b++){
max=Math.max(max,s[b]-s[a]);
}
}
System.out.println(max);
}
}
}

Compiler output:
Main.java:17: error: variable a is already defined in method main(String[])
for(int a=0;a<n;a++){
        ^
1 error
Language: Java

import java.io.*;

class Main{
public static void main(String[] args){
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String str;
while((str=br.readLine())!="0"){
int n=Integer.parseInt(str);
int max=-1000000;
int[] s=new int[n+1];
s[0]=0;
for(int i=0;i<n;i++){
m=Integer.parseInt(br.readLine());
s[i+1]+=m;
}
for(int a=0;a<n;a++){
for(int b=a+1;b<=n;b++){
max=Math.max(max,s[b]-s[a]);
}
}
System.out.println(max);
}
}
}

Compiler output:
Main.java:13: error: cannot find symbol
m=Integer.parseInt(br.readLine());
^
  symbol:   variable m
  location: class Main
Main.java:14: error: cannot find symbol
s[i+1]+=m;
        ^
  symbol:   variable m
  location: class Main
2 errors
Language: Java

import java.io.*;

class Main{
public static void main(String[] args){
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String str;
while((str=br.readLine())!="0"){
int n=Integer.parseInt(str);
int max=-1000000;
int[] s=new int[n+1];
s[0]=0;
for(int i=0;i<n;i++){
int m=Integer.parseInt(br.readLine());
s[i+1]+=m;
}
for(int a=0;a<n;a++){
for(int b=a+1;b<=n;b++){
max=Math.max(max,s[b]-s[a]);
}
}
System.out.println(max);
}
}
}

Compiler output:
Main.java:7: error: unreported exception IOException; must be caught or declared to be thrown
while((str=br.readLine())!="0"){
                      ^
Main.java:13: error: unreported exception IOException; must be caught or declared to be thrown
int m=Integer.parseInt(br.readLine());
                                  ^
2 errors
Language: Java

import java.util.Arrays;
import java.util.Scanner;

public class Main {
	Scanner sc = new Scanner(System.in);

	void run() {
		for (;;) {
			int n = sc.nextInt();
			int M = -Integer.MAX_VALUE / 2;
			if (n == 0) return;
			int[] a = new int[n];
			int[] dp = new int[n];
			for (int i = 0; i < n; i++) a[i] = sc.nextInt();
			Arrays.fill(dp, M);
			dp[0] = a[0];

			for (int i = 1; i < n; i++) {
				dp[i] = Math.max(dp[i - 1] + a[i], a[i]);
				M = Math.max(M, dp[i]);
			}
			System.out.println(M);
		}
	}

	public static void main(String[] args) {
		new AOJ0_22().run();
	}
}

Compiler output:
Main.java:27: error: cannot find symbol
		new AOJ0_22().run();
		    ^
  symbol:   class AOJ0_22
  location: class Main
1 error
Language: Java

import java.util.Scanner;
public class Ma {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int K = sc.nextInt();
		int sum;

		while(K>0){
			sum = 0;
			int[] n = new int[K];

			for(int i = 0; i < n.length; i++){

				int num = sc.nextInt();
				sum += num;
			}
			System.out.println(sum);
			K = sc.nextInt();


		}
	}
}

Compiler output:
Main.java:2: error: class Ma is public, should be declared in a file named Ma.java
public class Ma {
       ^
1 error
Language: Java

public class Main {
    private static Scanner scr;
	public static void main(String args[]) throws IOException{
	    scr = new Scanner(System.in);
		while (true){
		    try{
		    	int n = Integer.parseInt(scr.nextLine());
				int[] data = new int[n];
				for(int i=0; i<n; i++){
					data[i] = Integer.parseInt(scr.nextLine());
				}
				if (n==0) break; //??\?????????
				System.out.println( SearchMax(data) );
			}catch(Exception e){
				System.err.println("Exception");
				break;
			}
        }
	}
	
	private static int SearchMax(int[] data){
		int max = 0;
		for(int i=0; i<data.length; i++){
			int sump=0;
			for(int j=i; j<data.length; j++){
				sump += data[j];
				if(sump>max) max=sump;
			}
		}
	    return max;
	}
}

Compiler output:
Main.java:2: error: cannot find symbol
    private static Scanner scr;
                   ^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
	public static void main(String args[]) throws IOException{
	                                              ^
  symbol:   class IOException
  location: class Main
Main.java:4: error: cannot find symbol
	    scr = new Scanner(System.in);
	              ^
  symbol:   class Scanner
  location: class Main
3 errors
Language: Java

import java.util.*;


public class Main{
	private static final Scanner scan = new Scanner(System.in);

	public static void main(String[] args){
		
		for(;;){
			int n = scan.nextInt();
			if(n == 0){
				break;
			}
			int[] kou = new int[n];
			for(int i = 0; i < n; i++){
				kou[i] = scan.nextInt();
			}
			int max = Integer.MIN_VALUE;
			int sum = 0;
			for(int i = 0; i < n; i++){
				sum = kou[i];
				max = Math.max(sum, max);
				for(int j = i + 1;j < n; j++){
					sum += kou[j];
					max = Math.max(sum, max);
				}
				sum = 0;
			}
			System.out.printf("%d\n", max)
		}
	}
}

Compiler output:
Main.java:29: error: ';' expected
			System.out.printf("%d\n", max)
			                              ^
1 error
Language: Java

import java.util.Scanner;
import java.util.List;
import java.util.ArrayList;

class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    while(sc.hasNext()) {
      int n = sc.nextInt();
      if(n == 0) {
        break;
      }
      int[] arr = new int[n];
      for(int i=0; i<n; i++) {
	int a = sc.nextInt();
        arr[i] = a;	
      }
      int max_sum = -100000000000000;
      for(int i=0; i<n; i++) {
	int sum = arr[i];
        for(int j=i+1; j<n; j++) {
	  sum += arr[j];
	  if(max_sum < sum) {
            max_sum = sum;
          } 
        }
      } 
      System.out.println(max_sum);
    }
  }
}

Compiler output:
Main.java:18: error: integer number too large
      int max_sum = -100000000000000;
                     ^
1 error
Language: Java

public class Main{
    public static void main(String [] args){
         Main m = new Main();
         m.run();
    }
    
    void run(){
         Scanner sc = new Scanner(System.in);

         for(;;){
             int n = sc.nextInt();
             if(n == 0) break;

             int[] seq = new int[n];
             for(int i = 0; i < n ;i++){
                 seq[i] = sc.nextInt();
             } 

             long ans = solve(seq);   
         }
    }

    long solve(int[] seq){
        int n = seq.length;
        long ans = -Long.MAX;
        for(int start = 0; start < n; start++){
            for(int end = start; end < n ; end++){
                long sum = 0;
                for(int index = start; index <= end; index++){
                    sum += seq[index];
                }
                ans = Math.max(ans, sum);
            }
        }
        return ans;
    }
}

Compiler output:
Main.java:8: error: cannot find symbol
         Scanner sc = new Scanner(System.in);
         ^
  symbol:   class Scanner
  location: class Main
Main.java:8: error: cannot find symbol
         Scanner sc = new Scanner(System.in);
                          ^
  symbol:   class Scanner
  location: class Main
Main.java:25: error: cannot find symbol
        long ans = -Long.MAX;
                        ^
  symbol:   variable MAX
  location: class Long
3 errors
Language: Java

import java.io.util.*;

public class Main{
    public static void main(String [] args){
         Main m = new Main();
         m.run();
    }
    
    void run(){
         Scanner sc = new Scanner(System.in);

         for(;;){
             int n = sc.nextInt();
             if(n == 0) break;

             int[] seq = new int[n];
             for(int i = 0; i < n ;i++){
                 seq[i] = sc.nextInt();
             } 

             long ans = solve(seq);   
         }
    }

    long solve(int[] seq){
        int n = seq.length;
        long ans = -Long.MAX;
        for(int start = 0; start < n; start++){
            for(int end = start; end < n ; end++){
                long sum = 0;
                for(int index = start; index <= end; index++){
                    sum += seq[index];
                }
                ans = Math.max(ans, sum);
            }
        }
        return ans;
    }
}

Compiler output:
Main.java:1: error: package java.io.util does not exist
import java.io.util.*;
^
Main.java:10: error: cannot find symbol
         Scanner sc = new Scanner(System.in);
         ^
  symbol:   class Scanner
  location: class Main
Main.java:10: error: cannot find symbol
         Scanner sc = new Scanner(System.in);
                          ^
  symbol:   class Scanner
  location: class Main
Main.java:27: error: cannot find symbol
        long ans = -Long.MAX;
                        ^
  symbol:   variable MAX
  location: class Long
4 errors
Language: Java

import java.util.*;

public class Main{
    public static void main(String [] args){
         Main m = new Main();
         m.run();
    }
    
    void run(){
         Scanner sc = new Scanner(System.in);

         for(;;){
             int n = sc.nextInt();
             if(n == 0) break;

             int[] seq = new int[n];
             for(int i = 0; i < n ;i++){
                 seq[i] = sc.nextInt();
             } 

             long ans = solve(seq);   
         }
    }

    long solve(int[] seq){
        int n = seq.length;
        long ans = -Long.MAX;
        for(int start = 0; start < n; start++){
            for(int end = start; end < n ; end++){
                long sum = 0;
                for(int index = start; index <= end; index++){
                    sum += seq[index];
                }
                ans = Math.max(ans, sum);
            }
        }
        return ans;
    }
}

Compiler output:
Main.java:27: error: cannot find symbol
        long ans = -Long.MAX;
                        ^
  symbol:   variable MAX
  location: class Long
1 error
Language: Java

import java.util.Scanner;

//Maximum Sum Sequence
public class AOJ0022 {

	public static int cs(int[] a){
		int min = 0;
		int x = 0;
		int max = Integer.MIN_VALUE;
		for(int i=0;i<a.length;i++){
			x += a[i];
			max = Math.max(max, x-min);
			min = Math.min(min, x);
		}
		return max;
	}

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		while(true){
			int n = sc.nextInt();
			if(n==0)break;
			int a[] = new int[n];
			for(int i=0;i<n;i++)a[i]=sc.nextInt();
			System.out.println(cs(a));
		}
	}
}

Compiler output:
Main.java:4: error: class AOJ0022 is public, should be declared in a file named AOJ0022.java
public class AOJ0022 {
       ^
1 error
Language: Java

import java.io.*;

public class M0022 {
	public static void main ( String args[] ) throws IOException {
		int i , j , sum , Input , max1 , max2;
		int[] data;
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		while ( true ) {
			sum = 0; max1 = 0; max2 = 0;
			data = new int[5000];
			Input = Integer.parseInt(in.readLine());
			if ( Input == 0 ) break;
			for ( i =0; i < Input; i++ )
				data[i] = Integer.parseInt(in.readLine());
			for ( i = 0; i < data.length; i++ ) {
				for ( j = i; j < data.length; j++ ) {
					sum += data[j];
					if ( max1 < sum ) max1 = sum;
				}
				if ( max2 < max1 ) max2 = max1;
				sum = 0;
			}
			System.out.println(max2);
		}
	}
}

Compiler output:
Main.java:3: error: class M0022 is public, should be declared in a file named M0022.java
public class M0022 {
       ^
1 error
Language: Java

import java.io.*;

public class 0022 {
	public static void main ( String args[] ) throws IOException {
		int i , j , sum , Input , max1 , max2;
		int[] data;
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		while ( true ) {
			sum = 0; max1 = 0; max2 = 0;
			data = new int[5000];
			Input = Integer.parseInt(in.readLine());
			if ( Input == 0 ) break;
			for ( i =0; i < Input; i++ )
				data[i] = Integer.parseInt(in.readLine());
			for ( i = 0; i < data.length; i++ ) {
				for ( j = i; j < data.length; j++ ) {
					sum += data[j];
					if ( max1 < sum ) max1 = sum;
				}
				if ( max2 < max1 ) max2 = max1;
				sum = 0;
			}
			System.out.println(max2);
		}
	}
}

Compiler output:
Main.java:3: error: <identifier> expected
public class 0022 {
            ^
1 error
Language: Java

import java.util.Scanner;

public class aoj0022 {

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int num = s.nextInt();
		while(num!=0){
			int max = 0;
			int[] data = new int[num];
			for(int i=0 ; i<num ; i++)
				data[i] = s.nextInt();
			for(int i=0 ; i<num ; i++){
				int sum = 0;
				for(int j=i ; j<num ; j++){
					sum+=data[k];
					if(max<sum)
						max=sum;
				}
			}
			num = s.nextInt();
			System.out.println(max);
		}
    }
}

Compiler output:
Main.java:3: error: class aoj0022 is public, should be declared in a file named aoj0022.java
public class aoj0022 {
       ^
Main.java:16: error: cannot find symbol
					sum+=data[k];
					          ^
  symbol:   variable k
  location: class aoj0022
2 errors
Language: Java

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int num = s.nextInt();
		while(num!=0){
			int max = 0;
			int[] data = new int[num];
			for(int i=0 ; i<num ; i++)
				data[i] = s.nextInt();
			for(int i=0 ; i<num ; i++){
				int sum = 0;
				for(int j=i ; j<num ; j++){
					sum+=data[k];
					if(max<sum)
						max=sum;
				}
			}
			num = s.nextInt();
			System.out.println(max);
		}
    }
}

Compiler output:
Main.java:16: error: cannot find symbol
					sum+=data[k];
					          ^
  symbol:   variable k
  location: class Main
1 error
Language: Java

import java.util.Scanner;

public class aoj0022 {

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int num = s.nextInt();
		while(num!=0){
			int max = Integer.MIN_VALUE;
			int[] data = new int[num];
			for(int i=0 ; i<num ; i++)
				data[i] = s.nextInt();
			for(int i=0 ; i<num ; i++){
				int sum = 0;
				for(int j=i ; j<num ; j++){
					sum+=data[j];
					if(max<sum)
						max=sum;
				}
			}
			num = s.nextInt();
			System.out.println(max);
		}
    }
}

Compiler output:
Main.java:3: error: class aoj0022 is public, should be declared in a file named aoj0022.java
public class aoj0022 {
       ^
1 error
Language: Java

#include <stdio.h>
int array[1000];
int n,i,sum=0,k=0;
void tansaku(int a);
int main(void)
{
	while(1)
	{
		sum = 0;
		for(i=0;i<1000;i++)
		{
			array[i] = 0;
		}
		scanf("%d",&n);
		if(n==0)break;
		for(i=0;i<n;i++)
		{
			scanf("%d",&array[i]);
		}
		for(i=0;i<n;i++)
		{
			tansaku(i);
			k = 0;
		}
		printf("%d\n",sum);
	}
	return 0;
}
void tansaku(int a)
{
	if(a>n)return;
	k += array[a];
	if(k > sum)
	{
		sum = k;
	}
	if(a == n)return;
	tansaku(a+1);
}

Compiler output:
Main.java:1: error: illegal character: '#'
#include <stdio.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include <stdio.h>
         ^
Main.java:3: error: class, interface, enum, or record expected
int n,i,sum=0,k=0;
^
Main.java:4: error: unnamed classes are a preview feature and are disabled by default.
void tansaku(int a);
^
  (use --enable-preview to enable unnamed classes)
Main.java:5: error: <identifier> expected
int main(void)
             ^
Main.java:14: error: illegal start of expression
		scanf("%d",&n);
		           ^
Main.java:18: error: illegal start of expression
			scanf("%d",&array[i]);
			           ^
7 errors
Language: Java

public class Main {
	public static void main(String args[]) throws Exception {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n;
		int sum=0;
		int max=-100000;
		int[] a = new int[5000];

		n = Integer.parseInt(br.readLine());
		if (n != 0) {
			for(int i=1; i<=n; i++) {
				a[i] = Integer.parseInt(br.readLine());
			}
			
			for (int i=1; i<=n; i++) {
				for (int j=i; j<=n; j++) {
					sum += a[j];
				}

				if (max<sum) {
					max = sum;
				}
				sum = 0;
			}
	        System.out.println(max);
		}
		else {
			return;
		}
		
	}
}

Compiler output:
Main.java:4: error: cannot find symbol
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		^
  symbol:   class BufferedReader
  location: class Main
Main.java:4: error: cannot find symbol
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		                        ^
  symbol:   class BufferedReader
  location: class Main
Main.java:4: error: cannot find symbol
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		                                           ^
  symbol:   class InputStreamReader
  location: class Main
3 errors
Language: Java

public class Main {
	public static void main(String args[]) throws Exception {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n;
		int sum=0;
		int max=-100000;
		int[] a = new int[5000];

		
		n = Integer.parseInt(br.readLine());
		while (n!=0) {
			for(int i=0; i<n; i++) {
				a[i] = Integer.parseInt(br.readLine());
			}
			
			for (int i=0; i<n; i++) {
				for (int j=i; j<=n; j++) {
					sum += a[j];
				}

				if (max<sum) {
					max = sum;
				}
				sum = 0;
			}
	        System.out.println(max);
			n = Integer.parseInt(br.readLine());	        
		}
	}
}

Compiler output:
Main.java:4: error: cannot find symbol
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		^
  symbol:   class BufferedReader
  location: class Main
Main.java:4: error: cannot find symbol
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		                        ^
  symbol:   class BufferedReader
  location: class Main
Main.java:4: error: cannot find symbol
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		                                           ^
  symbol:   class InputStreamReader
  location: class Main
3 errors
Language: C

#include <stdio.h>

int main(void)
{
	int i, j, n;
	long a[10000], sum, max;
	
	while (scanf("%d", &n), n != 0){
		for (i = 0; i < n; i++){
			scanf("%d", &a[i]);
		}
		
		max = -100000000;
		for (i = 0; i < n; i++){
			sum = 0
			for (j = i; j < n; j++){
				sum += a[i];
				if (sum < 0) break;
			}
			if (sum > max){
				max = sum;
			}
		}
		printf("%d\n", max);
	}
	
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:15:32: error: expected ';' before 'for'
   15 |                         sum = 0
      |                                ^
      |                                ;
   16 |                         for (j = i; j < n; j++){
      |                         ~~~
Language: C

#include <stdio.h>
#include <limits.h>
 
int main()
{
int array[5000], n, i, j, sum, max;
while (1){
scanf("%d", &n);
if (n == 0){
break;
}
         
max = INT_MIN;
         
for (i = 0; i < n; i++){
scanf("%d", &array[i]);
}
for (i = 0; i < n; i++){
sum = 0;
for (j = i; j < n; j++){
if (max < sum){
max = sum;
}
}
}
printf("%d\n", max)
}
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:26:20: error: expected ';' before '}' token
   26 | printf("%d\n", max)
      |                    ^
      |                    ;
   27 | }
      | ~
Language: C

#include <stdio.h>
#include <limits.h>
 
int main()
{
int array[5000], n, i, j, sum, max;
while (1){
scanf("%d", &n);
if (n == 0){
break;
}
         
max = INT_MIN;
         
for (i = 0; i < n; i++){
scanf("%d", &array[i]);
}
for (i = 0; i < n; i++){
sum = 0;
for (j = i; j < n; j++){
sum +=array[j];
if (max < sum){
max = sum;
}
}
}
printf("%d\n", max)
}
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:27:20: error: expected ';' before '}' token
   27 | printf("%d\n", max)
      |                    ^
      |                    ;
   28 | }
      | ~
Language: C

#include <stdio.h>

int get_max (int,int a[]);

int main (void)
{
	int n,a[5000];
	int i,j,sum,max=0;

	scanf("%d", &n);
	while(n!=0) do{
		for(i=0;i<n;i++){
			scanf("%d", &a[i]);
		}
	
		for(i=0;i<n;i++){
			sum=0;
			for(j=i;j<n;j++){
				sum+=a[i];
				if(max<sum){
					max=sum;
				}
			}
		}
		printf("%d\n", max);
		scanf("%d",&n);
	}

	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:29:9: error: expected 'while' before 'return'
   29 |         return 0;
      |         ^~~~~~
Language: C

#include<stdio.h>
#define MAX 5000



int max(int a,int b){
 if(a > b)return a;
return b;
}


int f(int a[],int n){
 int t=a[0]; 
 int s=a[0];
 for(int k=1;k<n;k++)
  t=max(t+a[k],a[k]);
  s=max(s,t+a[k]);
 return s;
}




int main(){

 int n,i,j;
 int A[MAX];
 int ans;
 while(1)
 {

  scanf("%d",&n);
  if(n==0)break;

  for(i=0;i<n;i++)
  {
    scanf("%d",&A[i]);
  }
 ans=f(A,n);
  printf("%d\n",ans);

 }

return 0;
}


Compiler output:
main.c: In function 'f':
main.c:17:15: error: 'k' undeclared (first use in this function)
   17 |   s=max(s,t+a[k]);
      |               ^
main.c:17:15: note: each undeclared identifier is reported only once for each function it appears in
Language: C

int down(int data[], int ans[]){
  int i;
  int temp;
  int max=INT_MIN;
  int sum=0;
  for(i=ans[1];i>=0;i--){
    sum+=data[i];
    if(max<=sum){
      max=sum;
      temp=i;
    }
  }
  ans[2]=temp;
  if(ans[0]==max) return 0;
  else{
    ans[0]=max;
    up(data,ans);
  }
}


/*int first(int data[], int ans[], int n){
  int max1=INT_MIN, max2=INT_MIN, temp1, temp2, i, sum;

  ans[0]=INT_MIN;
  ans[1]=n-1;
  ans[2]=0;
  sum=0;
  for(i=ans[2];i<=ans[1];i++){
    sum+=data[i];
    if(max1<=sum){
      max1=sum;
      temp1=i;
    }
  }
  sum=0;
  
  for(i=ans[1];i>=0;i--){
    sum+=data[i];
    if(max2<=sum){
      max2=sum;
      temp2=i;
    }
  }
   
  if(temp1>=temp2){
    ans[1]=temp1;
    ans[0]=max1;
    down(data, ans);
  }
  else{
    ans[2]=temp2;
    ans[0]=max2;
    up(data, ans);
  }
}

*/

Compiler output:
main.c: In function 'down':
main.c:4:11: error: 'INT_MIN' undeclared (first use in this function)
    4 |   int max=INT_MIN;
      |           ^~~~~~~
main.c:1:1: note: 'INT_MIN' is defined in header '<limits.h>'; this is probably fixable by adding '#include <limits.h>'
  +++ |+#include <limits.h>
    1 | int down(int data[], int ans[]){
main.c:4:11: note: each undeclared identifier is reported only once for each function it appears in
    4 |   int max=INT_MIN;
      |           ^~~~~~~
main.c:17:5: error: implicit declaration of function 'up' [-Wimplicit-function-declaration]
   17 |     up(data,ans);
      |     ^~
Language: C

#include<stdio.h>
#include<stdlib.h>
#include<string.h>

int i,j,k;
int n;
__int64 a[5004],x,ans=0;

int main(){
	scanf("%d",&n);
	while(n!=0){
		a[0]=a[1]=0;ans=0;
		for(i=1;i<=n;i++){
			scanf("%lld",&x);
			a[i]+=x;
			a[i+1]=a[i];
		}
		for(i=0;i<=n-1;i++){
			for(j=i+1;j<=n;j++){
				if(a[j]-a[i]>ans)ans=a[j]-a[i];
			}
		}
		printf("%lld\n",ans);
		scanf("%d",&n);
	}
	
	return 0;
}

Compiler output:
main.c:7:1: error: unknown type name '__int64'; did you mean '__int64_t'?
    7 | __int64 a[5004],x,ans=0;
      | ^~~~~~~
      | __int64_t
Language: C

import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;


public class Main {
	public static void main(String[] args) throws IOException{
		Scanner sc = new Scanner(System.in);
		List<Integer> list = new ArrayList<Integer>();
		
		
		while(true){
			int n = sc.nextInt();
			if(n == 0){break;}
			list.clear();
			for(int i = 0; i < n; i++){
				list.add(sc.nextInt());
			}
			
			int max_num = Integer.MIN_VALUE;
			for(int i = 0;i < n;i++){
				int sum = 0;
				for(int j = i;j < n;j++){
					sum += list.get(j);
					if(max_num < sum){
						max_num = sum;
					}
				}
			}
			
			System.out.println(max_num);
		
		}
	}
}

Compiler output:
main.c:1:1: error: unknown type name 'import'
    1 | import java.io.IOException;
      | ^~~~~~
main.c:1:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    1 | import java.io.IOException;
      |            ^
main.c:2:1: error: unknown type name 'import'
    2 | import java.util.ArrayList;
      | ^~~~~~
main.c:2:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    2 | import java.util.ArrayList;
      |            ^
main.c:3:1: error: unknown type name 'import'
    3 | import java.util.List;
      | ^~~~~~
main.c:3:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    3 | import java.util.List;
      |            ^
main.c:4:1: error: unknown type name 'import'
    4 | import java.util.Scanner;
      | ^~~~~~
main.c:4:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    4 | import java.util.Scanner;
      |            ^
main.c:7:1: error: unknown type name 'public'
    7 | public class Main {
      | ^~~~~~
main.c:7:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Main'
    7 | public class Main {
      |              ^~~~
Language: C

#include<stdio.h>
int main(void)
{
int n,a[5001],i,j,sum,max;

while(1)
{
max=-10000000

for(i=0;i<5001;i++)
a[i]=0;

scanf("%d",&n);
if(n==0)break;

for(i=0;i<n;i++)
scanf("%d",a[i]);

for(i=2;i<n;i++)
{
sum=0;
for(j=0;j<=i;j++)
{
sum+=a[j];
}
if(max<sum)max=sum;
}
printf("%d\n",max);
}
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:14: error: expected ';' before 'for'
    8 | max=-10000000
      |              ^
      |              ;
    9 | 
   10 | for(i=0;i<5001;i++)
      | ~~~
Language: C

#include<stdio.h>
int main(void)
{
int n,a[5001],i,j,sum,max;

while(1)
{
max=-10000000;

for(i=0;i<5001;i++)
a[i]=0;

scanf("%d",&n);
if(n==0)break;

for(i=0;i<n;i++)
scanf("%d",a[i]);

for(i=2;i<n;i++)
{
sum=0;
for(j=0;j<=i;j++)
{
sum+=a[j];
}

Compiler output:
main.c: In function 'main':
main.c:25:1: error: expected declaration or statement at end of input
   25 | }
      | ^
main.c:25:1: error: expected declaration or statement at end of input
main.c:25:1: error: expected declaration or statement at end of input
Language: C

#include <cstdio>
int main(){int n,i,j,s,m,a[5000];while(scanf("%d", &n)&&n){for(i=0;i<n;i++)scanf("%d",&a[i]);m=-2147483647;for(i=0;i<n;i++,s=0)for(j=i;j<n;j++)if((s+=a[j])>m)m=s;printf("%d\n",m);}}

Compiler output:
main.c:1:10: fatal error: cstdio: No such file or directory
    1 | #include <cstdio>
      |          ^~~~~~~~
compilation terminated.
Language: C

i,n,t;main(m){for(;t=!scanf("%d",&n),n;printf("%d\n",m))for(m=""*-1;n--;m=(t+=i)>m?t:m,t*=t>0)scanf("%d",&i);}

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | i,n,t;main(m){for(;t=!scanf("%d",&n),n;printf("%d\n",m))for(m=""*-1;n--;m=(t+=i)>m?t:m,t*=t>0)scanf("%d",&i);}
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'i' [-Wimplicit-int]
main.c:1:3: error: type defaults to 'int' in declaration of 'n' [-Wimplicit-int]
    1 | i,n,t;main(m){for(;t=!scanf("%d",&n),n;printf("%d\n",m))for(m=""*-1;n--;m=(t+=i)>m?t:m,t*=t>0)scanf("%d",&i);}
      |   ^
main.c:1:5: error: type defaults to 'int' in declaration of 't' [-Wimplicit-int]
    1 | i,n,t;main(m){for(;t=!scanf("%d",&n),n;printf("%d\n",m))for(m=""*-1;n--;m=(t+=i)>m?t:m,t*=t>0)scanf("%d",&i);}
      |     ^
main.c:1:7: error: return type defaults to 'int' [-Wimplicit-int]
    1 | i,n,t;main(m){for(;t=!scanf("%d",&n),n;printf("%d\n",m))for(m=""*-1;n--;m=(t+=i)>m?t:m,t*=t>0)scanf("%d",&i);}
      |       ^~~~
main.c: In function 'main':
main.c:1:7: error: type of 'm' defaults to 'int' [-Wimplicit-int]
main.c:1:23: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    1 | i,n,t;main(m){for(;t=!scanf("%d",&n),n;printf("%d\n",m))for(m=""*-1;n--;m=(t+=i)>m?t:m,t*=t>0)scanf("%d",&i);}
      |                       ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | i,n,t;main(m){for(;t=!scanf("%d",&n),n;printf("%d\n",m))for(m=""*-1;n--;m=(t+=i)>m?t:m,t*=t>0)scanf("%d",&i);}
main.c:1:23: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    1 | i,n,t;main(m){for(;t=!scanf("%d",&n),n;printf("%d\n",m))for(m=""*-1;n--;m=(t+=i)>m?t:m,t*=t>0)scanf("%d",&i);}
      |                       ^~~~~
main.c:1:23: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:40: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    1 | i,n,t;main(m){for(;t=!scanf("%d",&n),n;printf("%d\n",m))for(m=""*-1;n--;m=(t+=i)>m?t:m,t*=t>0)scanf("%d",&i);}
      |                                        ^~~~~~
main.c:1:40: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:40: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:1:40: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:65: error: invalid operands to binary * (have 'char *' and 'int')
    1 | i,n,t;main(m){for(;t=!scanf("%d",&n),n;printf("%d\n",m))for(m=""*-1;n--;m=(t+=i)>m?t:m,t*=t>0)scanf("%d",&i);}
      |                                                               ~~^
      |                                                               |
      |                                                               char *