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

#include<cstdio>
#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<set>
#include<list>
#include<map>
#include<unordered_map>
#include<unordered_set>
#include<functional>
#include<queue>
#define int long long
#define P pair<int,int>//cost to
using namespace std;

int d[10000];
vector<P>rinsetu[10000];
struct room {
	int now, cost, state, keika;
};
bool operator <(room a, room b) {
	return a.cost > b.cost;
}
int mincost[10000][3][201];//??¨?±?????????????????????????
int main() {
	int a, b, c; cin >> a >> b >> c;
	for (int e = 0; e < a; e++) {
		scanf("%lld", &d[e]);
	}
	for (int e = 0; e < b; e++) {
		int f, g, h; scanf("%lld%lld%lld", &f, &g, &h);
		f--; g--;
		rinsetu[f].push_back(P(h, g));
		rinsetu[g].push_back(P(h, f));
	}
	for (int x = 0; x < a; x++) {
		for (int y = 0; y < c; y++) {
			mincost[x][0][y] = mincost[x][1][y] = mincost[x][2][y] = LLONG_MAX / 3;
		}
	}
	mincost[0][0][0] = 0;
	priority_queue<room>Q;
	Q.push({0,0,0,0});
	while (Q.size()) {
		room e = Q.top(); Q.pop();
		if (mincost[e.now][e.state][e.keika] < e.cost)continue;
		for (P f : rinsetu[e.now]) {
			int x = min(c, f.first + e.keika), y = d[f.second];
			if (abs(e.state - y) == 2 && x < c)continue;
			if (y == 1) {
				y = e.state;
			}
			else {
				x = 0;
			}
			if (mincost[f.second][y][x] > e.cost + f.first) {
				mincost[f.second][y][x] = e.cost + f.first;
				Q.push({f.second,mincost[f.second][y][x],y,x});
			}
		}
	}
	int MIN = LLONG_MAX / 3;
	for (int i = 0; i < b; i++) {
		MIN = min({MIN,mincost[a-1][0][i],mincost[a-1][1][i],mincost[a-1][2][i]});
	}
	cout << MIN << endl;
}

Compiler output:
cc1plus: error: '::main' must return 'int'
a.cc: In function 'int main()':
a.cc:39:82: error: 'LLONG_MAX' was not declared in this scope
   39 |                         mincost[x][0][y] = mincost[x][1][y] = mincost[x][2][y] = LLONG_MAX / 3;
      |                                                                                  ^~~~~~~~~
a.cc:13:1: note: 'LLONG_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
   12 | #include<queue>
  +++ |+#include <climits>
   13 | #define int long long
a.cc:63:19: error: 'LLONG_MAX' was not declared in this scope
   63 |         int MIN = LLONG_MAX / 3;
      |                   ^~~~~~~~~
a.cc:63:19: note: 'LLONG_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
Language: C++

#include<bits/stdc++.h>
#define int long long
#define P pair<int,int>//cost to
using namespace std;

int d[10000];
vector<P>rinsetu[10000];
struct room {
	int now, cost, state, keika;
};
bool operator <(room a, room b) {
	return a.cost > b.cost;
}
int mincost[10000][3][201];//??¨?±?????????????????????????
int main() {
	int a, b, c; cin >> a >> b >> c;
	for (int e = 0; e < a; e++) {
		scanf("%lld", &d[e]);
	}
	for (int e = 0; e < b; e++) {
		int f, g, h; scanf("%lld%lld%lld", &f, &g, &h);
		f--; g--;
		rinsetu[f].push_back(P(h, g));
		rinsetu[g].push_back(P(h, f));
	}
	for (int x = 0; x < a; x++) {
		for (int y = 0; y < c; y++) {
			mincost[x][0][y] = mincost[x][1][y] = mincost[x][2][y] = LLONG_MAX / 3;
		}
	}
	mincost[0][0][0] = 0;
	priority_queue<room>Q;
	Q.push({0,0,0,0});
	while (Q.size()) {
		room e = Q.top(); Q.pop();
		if (mincost[e.now][e.state][e.keika] < e.cost)continue;
		for (P f : rinsetu[e.now]) {
			int x = min(c, f.first + e.keika), y = d[f.second];
			if (abs(e.state - y) == 2 && x < c)continue;
			if (y == 1) {
				y = e.state;
			}
			else {
				x = 0;
			}
			if (mincost[f.second][y][x] > e.cost + f.first) {
				mincost[f.second][y][x] = e.cost + f.first;
				Q.push({f.second,mincost[f.second][y][x],y,x});
			}
		}
	}
	int MIN = LLONG_MAX / 3;
	for (int i = 0; i < b; i++) {
		MIN = min({MIN,mincost[a-1][0][i],mincost[a-1][1][i],mincost[a-1][2][i]});
	}
	cout << MIN << endl;
}

Compiler output:
cc1plus: error: '::main' must return 'int'
Language: C++

#include<cstdio>
#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<set>
#include<list>
#include<map>
#include<unordered_map>
#include<unordered_set>
#include<functional>
#include<queue>
#define P pair<int,int>//cost to
using namespace std;

int d[10010];
vector<P>rinsetu[10010];
struct room {
	int now, cost, state, keika;
};
bool operator <(room a, room b) {
	return a.cost > b.cost;
}
int mincost[10010][4][301];//??¨?±?????????????????????????
int main() {
	int a, b, c; cin >> a >> b >> c;
	for (int e = 0; e < a; e++) {
		scanf("%d", &d[e]);
	}
	for (int e = 0; e < b; e++) {
		int f, g, h; scanf("%d%d%d", &f, &g, &h);
		f--; g--;
		rinsetu[f].push_back(P(h, g));
		rinsetu[g].push_back(P(h, f));
	}
	memset(mincost, 0x3f, sizeof(mincost));
	mincost[0][0][0] = 0;
	priority_queue<room>Q;
	Q.push({0,0,0,0});
	while (Q.size()) {
		room e = Q.top(); Q.pop();
		if (mincost[e.now][e.state][e.keika] < e.cost)continue;
		for (P f : rinsetu[e.now]) {
			int x = min(c, f.first + e.keika), y = d[f.second];
			if (abs(e.state - y) == 2 && x < c)continue;
			if (y == 1) {
				y = e.state;
			}
			else {
				x = 0;
			}
			if (mincost[f.second][y][x] > e.cost + f.first) {
				mincost[f.second][y][x] = e.cost + f.first;
				Q.push({f.second,mincost[f.second][y][x],y,x});
			}
		}
	}
	int MIN = 1 << 29;
	for (int i = 0; i < b; i++) {
		MIN = min({MIN,mincost[a-1][0][i],mincost[a-1][1][i],mincost[a-1][2][i]});
	}
	cout << MIN << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:36:9: error: 'memset' was not declared in this scope
   36 |         memset(mincost, 0x3f, sizeof(mincost));
      |         ^~~~~~
a.cc:13:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
   12 | #include<queue>
  +++ |+#include <cstring>
   13 | #define P pair<int,int>//cost to
Language: C++

#include<cstdio>
#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<set>
#include<list>
#include<map>
#include<unordered_map>
#include<unordered_set>
#include<functional>
#include<queue>
#include<stdlib.h>
#pragma warning(disable:4996)
#define P pair<int,int>//cost to
using namespace std;

int d[10010];
vector<P>rinsetu[10010];
struct room {
	int now, cost, state, keika;
};
bool operator <(room a, room b) {
	return a.cost > b.cost;
}
int mincost[10010][4][301];//??¨?±?????????????????????????
int main() {
	int a, b, c; cin >> a >> b >> c;
	for (int e = 0; e < a; e++) {
		scanf("%d", &d[e]);
	}
	for (int e = 0; e < b; e++) {
		int f, g, h; scanf("%d%d%d", &f, &g, &h);
		f--; g--;
		rinsetu[f].push_back(P(h, g));
		rinsetu[g].push_back(P(h, f));
	}
	memset(mincost,0x3f, sizeof(mincost));
	mincost[0][0][0] = 0;
	priority_queue<room>Q;
	Q.push({0,0,0,0});
	while (Q.size()) {
		room e = Q.top(); Q.pop();
		if (mincost[e.now][e.state][e.keika] < e.cost)continue;
		for (P f : rinsetu[e.now]) {
			int x = min(c, f.first + e.keika), y = d[f.second];
			if (abs(e.state - y) == 2 && x < c)continue;
			if (y == 1) {
				y = e.state;
			}
			else {
				x = 0;
			}
			if (mincost[f.second][y][x] > e.cost + f.first) {
				mincost[f.second][y][x] = e.cost + f.first;
				Q.push({f.second,mincost[f.second][y][x],y,x});
			}
		}
	}
	int MIN = 1 << 29;
	for (int i = 0; i < c; i++) {
		MIN = min({MIN,mincost[a-1][0][i],mincost[a-1][1][i],mincost[a-1][2][i]});
	}
	cout << MIN << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:38:9: error: 'memset' was not declared in this scope
   38 |         memset(mincost,0x3f, sizeof(mincost));
      |         ^~~~~~
a.cc:14:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
   13 | #include<stdlib.h>
  +++ |+#include <cstring>
   14 | #pragma warning(disable:4996)
Language: C++

int n, q, s, t;
LL a[200100];
LL ans;
 
LL calc(LL lll) {
	if (lll > 0) {
		return -lll * s;
	}
	else {
		return -lll * t;
	}
}
int main() {
	cin >> n >> q >> s >> t;
	LL prev = 0;
	LL in;
	for (int i = 0; i <= n; i++) {
		cin >> in;
		a[i] = in - prev;
		ans += calc(a[i]);
		prev = in;
	}
	LL l, r, x;
	for (int i = 0; i < q; i++) {
		cin >> l >> r >> x;
		r++;
		ans -= calc(a[l]);
		a[l] += x;
		ans += calc(a[l]);
		if (r <= n) {
			ans -= calc(a[r]);
			a[r] -= x;
			ans += calc(a[r]);
		}
		cout << ans << endl;
	}
}

Compiler output:
a.cc:2:1: error: 'LL' does not name a type
    2 | LL a[200100];
      | ^~
a.cc:3:1: error: 'LL' does not name a type
    3 | LL ans;
      | ^~
a.cc:5:1: error: 'LL' does not name a type
    5 | LL calc(LL lll) {
      | ^~
a.cc: In function 'int main()':
a.cc:14:9: error: 'cin' was not declared in this scope
   14 |         cin >> n >> q >> s >> t;
      |         ^~~
a.cc:15:9: error: 'LL' was not declared in this scope
   15 |         LL prev = 0;
      |         ^~
a.cc:16:11: error: expected ';' before 'in'
   16 |         LL in;
      |           ^~~
      |           ;
a.cc:18:24: error: 'in' was not declared in this scope; did you mean 'i'?
   18 |                 cin >> in;
      |                        ^~
      |                        i
a.cc:19:17: error: 'a' was not declared in this scope
   19 |                 a[i] = in - prev;
      |                 ^
a.cc:19:29: error: 'prev' was not declared in this scope
   19 |                 a[i] = in - prev;
      |                             ^~~~
a.cc:20:17: error: 'ans' was not declared in this scope
   20 |                 ans += calc(a[i]);
      |                 ^~~
a.cc:20:24: error: 'calc' was not declared in this scope
   20 |                 ans += calc(a[i]);
      |                        ^~~~
a.cc:23:11: error: expected ';' before 'l'
   23 |         LL l, r, x;
      |           ^~
      |           ;
a.cc:25:24: error: 'l' was not declared in this scope
   25 |                 cin >> l >> r >> x;
      |                        ^
a.cc:25:29: error: 'r' was not declared in this scope
   25 |                 cin >> l >> r >> x;
      |                             ^
a.cc:25:34: error: 'x' was not declared in this scope
   25 |                 cin >> l >> r >> x;
      |                                  ^
a.cc:27:17: error: 'ans' was not declared in this scope
   27 |                 ans -= calc(a[l]);
      |                 ^~~
a.cc:27:29: error: 'a' was not declared in this scope
   27 |                 ans -= calc(a[l]);
      |                             ^
a.cc:27:24: error: 'calc' was not declared in this scope
   27 |                 ans -= calc(a[l]);
      |                        ^~~~
a.cc:35:17: error: 'cout' was not declared in this scope
   35 |                 cout << ans << endl;
      |                 ^~~~
a.cc:35:32: error: 'endl' was not declared in this scope
   35 |                 cout << ans << endl;
      |                                ^~~~
Language: C++

#include <cstdio>
#include <vector>
#include <functional>
using namespace std;

long long int n, m, k, a, b, c, t;
vector<long long int> s;
long long int ans;
typedef pair<long long int, long long int> P;
vector<P> v;
vector<long long int> w;

long long int func(long long int x, long long int y, long long int z){
	if(y == s[x+1]) return 0;
	long long int tmp = t - z;
	if(tmp < 0) return 0;
	tmp /= a;
	if(y - 1 + tmp >= s[x+1]) tmp = s[x+1] - y;
	return tmp;
}

int main(){
	scanf("%lld %lld %lld %lld %lld %lld %lld", &n, &m, &k, &a, &b, &c, &t);
	for(int i=0; i<m; ++i){
		long long int tmp;
		scanf("%lld", &tmp);
		s.push_back(tmp);
		if((tmp-1) * b <= t) ++ans;
	}
	s.push_back(n+1);

	for(int i=0; i<m; ++i){
		long long int tmp = func(i, s[i]+1, (s[i]-1)*b);
		ans += tmp;
		v.push_back(P(i, s[i]+tmp+1));
	}
	printf("%lld\n", ans);

//	for(int i=0; i<v.size(); ++i) printf("%lld %lld\n", v[i].first, v[i].second);

	for(int i=0; i<v.size(); ++i){
		if(i == k) break;
		long long int tmp = 0;
		if((s[v[i].first]-1)*b + (v[i].second-s[v[i].first])*c <= t) ++tmp;
		tmp += func(v[i].first, v[i].second+1, (s[v[i].first]-1)*b+(v[i].second-s[v[i].first])*c);
		w.push_back(tmp);
		if(tmp != 0) v.push_back(P(v[i].first, v[i].second+tmp));
	}

	sort(w.begin(), w.end(), greater<long long int>());

//	for(int i=0; i<w.size(); ++i) printf("w%lld\n", w[i]);

	for(int i=0; i<k-m; ++i) ans += w[i];

	printf("%lld\n", ans-1);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:50:9: error: 'sort' was not declared in this scope; did you mean 'short'?
   50 |         sort(w.begin(), w.end(), greater<long long int>());
      |         ^~~~
      |         short
Language: Java

import java.io.IOException;
import java.util.Scanner;
public class test {
	public static void main(String[] args)throws IOException{
		Scanner scanner = new Scanner(System.in);
		int N = scanner.nextInt();
		int A = scanner.nextInt();
		int B = scanner.nextInt();
		int C = scanner.nextInt();
		int D = scanner.nextInt();
		int x,y;
		x = N%A;
		y = N%C;
		if(x != 0){
			x = (N/A+1) * B;
		}else{
			x = (N/A) * B;
		}
		if(y != 0){
		 y = (N/C + 1) * D;
		}else{
			y = (N/C) * D;
		}
		if(x <= y){
		System.out.print(x);
		}else{
			System.out.print(y);
		}
	}
		

}



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

public class Pencils{

    public static void main(String[] args){

        if(args.length == 5){

            int N = Integer.valueOf(args[0]);
            int A = Integer.valueOf(args[1]);
            int B = Integer.valueOf(args[2]);
            int C = Integer.valueOf(args[3]);
            int D = Integer.valueOf(args[4]);

            int num1 = N % A == 0 ? Math.floorDiv(N, A) : Math.floorDiv(N, A) + 1;
            int num2 = N % C == 0 ? Math.floorDiv(N, C) : Math.floorDiv(N, C) + 1;
            int min1 = B * num1;
            int min2 = D * num2;

            System.out.println((min1 < min2 ? min1 : min2));
        }
    }
}


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

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

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

		BufferedReader bfr=new BufferedReader(new InputStreamReader(System.in));
		String str="";
		StringTokenizer stk;
		int[] k1=new int[5];
		int i;
		while(true) {
			try{
				i=0;
				str=bfr.readLine();
				stk=new StringTokenizer(str," ");

				while(stk.hasMoreTokens()) {
					k1[i]=Integer.parseInt(stk.nextToken());
					i++;
				}

				int set1_nomi;
				if(k1[0]%k1[1]!=0) {
					set1_nomi=k1[0]/k1[1]+1;
				}
				else {set1_nomi=k1[0]/k1[1];}

				/*
				 int set2_nomi;
				if(k1[0]%k1[3]!=0) {
					set1_nomi=k1[0]/k1[3]+1;
				}
				else {set1_nomi=k1[0]/k1[3];}*/

				int[] sougaku=new int[set1_nomi+1];		//set1 no kosuu
				int set2_kosu;
				int saiyasune=1999999999;
				for(int jj=0; jj<set1_nomi+1; jj++) {
					set2_kosu=(k1[0]-jj*k1[1])%k1[3];
					if(set2_kosu!=0) {
						set2_kosu=(k1[0]-jj*k1[1])/k1[3]+1;
					}
					else {
						set2_kosu=(k1[0]-jj*k1[1])/k1[3];
					}
					sougaku[jj]=jj*k1[2]+set2_kosu*k1[4];
					if(saiyasune>sougaku[jj]) {
						saiyasune=sougaku[jj];
					}
				}
				System.out.println(saiyasune);
			}
			}catch(IOException e) {
				System.exit(0);
				}
			catch(NumberFormatException ee) {
				System.exit(0);
			}

			catch(NullPointerException eee) {
				System.exit(0);
			}
		}
}


Compiler output:
Main.java:15: error: 'try' without 'catch', 'finally' or resource declarations
			try{
			^
Main.java:56: error: 'catch' without 'try'
			}catch(IOException e) {
			 ^
Main.java:59: error: 'catch' without 'try'
			catch(NumberFormatException ee) {
			^
Main.java:63: error: 'catch' without 'try'
			catch(NullPointerException eee) {
			^
4 errors
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

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

		BufferedReader bfr=new BufferedReader(new InputStreamReader(System.in));
		String str="";
		StringTokenizer stk;
		int[] k1=new int[5];
		int i;
			try{
				i=0;
				str=bfr.readLine();
				stk=new StringTokenizer(str," ");

				while(stk.hasMoreTokens()) {
					k1[i]=Integer.parseInt(stk.nextToken());
					i++;
				}

				int set1_nomi;
				if(k1[0]%k1[1]!=0) {
					set1_nomi=k1[0]/k1[1]+1;
				}
				else {set1_nomi=k1[0]/k1[1];}


				int set2_nomi;
				if(k1[0]%k1[3]!=0) {
					set2_nomi=k1[0]/k1[3]+1;
				}
				else {set2_nomi=k1[0]/k1[3];}

				int[] sougaku=new int[set1_nomi+1];		//set1 no kosuu
				int set2_kosu;
				int saiyasune=1999999999;
				for(int jj=0; jj<set1_nomi+1; jj++) {
					set2_kosu=(k1[0]-jj*k1[1])%k1[3];
					if(set2_kosu!=0) {
						set2_kosu=(k1[0]-jj*k1[1])/k1[3]+1;
					}
					else {
						set2_kosu=(k1[0]-jj*k1[1])/k1[3];
					}
					sougaku[jj]=jj*k1[2]+set2_kosu*k1[4];
					if(saiyasune>sougaku[jj]) {
						saiyasune=sougaku[jj];
					}
				}

				int[] sougaku2=new int[set2_nomi+1];		//set1 no kosuu
				int set1_kosu;
				int saiyasune_2=1999999999;
				for(int jj=0; jj<set2_nomi+1; jj++) {
					set1_kosu=(k1[0]-jj*k1[3])%k1[1];
					if(set1_kosu!=0) {
						set1_kosu=(k1[0]-jj*k1[3])/k1[1]+1;
					}
					else {
						set1_kosu=(k1[0]-jj*k1[3])/k1[1];
					}
					sougaku_2[jj]=jj*k1[4]+set1_kosu*k1[2];
					if(saiyasune_2>sougaku_2[jj]) {
						saiyasune_2=sougaku_2[jj];
					}
				}
				System.out.println(Math.min(saiyasune, saiyasune_2));
			}catch(IOException e) {
				System.exit(0);
				}
			catch(NumberFormatException ee) {
				System.exit(0);
			}

			catch(NullPointerException eee) {
				System.exit(0);
			}
		}
}


Compiler output:
Main.java:65: error: cannot find symbol
					sougaku_2[jj]=jj*k1[4]+set1_kosu*k1[2];
					^
  symbol:   variable sougaku_2
  location: class Main
Main.java:66: error: cannot find symbol
					if(saiyasune_2>sougaku_2[jj]) {
					               ^
  symbol:   variable sougaku_2
  location: class Main
Main.java:67: error: cannot find symbol
						saiyasune_2=sougaku_2[jj];
						            ^
  symbol:   variable sougaku_2
  location: class Main
3 errors
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

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

		BufferedReader bfr=new BufferedReader(new InputStreamReader(System.in));
		String str="";
		StringTokenizer stk;
		int[] k1=new int[5];
		int i;
			while(true) {
				try{
					i=0;
					str=bfr.readLine();
					stk=new StringTokenizer(str," ");

					while(stk.hasMoreTokens()) {
						k1[i]=Integer.parseInt(stk.nextToken());
						i++;
					}

					int set1_nomi;
					if(k1[0]%k1[1]!=0) {
						set1_nomi=k1[0]/k1[1]+1;
					}
					else {set1_nomi=k1[0]/k1[1];}


					int set2_nomi;
					if(k1[0]%k1[3]!=0) {
						set2_nomi=k1[0]/k1[3]+1;
					}
					else {set2_nomi=k1[0]/k1[3];}

					int[] sougaku=new int[set1_nomi+1];		//set1 no kosuu
					int set2_kosu;
					int saiyasune=1999999999;
					for(int jj=0; jj<set1_nomi+1; jj++) {
						set2_kosu=(k1[0]-jj*k1[1])%k1[3];
						if(set2_kosu!=0) {
							set2_kosu=(k1[0]-jj*k1[1])/k1[3]+1;
						}
						else {
							set2_kosu=(k1[0]-jj*k1[1])/k1[3];
						}
						sougaku[jj]=jj*k1[2]+set2_kosu*k1[4];
						if(saiyasune>sougaku[jj]) {
							saiyasune=sougaku[jj];
						}
					}

					int[] sougaku2=new int[set2_nomi+1];		//set1 no kosuu
					int set1_kosu;
					int saiyasune_2=1999999999;
					for(int jj=0; jj<set2_nomi+1; jj++) {
						set1_kosu=(k1[0]-jj*k1[3])%k1[1];
						if(set1_kosu!=0) {
							set1_kosu=(k1[0]-jj*k1[3])/k1[1]+1;
						}
						else {
							set1_kosu=(k1[0]-jj*k1[3])/k1[1];
						}
						sougaku2[jj]=jj*k1[4]+set1_kosu*k1[2];
						if(saiyasune_2>sougaku2[jj]) {
							saiyasune_2=sougaku2[jj];
						}
					}
					System.out.println(Math.min(saiyasune, saiyasune_2));
				}
			}
			catch(IOException e) {
				System.exit(0);
				}
			catch(NumberFormatException ee) {
				System.exit(0);
			}

			catch(NullPointerException eee) {
				System.exit(0);
			}
		}
}


Compiler output:
Main.java:15: error: 'try' without 'catch', 'finally' or resource declarations
				try{
				^
Main.java:74: error: 'catch' without 'try'
			catch(IOException e) {
			^
Main.java:77: error: 'catch' without 'try'
			catch(NumberFormatException ee) {
			^
Main.java:81: error: 'catch' without 'try'
			catch(NullPointerException eee) {
			^
4 errors
Language: Java

import java.util.Scanner;

class PenSet{
        int number;
        int value;

        PenSet(int x,int y){
                number = x;
                value = y;
        }
}

public class Pencils{
        public static void main(String[] args){
                int val,num,setNum,i,j,min=0;

                Scanner scn = new Scanner(System.in);
                num = scn.nextInt();
                setNum = scn.nextInt();
                val = scn.nextInt();
                PenSet x = new PenSet(setNum,val);
                setNum = scn.nextInt();
                val = scn.nextInt();
                PenSet y = new PenSet(setNum,val);

                for(i=-1;i*x.number<num;i++){
                        for(j=0;(i+1)*x.number+j*y.number<num;j++);
                        if(i==-1||((i+1)*x.value + j*y.value)<min)
                                min=((i+1)*x.value + j*y.value);
                }

                System.out.println(min);

        }
}


Compiler output:
Main.java:13: error: class Pencils is public, should be declared in a file named Pencils.java
public class Pencils{
       ^
1 error
Language: C

#include <stdio.h>

int main(void) {
   int  N,A,B,C,D,price_X,price_Y,mod;
   scanf( "%d %d %d %d %d" , &N,&A,&B,&C,&D );
   mod=( N%A != 0 )
   price_X=(N/A+mod)*B;
   mod=( N%C != 0 )
   price_Y=(N/C+mod)*D;
   if( price_X < price_Y ){
	 printf("%d\n" , price_X);
      }else{
    	 printf("%d\n" , price_Y);
      }
   return 0;
}



Compiler output:
main.c: In function 'main':
main.c:6:20: error: expected ';' before 'price_X'
    6 |    mod=( N%A != 0 )
      |                    ^
      |                    ;
    7 |    price_X=(N/A+mod)*B;
      |    ~~~~~~~          
main.c:8:20: error: expected ';' before 'price_Y'
    8 |    mod=( N%C != 0 )
      |                    ^
      |                    ;
    9 |    price_Y=(N/C+mod)*D;
      |    ~~~~~~~
Language: C

#include <stdio.h>
#defin AB (N/A+( N%A != 0 ))*B
#defin CD (N/C+( N%C != 0 ))*D

int main(void) {
   int  N,A,B,C,D;
   scanf( "%d %d %d %d %d" , &N,&A,&B,&C,&D );
   printf("%d\n" , ((N/A+( N%A != 0 ))*B<(N/C+( N%C != 0 ))*D)*(N/A+( N%A != 0 ))*B+((N/A+( N%A != 0 ))*B>=(N/C+( N%C != 0 ))*D)*(N/C+( N%C != 0 ))*D);
   return 0;
}



Compiler output:
main.c:2:2: error: invalid preprocessing directive #defin; did you mean #define?
    2 | #defin AB (N/A+( N%A != 0 ))*B
      |  ^~~~~
      |  define
main.c:3:2: error: invalid preprocessing directive #defin; did you mean #define?
    3 | #defin CD (N/C+( N%C != 0 ))*D
      |  ^~~~~
      |  define
Language: C

#include<iostream>
using namespace std;
// ??
int main(){
  int n, a, b, c, d;
  cin >> n >> a >> b >> c >> d;
  int x = (n/a)*b + (n%a>0?1:0)*b;
  int y = (n/c)*d + (n%c>0?1:0)*d;
  if ( x > y ) cout << x << endl;
  else cout << y << endl;

  return 0;
}





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

// http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0641


#include<iostream>
 using namespace std; //標準名前空間を使用

int main(){

    /変数を読み込む
    int N , A , B ,C ,D ;
    int Xset , Yset , Xprice , Yprice;

    // セットXで揃えた場合のの必要セット数(Xset)を求める
    Xset = N / A + 1 ;
    // セットXで揃えた場合の合計金額を求める
    Xprice = Xset * B ;


    // セットYで揃えた場合のの必要セット数(Yset)を求める
    Yset = N / C + 1 ;
    // セットXで揃えた場合の合計金額を求める
    Yprice = Yset * D ;

    //XpriceとYpriceを比較する
    if(Xprice < Yprice){
    cout << Xprice ; //XpriceがYpriceより小さい場合、Xpriceを出力
    }else{
    out << Yprice ; //そうでない場合、Ypriceを出力
    }

 return 0;

 }


Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: expected primary-expression before '/' token
    9 |     /変数を読み込む
      |     ^
a.cc:9:6: error: '\U00005909\U00006570\U00003092\U00008aad\U0000307f\U00008fbc\U00003080' was not declared in this scope
    9 |     /変数を読み込む
      |      ^~~~~~~~~~~~~~
a.cc:14:12: error: 'N' was not declared in this scope
   14 |     Xset = N / A + 1 ;
      |            ^
a.cc:14:16: error: 'A' was not declared in this scope
   14 |     Xset = N / A + 1 ;
      |                ^
a.cc:16:21: error: 'B' was not declared in this scope
   16 |     Xprice = Xset * B ;
      |                     ^
a.cc:20:16: error: 'C' was not declared in this scope
   20 |     Yset = N / C + 1 ;
      |                ^
a.cc:22:21: error: 'D' was not declared in this scope
   22 |     Yprice = Yset * D ;
      |                     ^
a.cc:28:5: error: 'out' was not declared in this scope
   28 |     out << Yprice ; //そうでない場合、Ypriceを出力
      |     ^~~
Language: C++

// http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0641


#include<iostream>
 using namespace std; //標準名前空間を使用

int main(){

    //変数を読み込む
    int N , A , B ,C ,D ;
    int Xset , Yset , Xprice , Yprice;

    // セットXで揃えた場合の必要セット数(Xset)を求める
    Xset = N / A + 1 ;
    // セットXで揃えた場合の合計金額を求める
    Xprice = Xset * B ;


    // セットYで揃えた場合のの必要セット数(Yset)を求める
    Yset = N / C + 1 ;
    // セットXで揃えた場合の合計金額を求める
    Yprice = Yset * D ;

    //XpriceとYpriceを比較する
    if(Xprice < Yprice){
    cout << Xprice ; //XpriceがYpriceより小さい場合、Xpriceを出力
    }else{
    out << Yprice ; //そうでない場合、Ypriceを出力
    }

 return 0;

 }


Compiler output:
a.cc: In function 'int main()':
a.cc:28:5: error: 'out' was not declared in this scope
   28 |     out << Yprice ; //そうでない場合、Ypriceを出力
      |     ^~~
Language: C++

#include<string.h>
int main(void)
{	
	int n,x,y,a,b,c,d;
	scanf("%d",&n);
	scanf("%d",&a);
	scanf("%d",&b);
	scanf("%d",&c);
	scanf("%d",&d);
	x=n/a*b;
	y=n/c*d;
	if(n%a>0){
		x=x+b;
	}
	if(n%c>0){
		y=y+d;
	}
	if(x<y){
		printf("%d\n",x);
	}
	else{
		printf("%d\n",y);
	}
	
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: 'scanf' was not declared in this scope
    5 |         scanf("%d",&n);
      |         ^~~~~
a.cc:19:17: error: 'printf' was not declared in this scope
   19 |                 printf("%d\n",x);
      |                 ^~~~~~
a.cc:2:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
    1 | #include<string.h>
  +++ |+#include <cstdio>
    2 | int main(void)
a.cc:22:17: error: 'printf' was not declared in this scope
   22 |                 printf("%d\n",y);
      |                 ^~~~~~
a.cc:22:17: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C++

#include <iostream>
 
using namespace std;
 
int N,A,B,C,D
int X_SET,Y_SET,X_SUM,Y_SUM;
int main(){
cin>>N>>A>>B>>C>>D;
X_SET = N/A;
if(N%A>0)X_SET=X_SET+1;
Y_SET=N/C;
if(N%C>0)Y_SET+1;
X_SUM=B*X_SET;
Y_SUM=D*Y_SET;
if(X_SUM<Y_SUM)cout<<X_SUM<<endl;
else
cout<<Y_SUM<<endl;
return0;
}


Compiler output:
a.cc:6:1: error: expected initializer before 'int'
    6 | int X_SET,Y_SET,X_SUM,Y_SUM;
      | ^~~
a.cc: In function 'int main()':
a.cc:8:18: error: 'D' was not declared in this scope
    8 | cin>>N>>A>>B>>C>>D;
      |                  ^
a.cc:9:1: error: 'X_SET' was not declared in this scope; did you mean 'FD_SET'?
    9 | X_SET = N/A;
      | ^~~~~
      | FD_SET
a.cc:11:1: error: 'Y_SET' was not declared in this scope; did you mean 'FD_SET'?
   11 | Y_SET=N/C;
      | ^~~~~
      | FD_SET
a.cc:13:1: error: 'X_SUM' was not declared in this scope
   13 | X_SUM=B*X_SET;
      | ^~~~~
a.cc:14:1: error: 'Y_SUM' was not declared in this scope
   14 | Y_SUM=D*Y_SET;
      | ^~~~~
a.cc:18:1: error: 'return0' was not declared in this scope
   18 | return0;
      | ^~~~~~~
Language: C++

#include <iostream>
using namespace std;
int main(void){
    int n,a,b,c,d;
    int x,y;
    cin >> n,a,b,c,d;
    
    x=n/a;
    if(x!=1) x++;
    x=x*c;

    y=n/b;
    if(y!=1) y++;
    y=y*d;

    if(x<y){
     count << x;
    }else{
     count << y;
    }

return 0;
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:6: error: 'count' was not declared in this scope
   17 |      count << x;
      |      ^~~~~
a.cc:19:6: error: 'count' was not declared in this scope
   19 |      count << y;
      |      ^~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
    int N,A,B,C,D;
    cin >> N >> A >> B >> C >> D;
    int AN = N/A+1;
    if(N%A==0)NA--;
    int CN = N/C+1;
    if(N%C==0)NC--;
    cout << min(AN*B,CN*D) << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:15: error: 'NA' was not declared in this scope; did you mean 'AN'?
    7 |     if(N%A==0)NA--;
      |               ^~
      |               AN
a.cc:9:15: error: 'NC' was not declared in this scope; did you mean 'CN'?
    9 |     if(N%C==0)NC--;
      |               ^~
      |               CN
Language: C++

#include<bits/stdc++.h>
using namespace std;

int main() {
int N,A,B,C,D,E,F;
cin >> N >> A >> B >> C >> D;
   E = (N/A)*B;
   F = (N/C)*D;
   if(E>0&&F>0){
   if(A>C && B>D){
       cout<< E <<endl;
  } 
   if(A>C && B<D){
       cout<< E <<endl;
  } 
   if(A<C && B<D){
        cout<< F << endl;
  }
  if(A<C && B>D){
       cout<< F <<endl;
  } 
 
 }


Compiler output:
a.cc: In function 'int main()':
a.cc:23:3: error: expected '}' at end of input
   23 |  }
      |   ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#included<bits/stdc++.h>
int main(){
    int N,A,B,C,D;
    double x,y;
    scanf("%d%d%d%d%d",&N,&A,&B,&C,&D);
    x=N/A;
    y=N/C;
    x=ceil(x);
    y=ceil(y);
    if (B*x <= D*y)
{printf(B*x);
else{printf(D*y);}



return 0;
}


Compiler output:
a.cc:1:2: error: invalid preprocessing directive #included; did you mean #include?
    1 | #included<bits/stdc++.h>
      |  ^~~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:5:5: error: 'scanf' was not declared in this scope
    5 |     scanf("%d%d%d%d%d",&N,&A,&B,&C,&D);
      |     ^~~~~
a.cc:8:7: error: 'ceil' was not declared in this scope
    8 |     x=ceil(x);
      |       ^~~~
a.cc:11:2: error: 'printf' was not declared in this scope
   11 | {printf(B*x);
      |  ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | #included<bits/stdc++.h>
a.cc:12:1: error: expected '}' before 'else'
   12 | else{printf(D*y);}
      | ^~~~
a.cc:11:1: note: to match this '{'
   11 | {printf(B*x);
      | ^
a.cc:12:6: error: 'printf' was not declared in this scope
   12 | else{printf(D*y);}
      |      ^~~~~~
a.cc:12:6: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C++

#include<stdio.h>
#include<math.h>
int main(void){
    int N,A,B,C,D;
    scanf("%d%d%d%d%d",&N,&A,&B,&C,&D);
    double x=ceil(N/A);
    double y=ceil(N/C);
    if (B*x <= D*y)
{printf(B*x);
else{printf(D*y);}



return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:10: error: cannot convert 'double' to 'const char*'
    9 | {printf(B*x);
      |         ~^~
      |          |
      |          double
In file included from a.cc:1:
/usr/include/stdio.h:363:43: note:   initializing argument 1 of 'int printf(const char*, ...)'
  363 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
a.cc:10:1: error: expected '}' before 'else'
   10 | else{printf(D*y);}
      | ^~~~
a.cc:9:1: note: to match this '{'
    9 | {printf(B*x);
      | ^
a.cc:10:14: error: cannot convert 'double' to 'const char*'
   10 | else{printf(D*y);}
      |             ~^~
      |              |
      |              double
/usr/include/stdio.h:363:43: note:   initializing argument 1 of 'int printf(const char*, ...)'
  363 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
Language: C++

#include<sbits/stdc++.h>
#include<math.h>
int main(void){
    int N,A,B,C,D;
    scanf("%d%d%d%d%d",&N,&A,&B,&C,&D);
    double x=ceil(N/A);
    double y=ceil(N/C);
    if (B*x <= D*y)
{printf(B*x);
else{printf(D*y);}



return 0;
}


Compiler output:
a.cc:1:9: fatal error: sbits/stdc++.h: No such file or directory
    1 | #include<sbits/stdc++.h>
      |         ^~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include<sbits/stdc++.h>
#include<math.h>
int main(void){
    int N,A,B,C,D;
    scanf("%d%d%d%d%d",&N,&A,&B,&C,&D);
    double x=ceil(N/A);
    double y=ceil(N/C);
    if (B*x <= D*y)
{printf("B*x\n");}
else{printf("D*y\n");}
return 0;
}


Compiler output:
a.cc:1:9: fatal error: sbits/stdc++.h: No such file or directory
    1 | #include<sbits/stdc++.h>
      |         ^~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include<iostream>
using namespace std;

int main() {
	int n, a, b, c, d,x,y;
	cin  n >> a >> b >> c >> d;
	if (n%a > 0) {
		x = (n / a + 1)*b;
	}
	else {
		x = (n / a)*b;
	}
	if (n%c > 0) {
		y = (n / c + 1)*d;
	}
	else {
		y = (n / c)*d;
	}
	cout << min(x, y) << endl;
	return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:6:12: error: expected ';' before 'n'
    6 |         cin  n >> a >> b >> c >> d;
      |            ^ ~
      |            ;
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main (void)
{
    int n,a,b,c,d;
    cin>>n>>a>>b>>c>>d;
    cout <<min(n+a-1)/a*b , (n+c-1)/c*d<<endl;
    return 0;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:15: error: no matching function for call to 'min(int)'
    7 |     cout <<min(n+a-1)/a*b , (n+c-1)/c*d<<endl;
      |            ~~~^~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note:   candidate expects 3 arguments, 1 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5686:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)'
 5686 |     min(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5686:5: note:   template argument deduction/substitution failed:
a.cc:7:15: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
    7 |     cout <<min(n+a-1)/a*b , (n+c-1)/c*d<<endl;
      |            ~~~^~~~~~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)'
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note:   candidate expects 2 arguments, 1 provided
a.cc:7:40: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
    7 |     cout <<min(n+a-1)/a*b , (n+c-1)/c*d<<endl;
      |                             ~~~~~~~~~~~^~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main ()
{
    int n,a,b,c,d;
    cin>>n>>a>>b>>c>>d;
    cout <<min(n+a-1)/a*b , (n+c-1)/c*d<<endl;
    return 0;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:15: error: no matching function for call to 'min(int)'
    7 |     cout <<min(n+a-1)/a*b , (n+c-1)/c*d<<endl;
      |            ~~~^~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note:   candidate expects 3 arguments, 1 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5686:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)'
 5686 |     min(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5686:5: note:   template argument deduction/substitution failed:
a.cc:7:15: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
    7 |     cout <<min(n+a-1)/a*b , (n+c-1)/c*d<<endl;
      |            ~~~^~~~~~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)'
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note:   candidate expects 2 arguments, 1 provided
a.cc:7:40: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
    7 |     cout <<min(n+a-1)/a*b , (n+c-1)/c*d<<endl;
      |                             ~~~~~~~~~~~^~~~~~
Language: C++

n,a,b,c,d = map(int,input().split())
print(min(((n-1)//a+1)*b,((n-1)//c+1)*d))


Compiler output:
a.cc:1:1: error: 'n' does not name a type
    1 | n,a,b,c,d = map(int,input().split())
      | ^
Language: C++

// http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0642



#include<iostream>
 using namespace std; //標準名前空間を使用


    int main(){

    int sugorokunomasu[1000] ;
    int N ;
    int saidairenzokusuucount ; // 1の最大連続数カウント
    int saidairenzokusuucountmax ; // 1の最大連続数の最大値

    cin >> N ;


            for (int i = 0; i <= N ; i = i + 1 ){
            　cin >> sugorokunomasu[i] ; //すごろくのマスの読み込み

                    if(sugorokunomasu[i] == 1){ // すごろくのマスに1が出てきた場合
                        saidairenzokusuucount =  saidairenzokusuucount + 1 ; //1の最大連続数カウントに1を+

                    }else{ //すごろくのマスに0が出てきた場合

                        if(saidairenzokusuucount > saidairenzokusuucountmax) // 1の最大連続数の最大値を更新されているかの判定
                        { 
                        saidairenzokusuucountmax = saidairenzokusuucount ; //更新されていれば、1の最大連続数の最大値を更新
                        }else{
                        //最大値を更新しない場合は何もしない
                        }

                    saidairenzokusuucount = 0 ; //1の最大連続数カウントをフラッシュして0に
                    
                    }

                


            }


    cout << saidairenzokusuucountmax + 1 << endl ;
    }       






Compiler output:
a.cc:20:13: error: extended character 　 is not valid in an identifier
   20 |             　cin >> sugorokunomasu[i] ; //すごろくのマスの読み込み
      |             ^
a.cc: In function 'int main()':
a.cc:20:13: error: '\U00003000cin' was not declared in this scope
   20 |             　cin >> sugorokunomasu[i] ; //すごろくのマスの読み込み
      |             ^~~~~
Language: C++

#include <iostream>
using namespace std;
#include <vector>
#include <sstream>


int main(void){
    // 自分の得意な言語で
    // Let's チャレンジ！！

    string str;
    int N;
    int count = 0;
    int ConsecutiveOnes = 0;
    int Max_Ones = 0;
    int ThisNum
    while(getline(cin, str)){
        stringstream ss;
        ss << str;
        if(count == 0){
            ss >> N;
        }
        else{
            for(int i = 0;i < N;i++){
                ss >> ThisNum;
                if(ThisNum){
                    ConsecutiveOnes++;
                }
                else{
                    ConsecutiveOnes = 0;
                }
                if(ConsecutiveOnes > Max_Ones){
                    Max_Ones = ConsecutiveOnes;
                }
            }
        }
        
        count++;
    }
    
    
    
    cout << Max_Ones + 1 << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:5: error: expected initializer before 'while'
   17 |     while(getline(cin, str)){
      |     ^~~~~
Language: C++

#include <iostream>
using namespace std;
#include <vector>
#include <sstream>


int main(void){
    // 自分の得意な言語で
    // Let's チャレンジ！！

    string str;
    int N;
    int count = 0;
    int ConsectiveOnes = 0;
    int Max_Ones = 0;
    int ThisNum;
    while(getline(cin, str)){
        stringstream ss;
        ss << str;
        if(count == 0){
            ss >> N;
        }
        else{
            for(int i = 0;i < N;i++){
                ss >> ThisNum;
                if(ThisNum){
                    ConsecutiveOnes++;
                }
                else{
                    ConsecutiveOnes = 0;
                }
                if(ConsecutiveOnes > Max_Ones){
                    Max_Ones = ConsecutiveOnes;
                }
            }
        }
        
        
        count++;
    }
    
    
    
    cout << Max_Ones + 1 << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:27:21: error: 'ConsecutiveOnes' was not declared in this scope; did you mean 'ConsectiveOnes'?
   27 |                     ConsecutiveOnes++;
      |                     ^~~~~~~~~~~~~~~
      |                     ConsectiveOnes
a.cc:30:21: error: 'ConsecutiveOnes' was not declared in this scope; did you mean 'ConsectiveOnes'?
   30 |                     ConsecutiveOnes = 0;
      |                     ^~~~~~~~~~~~~~~
      |                     ConsectiveOnes
a.cc:32:20: error: 'ConsecutiveOnes' was not declared in this scope; did you mean 'ConsectiveOnes'?
   32 |                 if(ConsecutiveOnes > Max_Ones){
      |                    ^~~~~~~~~~~~~~~
      |                    ConsectiveOnes
Language: C++

5#include <iostream>
using namespace std;
int main(void){
    int N, i, a, b, c, d, x=1, y=0;
    int bm, dm, as;

    cin >> N;
    for (i = 0;i < N; i++) {
        cin >> a;
        if (a == 0) x = 0;
        x++;
        if (x > y) y = x;
    }

    cout << y << endl;
    return 0;
}


Compiler output:
a.cc:1:2: error: stray '#' in program
    1 | 5#include <iostream>
      |  ^
a.cc:1:1: error: expected unqualified-id before numeric constant
    1 | 5#include <iostream>
      | ^
a.cc: In function 'int main()':
a.cc:7:5: error: 'cin' was not declared in this scope
    7 |     cin >> N;
      |     ^~~
a.cc:15:5: error: 'cout' was not declared in this scope
   15 |     cout << y << endl;
      |     ^~~~
a.cc:15:18: error: 'endl' was not declared in this scope
   15 |     cout << y << endl;
      |                  ^~~~
Language: C++

#include <iostream>
using namespace std;
int main(void)
{
    int N,i,j;
    int counter=0,ans=1;
    int a[N];
    cin>>N;
    for(i=1;i<=N;i++)
    {
        cin>>a[i];
    }
    a[N+1]=0;
    for(j=1;j<=N+1;j++)
    {
        if(a[j]==0)
        {
            ans=max(ans,j-counter);
            counter=j;
        }
    cout<<ans<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:2: error: expected '}' at end of input
   22 | }
      |  ^
a.cc:4:1: note: to match this '{'
    4 | {
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int N;
  int A[100];
  cin>>N;
  FOR(i,0,N){
    cin>>A[i];
  }
  int ans=0;
  FOR(i,0,N){
    int cnt=0;
    while(i<N&&A[i]==1){
      i++;
      cnt++;
    }
    ans=max(ans,cnt);
  }
  cout<<ans+1<<endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:7: error: 'i' was not declared in this scope
    7 |   FOR(i,0,N){
      |       ^
a.cc:7:3: error: 'FOR' was not declared in this scope
    7 |   FOR(i,0,N){
      |   ^~~
Language: C++

int main()
{
	//2.すごろく	
	int n;
	cin >> n;
	int A ,_A = 1;
	int k = 0;
	int count[100];
	count[k] = 1;
	for (int i = 0; i < n; n++)
	{
		cin >> A;
		if (A == 1)
		{
			if (A == _A)
			{
				count[k]++;
				cout << count[k] << endl;
			}
			else
			{
				k++;
				count[k] = 1;
			}
		}
		_A = A;
	}
	sort(count, count + k);
	cout << count[k] <<endl;

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: 'cin' was not declared in this scope
    5 |         cin >> n;
      |         ^~~
a.cc:18:33: error: 'cout' was not declared in this scope; did you mean 'count'?
   18 |                                 cout << count[k] << endl;
      |                                 ^~~~
      |                                 count
a.cc:18:53: error: 'endl' was not declared in this scope
   18 |                                 cout << count[k] << endl;
      |                                                     ^~~~
a.cc:28:9: error: 'sort' was not declared in this scope; did you mean 'short'?
   28 |         sort(count, count + k);
      |         ^~~~
      |         short
a.cc:29:9: error: 'cout' was not declared in this scope; did you mean 'count'?
   29 |         cout << count[k] <<endl;
      |         ^~~~
      |         count
a.cc:29:28: error: 'endl' was not declared in this scope
   29 |         cout << count[k] <<endl;
      |                            ^~~~
Language: C++

int main()
{
	//2.すごろく	
	int n;
	cin >> n;
	int A, _A = 1;
	int k = 0;
	int count[100];
	count[k] = 1;
	for (int i = 0; i < n; n++)
	{
		cin >> A;
		if (A == 1)
		{
			if (A == _A)
			{
				count[k]++;
			}
			else
			{
				k++;
				count[k] = 2;
			}
		}
		_A = A;
	}
	sort(count, count + k);
	cout << count[k] << endl;

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: 'cin' was not declared in this scope
    5 |         cin >> n;
      |         ^~~
a.cc:27:9: error: 'sort' was not declared in this scope; did you mean 'short'?
   27 |         sort(count, count + k);
      |         ^~~~
      |         short
a.cc:28:9: error: 'cout' was not declared in this scope; did you mean 'count'?
   28 |         cout << count[k] << endl;
      |         ^~~~
      |         count
a.cc:28:29: error: 'endl' was not declared in this scope
   28 |         cout << count[k] << endl;
      |                             ^~~~
Language: C++

int main()
{
	//2.すごろく	
	int n;
	cin >> n;
	int A, _A = 1;
	int k = 0;
	int count[100];
	count[k] = 1;
	for (int i = 0; i < n; i++)
	{
		cin >> A;
		if (A == 1)
		{
			if (A == _A)
			{
				count[k]++;
			}
			else
			{
				k++;
				count[k] = 2;
			}
		}
		_A = A;
	}
	sort(count, count + k);
	cout << count[k] << endl;

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: 'cin' was not declared in this scope
    5 |         cin >> n;
      |         ^~~
a.cc:27:9: error: 'sort' was not declared in this scope; did you mean 'short'?
   27 |         sort(count, count + k);
      |         ^~~~
      |         short
a.cc:28:9: error: 'cout' was not declared in this scope; did you mean 'count'?
   28 |         cout << count[k] << endl;
      |         ^~~~
      |         count
a.cc:28:29: error: 'endl' was not declared in this scope
   28 |         cout << count[k] << endl;
      |                             ^~~~
Language: C++

n = int(input())
a = list(map(int,input().split()))
for i in range(1,n):
    if a[i] > 0:
        a[i] += a[i-1]
print(max(a[i])+1)


Compiler output:
a.cc:1:1: error: 'n' does not name a type
    1 | n = int(input())
      | ^