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

/*
	0088:The Code A Doctor Loved
*/
#include	<iostream>
#include	<string>

using namespace std;

const string convertList[2][32] = 
	{
		{
			  "100101", "10011010",     "0101",     "0001",      "110",    "01001", "10011011",   "010000",
			    "0111", "10011000",     "0110",    "00100", "10011001", "10011110",    "00101",      "111",
			"10011111",     "1000",    "00110",    "00111", "10011100", "10011101",   "000010", "10010010",
			"10010011", "10010000",      "101",   "000000",   "000011", "10010001",   "010001",   "000001"
		},
		{
			"00000", "00001", "00010", "00011", "00100", "00101", "00110", "00111",
			"01000", "01001", "01010", "01011", "01100", "01101", "01110", "01111",
			"10000", "10001", "10010", "10011", "10100", "10101", "10110", "10111",
			"11000", "11001", "11010", "11011", "11100", "11101", "11110", "11111"
		}
	};

const char charList[32] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ .,-'?";

int main(void) {
	string str, buff, result;
	
	getline(cin, str);
	
	string::iterator str_it = str.begin();
	while(str_it != str.end()) {
		for(int i = 0; i < 32; i++) {
			if(*str_it == charList[i]) {
				buff += convertList[0][i];
				break;
			}
		}
		str_it++;
	}
	while( buff.size() % 5 != 0 ) {
		buff += '0';
	}
	string::iterator buff_it = buff.begin();
	while( buff_it != buff.end() ) {
		string buffbuff;
		
		for(int i = 0; i < 5; i++, buff_it++) {
			buffbuff += *buff_it;
		}
		for(int i = 0; i < 32; i++) {
			if(buffbuff == convertList[1][i]) {
				result += charList[i];
				break;
			}
		}
	}
	cout << result << endl;
}

Compiler output:
a.cc:25:27: error: initializer-string for 'const char [32]' is too long [-fpermissive]
   25 | const char charList[32] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ .,-'?";
      |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include<iostream>
#include<string>
#include<map>
using namespace std;

map<string, string> wtoi;
map<string, string> itow;

void make_dictonary1() {
	wtoi[" "] = "101"; wtoi["'"] = "000000"; wtoi[","] = "000011"; wtoi["-"] = "10010001"; wtoi["."] = "010001";
	wtoi["?"] = "000001"; wtoi["A"] = "100101"; wtoi["B"] = "10011010"; wtoi["C"] = "0101"; wtoi["D"] = "0001";
	wtoi["E"] = "110"; wtoi["F"] = "01001"; wtoi["G"] = "10011011"; wtoi["H"] = "010000"; wtoi["I"] = "0111";
	wtoi["J"] = "10011000 "; wtoi["K"] = "0110"; wtoi["L"] = "00100"; wtoi["M"] = "10011001"; wtoi["N"] = "00101";
	wtoi["O"] = "00101"; wtoi["P"] = "111"; wtoi["Q"] = "10011111"; wtoi["R"] = "1000"; wtoi["S"] = "00110";
	wtoi["T"] = "00111"; wtoi["U"] = "10011100"; wtoi["V"] = "10011101"; wtoi["W"] = "000010"; wtoi["X"] = "10010010"; 
	wtoi["Y"] = "10010011"; wtoi["Z"] = "10010000";
}
void make_dictonary2() {
	int i, j;
	for( i = 0; i < 26; i++ ) {
		char c = 'A' + i;
		string str;
		str += c;
		string in;
		for( j = 4; j >= 0; j-- ) {
			if ( (i>>(j))%2 )
				in += '1';
			else
				in += '0';
		}
		itow[in] = str;
	}
	itow["11011"] = "."; itow["11100"] = ","; itow["11101"] = "-"; itow["11110"] = "'"; itow["11111"] = "?";
}

char buf[512];
int buflen;

int main() {
	make_dictonary1();
	make_dictonary2();
	int i, j;
	gets(buf);
	buflen = strlen(buf);
	
	string intejor;
	
	for( i = 0; i < buflen; i++ ) {
		string in;
		in += buf[i];
		intejor += wtoi[in];
	}
	
	string str[514];
	for( i = 0; i < intejor.length(); i+=5 ) {
		for( int j = i; j < i + 5; j++ ) {
			if ( j >= intejor.length() )
				str[i] += '0';
			else
				str[i] += intejor[j];
		}
		//cout << str[i] << endl;
	}
	
	for( j = 0; j < i; j++ ) {
		cout << itow[str[j]];
	}
	cout << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:43:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
   43 |         gets(buf);
      |         ^~~~
      |         getw
a.cc:44:18: error: 'strlen' was not declared in this scope
   44 |         buflen = strlen(buf);
      |                  ^~~~~~
a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    3 | #include<map>
  +++ |+#include <cstring>
    4 | using namespace std;
Language: C++

#include <iostream>
#include <cstring>
using namespace std;

int main() {
	char code[32][15] = {
		"101","000000","000011","10010001","010001","000001","100101","10011010",
		"0101","0001","110","01001","10011011","010000","0111","10011000",
		"0110","00100","10011001","10011110","00101","111","10011111","1000",
		"00110","00111","10011100","10011101","000010","10010010","10010011","10010000"
	};
	int coden[255];
	char tmp[33] = " ',-.?ABCDEFGHIJKLMNOPQRSTUVWXYZ";
	for (int i = 0; i < 32; i++) {
		coden[tmp[i]] = i;
	}
	char str[100];
	int makedcode[1500];
	int count;

	while (gets(str) != NULL) {
		count = 0;
		for (int i = 0, slen = strlen(str); i < slen; i++) {
			for (int j = 0, clen = strlen(code[coden[str[i]]]); j < clen; j++) {
				makedcode[count++] = code[coden[str[i]]][j] - '0';
			}
		}
		for (int i = 0, j = 0, sum;; i++, j++) {
			if (j == 5) {
				if ('a' - 'a' <= sum && sum <= 'z' - 'a')
					cout << (char)(sum + 'A');
				else {
					char c;
					switch (sum) {
					case 26:
						c = ' '; break;
					case 27:
						c = '.'; break;
					case 28:
						c = ','; break;
					case 29:
						c = '-'; break;
					case 30:
						c = '\''; break;
					case 31:
						c = '?'; break;
					}
					cout << c;
				}
				if (i >= count)
					break;
				j = 0;
			}
			if (j == 0)
				sum = 0;
			if (i < count)
				sum = (sum << 1) + makedcode[i];
			else
				sum = sum << 1;
		}
		cout << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:16: error: 'gets' was not declared in this scope; did you mean 'getw'?
   21 |         while (gets(str) != NULL) {
      |                ^~~~
      |                getw
Language: C++

mp = {}
mp[" "] = "101"
mp["'"] = "000000"
mp[","] = "000011"
mp["-"] = "10010001"
mp["."] = "010001"
mp["?"] = "000001"
mp["A"] = "100101"
mp["B"] = "10011010"
mp["C"] = "0101"
mp["D"] = "0001"
mp["E"]="110"
mp["F"]="01001"
mp["G"]="10011011"
mp["H"]="010000"
mp["I"]="0111"
mp["J"]="10011000"
mp["K"]="0110"
mp["L"]="00100"
mp["M"]="10011001"
mp["N"]="10011110"
mp["O"]="00101"
mp["P"]="111"
mp["Q"]="10011111"
mp["R"]="1000"
mp["S"]="00110"
mp["T"]="00111"
mp["U"]="10011100"
mp["V"]="10011101"
mp["W"]="000010"
mp["X"]="10010010"
mp["Y"]="10010011"
mp["Z"]="10010000"

gyaku = "ABCDEFGHIJKLMNOPQRSTUVWXYZ .,-'?"

while s=gets
  s=s.chomp
  t=""
  for i in 0...s.length
    t+=mp[s[i]]
  end
  n = t.length
  t += "0"*((5-n%5)%5)
  n = t.length
  res = ""
  for i in 0...(n/5)
    beg = i*5
    id = 0
    for j in 0...5
      id*=2
      id+=(t[beg+j]=="0" ? 0 : 1)
    end
    res += gyaku[id]
  end
  puts res
end

Compiler output:
a.cc:40:12: error: too many decimal points in number
   40 |   for i in 0...s.length
      |            ^~~~~~~~~~~~
a.cc:47:12: error: too many decimal points in number
   47 |   for i in 0...(n/5)
      |            ^~~~
a.cc:50:14: error: too many decimal points in number
   50 |     for j in 0...5
      |              ^~~~~
a.cc:1:1: error: 'mp' does not name a type
    1 | mp = {}
      | ^~
a.cc:2:1: error: 'mp' does not name a type
    2 | mp[" "] = "101"
      | ^~
Language: C++

#include <iostream>
#include <string>


std::string encode(char c){
    if(c == ' ') return "101";
    if(c == '\'') return "000000";
    if(c == ',') return "000011";
    if(c == '-') return "10010001";
    if(c == '.') return "010001";
    if(c == '?') return "000001";
    if(c == 'A') return "100101";
    if(c == 'B') return "10011010";
    if(c == 'C') return "0101";
    if(c == 'D') return "0001";
    if(c == 'E') return "110";
    if(c == 'F') return "01001";
    if(c == 'G') return "10011011";
    if(c == 'H') return "010000";
    if(c == 'I') return "0111";
    if(c == 'J') return "10011000";
    if(c == 'K') return "0110";
    if(c == 'L') return "00100";
    if(c == 'M') return "10011001";
    if(c == 'N') return "10011110";
    if(c == 'O') return "00101";
    if(c == 'P') return "111";
    if(c == 'Q') return "10011111";
    if(c == 'R') return "1000";
    if(c == 'S') return "00110";
    if(c == 'T') return "00111";
    if(c == 'U') return "10011100";
    if(c == 'V') return "10011101";
    if(c == 'W') return "000010";
    if(c == 'X') return "10010010";
    if(c == 'Y') return "10010011";
    if(c == 'Z') return "10010000";
    return "";
}

std::string encode2(std::string s){
    if(s == "00000") return "A";
    if(s == "00001") return "B";
    if(s == "00010") return "C";
    if(s == "00011") return "D";
    if(s == "00100") return "E";
    if(s == "00101") return "F";
    if(s == "00110") return "G";
    if(s == "00111") return "H";
    if(s == "01000") return "I";
    if(s == "01001") return "J";
    if(s == "01010") return "K";
    if(s == "01011") return "L";
    if(s == "01100") return "M";
    if(s == "01101") return "N";
    if(s == "01110") return "O";
    if(s == "01111") return "P";
    if(s == "10000") return "Q"
    if(s == "10001") return "R";
    if(s == "10010") return "S";
    if(s == "10011") return "T";
    if(s == "10100") return "U";
    if(s == "10101") return "V";
    if(s == "10110") return "W";
    if(s == "10111") return "X";
    if(s == "11000") return "Y";
    if(s == "11001") return "Z";
    if(s == "11010") return " ";
    if(s == "11011") return ".";
    if(s == "11100") return ",";
    if(s == "11101") return "-";
    if(s == "11110") return "'";
    if(s == "11111") return "?";
    return "";
}

int main(){
    std::string str, tmp, ans;
    while(getline(std::cin, str)){
        tmp = "", ans = "";
        for(int i = 0; i < str.size(); i++){
            tmp += encode(str[i]);
        }

        int n = 5 - (tmp.size() % 5);
        for(int i = 0; i < n; i++) tmp += "0";

        for(int i = 0; i < tmp.size() / 5; i++){
            ans += encode2(tmp.substr(i * 5, 5));
        }

        std::cout << ans << std::endl;
    }

    return 0;
}

Compiler output:
a.cc: In function 'std::string encode2(std::string)':
a.cc:58:32: error: expected ';' before 'if'
   58 |     if(s == "10000") return "Q"
      |                                ^
      |                                ;
   59 |     if(s == "10001") return "R";
      |     ~~
Language: C++

#include<iostream>
#include<algorithm>
#include<string>
#include<cmath>

using namespace std;

string DoctorTableAD(char c){
	string s;
	switch( c ){
		case ' ': s = "101"; break;
		case 0x27: s = "000000"; break;
		case ',': s = "000011"; break;
		case '-': s = "10010001"; break;
		case '.': s = "010001"; break;
		case '?': s = "000001"; break;
		case 'A': s = "100101"; break;
		case 'B': s = "10011010"; break;
		case 'C': s = "0101"; break;
		case 'D': s = "0001"; break;
		case 'E': s = "110"; break;
		case 'F': s = "01001"; break;
		case 'G': s = "10011011"; break;
		case 'H': s = "010000"; break;
		case 'I': s = "0111"; break;
		case 'J': s = "10011000"; break;
		case 'K': s = "0110"; break;
		case 'L': s = "00100"; break;
		case 'M': s = "10011001"; break;
		case 'N': s = "10011110"; break;
		case 'O': s = "00101"; break;
		case 'P': s = "111"; break;
		case 'Q': s = "10011111"; break;
		case 'R': s = "1000"; break;
		case 'S': s = "00110"; break;
		case 'T': s = "00111"; break;
		case 'U': s = "10011100"; break;
		case 'V': s = "10011101"; break;
		case 'W': s = "000010"; break;
		case 'X': s = "10010010"; break;
		case 'Y': s = "10010011"; break;
		case 'Z': s = "10010000"; break;
	}
	return s;
}
int myatoi(string bin_s){
	int ret = 0;
	while( bin_s.length() > 0 ){
		ret += (int)((bin_s[0] - '0') * pow(2.0, (double)(bin_s.length() - 1)));
		bin_s.erase(0,1);
	}
	return ret;
}
char DoctorTableDA(string &s){
	int d = myatoi(s);
	char ac[] = " .,-'?";
	
	for(int i = 0; i < 'Z' - 'A'; i++) if(d == i) return i + 'A';
	for(int i = 0; i < sizeof(ac)/sizeof(*ac); i++) if(i + 26 == d) return ac[i];
	return ' ';
}
string DoctorLovedEncode(string &raw){
	string s;
	string ret;
	for(unsigned int i = 0; i < raw.length(); i++){
		s += DoctorTableAD(raw[i]);
	}
	// padding
	while( s.length() % 5 != 0 ) s += '0';

	for(unsigned int i = 0; i < s.length() / 5; i++){
		ret += DoctorTableDA( s.substr(i*5,5) );
	}
	return ret;
}

int main(void){
	while(true){
		string s;

		while( true ){
			char c;
			c = cin.get();
			if( cin.eof() ) return 0;
			if( c == '\n') break;
			else s += c;
		}

		cout << DoctorLovedEncode( s ) << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'std::string DoctorLovedEncode(std::string&)':
a.cc:72:47: error: cannot bind non-const lvalue reference of type 'std::string&' {aka 'std::__cxx11::basic_string<char>&'} to an rvalue of type 'std::__cxx11::basic_string<char>'
   72 |                 ret += DoctorTableDA( s.substr(i*5,5) );
      |                                       ~~~~~~~~^~~~~~~
a.cc:54:28: note:   initializing argument 1 of 'char DoctorTableDA(std::string&)'
   54 | char DoctorTableDA(string &s){
      |                    ~~~~~~~~^
Language: Java

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

public class　Main {
	static int[][] diamond = null;
	static int[][] max = null;
	static int[] tmpMax = null;
	static int height = -1;
	static int width = -1;

	public static void main(String[] args) {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		ArrayList<String> array = new ArrayList<String>();

		try {
			String str = null;
			while ((str = br.readLine()) != null && !str.equals("")) {
				array.add(str);
			}
		} catch (Exception e) {
			e.printStackTrace();
		} finally {
			try {
				br.close();
			} catch (IOException e) {
				e.printStackTrace();
			}
		}
		width = array.size() / 2 + 1;
		height = array.size();
		diamond = new int[height][width];

		max = new int[height][width];

		for (int i = 0; i < height; i++) {
			String s = array.get(i);
			String[] data = s.split(",");
			for (int j = 0; j < data.length; j++) {
				diamond[i][j] = Integer.parseInt(data[j]);
			}
		}
		bfs();

		System.out.println(max[height - 1][0]);

	}

	private static void bfs() {
		max[0][0] = diamond[0][0];
		//前半
		for (int i = 1; i < width; i++) {
			for (int j = 0; j <= i; j++) {
				if (j == 0)
					max[i][j] = diamond[i][j] + max[i - 1][j];
				else if (j == i)
					max[i][j] = diamond[i][j] + max[i - 1][j - 1];
				else {
					max[i][j] = diamond[i][j]
							+ Math.max(max[i - 1][j], max[i - 1][j - 1]);
				}
			}
		}
		//後半
		for (int i = width; i < height; i++) {
			for (int j = 0; j <= (height - i - 1); j++) {
				max[i][j] = diamond[i][j]
						+ Math.max(max[i - 1][j], max[i - 1][j + 1]);
			}
		}
	}
}

Compiler output:
Main.java:6: error: illegal character: '\u3000'
public class?Main {
            ^
1 error
Language: C++

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

using namespace std;

int d[10000];

int dp[100];
int dpw[100];

char w[1000];

int main()
{
	int n = 0;
	while(NULL != gets(w))
	{
		char* p = strtok(w,",");
		d[n] = atoi(p);
		n++;
		while(NULL != (p = strtok(NULL,",")))
		{
			d[n] = atoi(p);
			n++;
		}
	}
	int k;
	int now = 0;
	for(int i = 1; i <= 50; i++)
	{
		if(now + i == n)
		{
			k = i;
			break;
		}
		now += i * 2;
	}
	dp[0] = d[0];
	now = 1;
	for(int i = 2; i <= k; i++)
	{
		dpw[0] = dp[0] + d[now];
		for(int j = 1; j < i - 1; j++) dpw[j] = max(dp[j - 1] + d[now + j],dp[j] + d[now + j]);
		dpw[i - 1] = dp[i - 2] + d[now + i - 1];
		for(int j = 0; j < i; j++) dp[j] = dpw[j];
		now += i;
	}
	for(int i = k - 1; i > 0; i--)
	{
		for(int j = 0; j < i; j++) dpw[j] = max(dp[j] + d[now + j],dp[j + 1] + d[now + j]);
		for(int j = 0; j < i; j++) dp[j] = dpw[j];
		now += i;
	}
	printf("%d\n",dp[0]);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:23: error: 'gets' was not declared in this scope; did you mean 'getw'?
   17 |         while(NULL != gets(w))
      |                       ^~~~
      |                       getw
a.cc:19:27: error: 'strtok' was not declared in this scope; did you mean 'strtoq'?
   19 |                 char* p = strtok(w,",");
      |                           ^~~~~~
      |                           strtoq
Language: C++

#include <string>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
string s; vector<vector<int> > v; int s[100][100], dp[100][100];
vector<int> parse(string s) {
	vector<int> ret; int v = 0;
	for(int i = 0; i < s.size(); i++) {
		if(s[i] == ',') ret.push_back(v), v = 0;
		else v = v * 10 + s[i] - 48;
	}
	ret.push_back(v);
	return ret;
}
int main() {
	while(cin >> s) v.push_back(parse(s));
	int n = v.size() / 2 + 1;
	for(int i = 0; i < n; i++) {
		for(int j = 0; j < v[i].size(); j++) {
			s[i - j][j] = v[i][j];
		}
	}
	for(int i = n; i < v.size(); i++) {
		for(int j = 0; j < v[i].size(); j++) {
			s[i - (j + n - v[i].size())][j + n - v[i].size()] = v[i][j];
		}
	}
	for(int i = 0; i < n; i++) {
		for(int j = 0; j < n; j++) {
			if(i + j) dp[i][j] = 999999999;
			if(i) dp[i][j] = dp[i - 1][j];
			if(j) dp[i][j] = min(dp[i][j], dp[i][j - 1]);
		}
	}
	cout << dp[n - 1][n - 1] << endl;
}

Compiler output:
a.cc:6:39: error: conflicting declaration 'int s [100][100]'
    6 | string s; vector<vector<int> > v; int s[100][100], dp[100][100];
      |                                       ^
a.cc:6:8: note: previous declaration as 'std::string s'
    6 | string s; vector<vector<int> > v; int s[100][100], dp[100][100];
      |        ^
a.cc: In function 'int main()':
a.cc:21:33: error: invalid types '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}[int]' for array subscript
   21 |                         s[i - j][j] = v[i][j];
      |                                 ^
a.cc:26:53: error: invalid types '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}[std::vector<int>::size_type {aka long unsigned int}]' for array subscript
   26 |                         s[i - (j + n - v[i].size())][j + n - v[i].size()] = v[i][j];
      |                                                     ^
Language: C++

#include <string>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
string s; vector<vector<int> > v; int t[100][100], dp[100][100];
vector<int> parse(string s) {
	vector<int> ret; int v = 0;
	for(int i = 0; i < s.size(); i++) {
		if(s[i] == ',') ret.push_back(v), v = 0;
		else v = v * 10 + s[i] - 48;
	}
	ret.push_back(v);
	return ret;
}
int main() {
	while(cin >> s) v.push_back(parse(s));
	int n = v.size() / 2 + 1;
	for(int i = 0; i < n; i++) {
		for(int j = 0; j < v[i].size(); j++) {
			t[i - j][j] = v[i][j];
		}
	}
	for(int i = n; i < v.size(); i++) {
		for(int j = 0; j < v[i].size(); j++) {
			t[i - (j + n - v[i].size())][j + n - v[i].size()] = v[i][j];
		}
	}
	dp[i][j] = s[i][j];
	for(int i = 0; i < n; i++) {
		for(int j = 0; j < n; j++) {
			if(i) dp[i][j] = dp[i - 1][j] + t[i][j];
			if(j) dp[i][j] = max(dp[i][j], dp[i][j - 1] + t[i][j]);
		}
	}
	cout << dp[n - 1][n - 1] << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:12: error: 'i' was not declared in this scope
   29 |         dp[i][j] = s[i][j];
      |            ^
a.cc:29:15: error: 'j' was not declared in this scope
   29 |         dp[i][j] = s[i][j];
      |               ^
Language: C++

#include<bits/stdc++.h>
#define rep(i,n)for(int i=0;i<n;i++)
using namespace std;
??
int cnt[100];
int d[100][100];
int dp[100][100];
??
int main() {
????????string s;
????????int n;
????????for (n = 0; cin >> s; n++) {
????????????????s += ',';
????????????????stringstream ss(s);
????????????????char c;
????????????????for (; ss >> d[n][cnt[n]] >> c; cnt[n]++);
????????}
????????dp[0][0] = d[0][0];
????????for (int i = 1; i < n; i++) {
????????????????rep(j, cnt[i]) {
????????????????????????if (i < n / 2) {
????????????????????????????????if (!j)dp[i][j] = dp[i - 1][j] + d[i][j];
????????????????????????????????else dp[i][j] = max(dp[i - 1][j], dp[i - 1][j - 1]) + d[i][j];
????????????????????????}
????????????????????????else {
????????????????????????????????if (j == cnt[i] - 1)dp[i][j] = dp[i - 1][j] + d[i][j];
????????????????????????????????else dp[i][j] = max(dp[i - 1][j], dp[i - 1][j + 1]) + d[i][j];
????????????????????????}
????????????????}
????????}
????????printf("%d\n", dp[n - 1][0]);
}

Compiler output:
a.cc:4:1: error: expected unqualified-id before '?' token
    4 | ??
      | ^
a.cc:8:1: error: expected unqualified-id before '?' token
    8 | ??
      | ^
Language: C++

#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<cassert>
#include<iostream>
#include<sstream>
#include<string>
#include<vector>
#include<queue>
#include<set>
#include<map>
#include<utility>
#include<numeric>
#include<algorithm>
#include<bitset>
#include<complex>

using namespace std;

typedef long long Int;
typedef vector<int> vint;
typedef pair<int,int> pint;
#define mp make_pair

template<class T> void pv(T a, T b) { for (T i = a; i != b; ++i) cout << *i << " "; cout << endl; }
template<class T> void chmin(T &t, T f) { if (t > f) t = f; }
template<class T> void chmax(T &t, T f) { if (t < f) t = f; }
int in() { int x; scanf("%d", &x); return x; }

int mtx[210][110];
int dp[210][110];

int main() {
	char s[1000];
	int x,y;
	for(y=0;gets(s);y++){
		int len=strlen(s);
		int i;
		x=0;
//cout<<s<<endl;
//cout<<len<<endl;
//cout<<s[0]-'0'<<endl;
		for(i=0;i<len;){
			if('0'<=s[i]&&s[i]<='9'){
				if(i+1<len&&'0'<=s[i+1]&&s[i+1]<='9'){
					mtx[y][x++]=(s[i]-'0')*10+s[i+1]-'0';
					i+=3;
				}else{
					mtx[y][x]=s[i]-'0';
//cout<<y<<" "<<x<<" "<<s[i]<<endl;
					x++;
					i+=2;
				}
			}
		}
	}
	
	int maxy=y;
	/*for(y=0;y<maxy;y++){
		for(x=0;x<min(y+1,maxy-y);x++){
			cout<<mtx[y][x]<<" ";
		}
		cout<<endl;
	}
	*/
	for(y=0;y<maxy;y++){
		if(y==0)dp[0][0]=mtx[0][0];
		else if(y<maxy/2+1){
			for(x=0;x<=y;x++){
				dp[y][x]=max(dp[y-1][x],x==0?0:dp[y-1][x-1])+mtx[y][x];
			}
		}else{
			for(x=0;x<maxy-y;x++){
				dp[y][x]=max(dp[y-1][x],x==maxy-y-1?0:dp[y-1][x+1])+mtx[y][x];
			}
		}
	}
	cout<<dp[maxy-1][0]<<endl;
/*for(y=0;y<maxy;y++){
	for(x=0;x<min(y+1,maxy-y);x++){
		cout<<dp[y][x]<<" ";
	}
	cout<<endl;
}*/

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:37:17: error: 'gets' was not declared in this scope; did you mean 'getw'?
   37 |         for(y=0;gets(s);y++){
      |                 ^~~~
      |                 getw
Language: C++

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

const int SIZE = 50;

int main(){
	char c;
	string s;
	int n, max = 0;
	int* table = new int[ SIZE + 1 ]();

	while ( cin >> s ){
		int* input = new int[ SIZE + 1 ]();
		bool isInt = true;
		int cnt = 0;
		istringstream is( s );

		while ( !is.eof() ){
			if ( isInt ){
				is >> n;
				input[ ++cnt ] = n;
			}else{
				is >> c;
			}
			isInt = !isInt;
		}
		if ( cnt > max ){
			max = cnt;
		}

		for ( int i = 0, p = max; i < cnt; ++i, --p ){
			table [ p ] = input[ cnt - i ] + ( table[ p - 1 ] > table[ p ] ? table[ p - 1 ] : table[ p ] );
			
		}

		if ( cnt == 1 ){
			isEnd = !isEnd;
		}

		delete[] input;
	}

	cout << table[ max ] << endl;

	delete[] table;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:39:25: error: 'isEnd' was not declared in this scope
   39 |                         isEnd = !isEnd;
      |                         ^~~~~
Language: C++

#include<iostream>
#include<cstdio>
#include<cstring>
#include<cstdlib>
#include<string>
#include<vector>
#include<cmath>
#define rep(i,n) for(int i=0;i<n;i++)
using namespace std;
int dp[101][101];
int hisi[101][101];
int main()
{
    int temp=0;
    char t;
    string s;
    vector<int> nums;
    while(cin>>s)
    {
        if(cin.eof())break;
        int len = s.size();
        for(int i=0;i<len;i++)
        {
            if(s[i]==','){nums.push_back(temp);temp=0;}
            else{temp= temp*10 +(int) s[i]-'0';}
        }
        nums.push_back(temp);
        temp=0;
    }
    //cout << nums.size()<<endl;
    int hen = (int)sqrt((double)nums.size());
    int dan = 0;
    int k=0,x=0,y=0;
    for(dan=0;dan<hen;dan++)
    {
        x=0;
        y=dan;
        while(1)
        {
            hisi[x][y] = nums[k];
            //cout << x<<","<<y << endl;
            k++;
            x++;
            y--;
            
            if(y<0)break;
        }
    }
    for(dan=hen;dan<2*hen-1;dan++)
    {
        y = hen -1;
        x = dan-hen+1;

Compiler output:
a.cc: In function 'int main()':
a.cc:52:23: error: expected '}' at end of input
   52 |         x = dan-hen+1;
      |                       ^
a.cc:50:5: note: to match this '{'
   50 |     {
      |     ^
a.cc:52:23: error: expected '}' at end of input
   52 |         x = dan-hen+1;
      |                       ^
a.cc:13:1: note: to match this '{'
   13 | {
      | ^
Language: C++

//============================================================================
// Name        : TopCoderCompetition.cpp
// Author      : taguchi
// Version     :
// Copyright   : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================

#include <iostream>
#include <algorithm>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <string>
#include <vector>
#include <numeric>
using namespace std;
#define P pair<int,int>
#define rep(i,n) for(int i = 0;i<n;i++)
#define pb(n) push_back(n)
typedef unsigned int uint;
typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<string> vs;
struct edge{int cost,to;};

vector<string> split(string &in,char delimiter){
	vector<string> re; uint cur = 0,next;
	while((next = in.find_first_of(delimiter,cur)) != string::npos){
		re.pb(string(in,cur,next-cur));
		cur = next + 1;
	}
	re.pb(string(in,cur,in.size()-cur));
	return re;
}
vector<int> split_int(string &in, char delimiter){
	vector<string> str = split(in,delimiter);
	vector<int> re;
	rep(i,str.size()){
		re.pb(strtol(str[i].c_str(),NULL,10));
	}
	return re;
}


int main(){
	vector<int> in[110];
	int dp[110][110];
	memset(dp,0,sizeof(dp));
	string s;
	int cnt = 0;
	while(!((getline(cin,s),s.length()) == 1 && cnt != 0)){
		in[cnt] = split_int(s,',');
		cnt++;
	}
	in[cnt] = split_int(s,',');
	cnt++;
	dp[0][0] = in[0][0];
	for(int i = 1;i<110;i++)rep(j,in[i].size()){
		if(i <= cnt / 2){
			if(j-1<0){
				dp[i][j] = dp[i-1][j] + in[i][j];
				continue;
			}
			dp[i][j] = max(dp[i-1][j] + in[i][j],dp[i-1][j-1] + in[i][j]);
		}else{
			dp[i][j] = max(dp[i-1][j] + in[i][j],dp[i-1][j+1] + in[i][j]);
		}
	}
	int res = 0;
	rep(i,110){
		res = max(res,dp[i][0]);
	}
	cout << res@ endl;
	return 0;
}

Compiler output:
a.cc:75:17: error: extended character  is not valid in an identifier
   75 |         cout << res@ endl;
      |                 ^
a.cc:75:21: error: stray '@' in program
   75 |         cout << res@ endl;
      |                     ^
a.cc:75:22: error: extended character  is not valid in an identifier
   75 |         cout << res@ endl;
      |                      ^
a.cc:75:22: error: extended character  is not valid in an identifier
a.cc:75:22: error: extended character  is not valid in an identifier
a.cc:75:22: error: extended character  is not valid in an identifier
a.cc: In function 'int main()':
a.cc:75:17: error: 'res\302\201' was not declared in this scope; did you mean 'res'?
   75 |         cout << res@ endl;
      |                 ^~~~
      |                 res
Language: C++

#include <iostream>
#include <algorithm>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <string>
#include <vector>
#include <numeric>
using namespace std;
#define P pair<int,int>
#define rep(i,n) for(int i = 0;i<n;i++)
#define pb(n) push_back(n)
typedef unsigned int uint;
typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<string> vs;
struct edge{int cost,to;};

vector<string> split(string &in,char delimiter){
	vector<string> re; uint cur = 0,next;
	while((next = in.find_first_of(delimiter,cur)) != string::npos){
		re.pb(string(in,cur,next-cur));
		cur = next + 1;
	}
	re.pb(string(in,cur,in.size()-cur));
	return re;
}
vector<int> split_int(string &in, char delimiter){
	vector<string> str = split(in,delimiter);
	vector<int> re;
	rep(i,str.size()){
		re.pb(strtol(str[i].c_str(),NULL,10));
	}
	return re;
}


int main(){
	vector<int> in[110];
	int dp[110][110];
	memset(dp,0,sizeof(dp));
	string s;
	int cnt = 0;
	while(!((getline(cin,s),s.length()) == 1 && cnt != 0)){

Compiler output:
a.cc: In function 'int main()':
a.cc:45:64: error: expected '}' at end of input
   45 |         while(!((getline(cin,s),s.length()) == 1 && cnt != 0)){
      |                                                               ~^
a.cc:45:64: error: expected '}' at end of input
a.cc:39:11: note: to match this '{'
   39 | int main(){
      |           ^
Language: C++

#include <iostream>
#include <stdio.h>
#include <string.h>
using namespace std;

int main() {
	char c[202];
	char *cp;
	int n[102][102],i,j,k,m=0,p,an=0;
    memset(n,0,sizeof(n));
	while(gets(c)!=NULL) {
     cp=c; k=1; p=0;
	 while(p<strlen(c)) {
      n[m+1][k++]=atoi(cp);
	  while(c[p]!=',' && p<strlen(c)) p++;
	  p++; cp=&c[p];
	 }
     m++;
	}
	for (i=1;i<=m/2+1;i++) for (j=1;j<=i;j++) {
		n[i][j]+=max(n[i-1][j],n[i-1][j-1]);
		n[m-i+1][j]+=max(n[m-i+2][j],n[m-i+2][j-1]);
        if (i==m/2+1) an=max(an,n[i][j]);
	}
	cout << an << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:15: error: 'gets' was not declared in this scope; did you mean 'getw'?
   11 |         while(gets(c)!=NULL) {
      |               ^~~~
      |               getw
Language: C++

#include <iostream>
#include <cstdlib>
#include <sstream>
#include <algorithm>

using namespace std;

int d[50][100],dp[50][100];

int main() {
	string str;
	int l=0;
	memset(d,-1,sizeof(d));
	memset(dp,-1,sizeof(d));
	while(cin>>str) {
		replace(str.begin(),str.end(),',',' ');
		stringstream sstr(str);
		int i=0;
		while(sstr>>d[i++][l]);
		l++;
	}
	dp[0][0]=d[0][0];
	for(int i=1;i<l;i++) {
		for(int j=0;d[j][i]!=-1;j++) {
			if((l/2)<i) {
				dp[j][i]=max(dp[j][i-1],j<50?dp[j+1][i-1]:-1);
			}else {
				dp[j][i]=max(dp[j][i-1],j>=0?dp[j-1][i-1]:-1);
			}
			dp[j][i]+=d[j][i];
		}
	}
	cout<<dp[0][l-1]<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:9: error: 'memset' was not declared in this scope
   13 |         memset(d,-1,sizeof(d));
      |         ^~~~~~
a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    4 | #include <algorithm>
  +++ |+#include <cstring>
    5 |
Language: C++

#include <iostream>
#include <string>

#define L 100

using namespace std;

int main(void)
{
	int i1,i2,i3;
	int c;
	string s;
	int f[L][L];
	int dp[L][L];

	c=0;
	memset(f,-1,sizeof(f));
	memset(dp,0,sizeof(dp));

	while(1){
		cin>>s;
		
		for(i1=0,i2=0;i1<s.size();i1+=2,i2++){
			f[c][i2]=s[i1]-48;
		}
		c++;
		if(c!=1 && s.size()==1) break;
	}

	dp[0][0]=f[0][0];
	for(i1=1;i1<=c/2;i1++){
		for(i2=0;i2<c/2+1;i2++){
			if(i2==0) dp[i1][i2]=dp[i1-1][i2]+f[i1][i2];
			else if(f[i1][i2]!=-1){
				dp[i1][i2]=max(dp[i1-1][i2],dp[i1-1][i2-1])+f[i1][i2];
			}
		}
	}

	for(i1;i1<c;i1++){
		for(i2=c/2;i2>=0;i2--){
			if(f[i1][i2]!=-1){
				dp[i1][i2]=max(dp[i1-1][i2],dp[i1-1][i2+1])+f[i1][i2];
			}
		}
	}



	/*for(i1=0;i1<=c;i1++){
		for(i2=0;i2<c/2+1;i2++){
			cout<<dp[i1][i2]<<" ";
		}
		cout<<endl;
	}*/

	cout<<dp[c-1][0]<<endl;


	return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:9: error: 'memset' was not declared in this scope
   17 |         memset(f,-1,sizeof(f));
      |         ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <iostream>
  +++ |+#include <cstring>
    2 | #include <string>
Language: C++

#include <iostream>
#include <string>
#include <string.h>
#include <sstream>

#define L 110

using namespace std;

int main(void)
{
	int i1,i2,i3;
	int c;
	string s;
	string temp;
	int f[L][L];
	int dp[L][L];

	c=0;
	memset(f,-1,sizeof(f));
	memset(dp,0,sizeof(dp));

	while(1){
		cin>>s;
		
		temp="";
		s=s+",";

		for(i1=0,i2=0;i1<s.size();i1++){
			if(s[i1]==','){
				istringstream istr(temp);
				istr >> f[c][i2];				
				temp="";
				i2++;
			}
			else temp+=s[i1];
		}
		c++;
		if(c!=1 && count(s.begin(),s.end(),',')==1) break;
	}

	dp[0][0]=f[0][0];
	
	for(i1=1;i1<=c/2;i1++){
		for(i2=0;i2<c/2+1;i2++){
			if(i2==0) dp[i1][i2]=dp[i1-1][i2]+f[i1][i2];
			else if(f[i1][i2]!=-1){
				dp[i1][i2]=max(dp[i1-1][i2],dp[i1-1][i2-1])+f[i1][i2];
			}
		}
	}

	for(i1;i1<c;i1++){
		for(i2=0;i2<c/2+1;i2++){
			if(f[i1][i2]!=-1){
				dp[i1][i2]=max(dp[i1-1][i2],dp[i1-1][i2+1])+f[i1][i2];
			}
		}
	}



	/*for(i1=0;i1<=c;i1++){
		for(i2=0;i2<c/2+1;i2++){
			cout<<f[i1][i2]<<" ";
		}
		cout<<endl;
	}*/

	cout<<dp[c-1][0]<<endl;


	return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:39:28: error: 'count' was not declared in this scope
   39 |                 if(c!=1 && count(s.begin(),s.end(),',')==1) break;
      |                            ^~~~~
Language: C++

#include <cstdio>
#include <iostream>
#include <algorithm>
using namespace std;

static const int margin = 1;

int main() {
	char input[128][512];
	int vertex[128][64];
	int line;

	for(line = 0; fgets(input[line], 512, stdin) != NULL; line++);
	memset(vertex, 0, sizeof(vertex));

	for(int i = 0; i < line; i++) {
		for(int j = 0, k = 0; input[i][j] != '\n' && input[i][j] != '\0'; j++, k++) {
			int tmp = 0;

			for(;input[i][j] != ',' && input[i][j] != '\n' && input[i][j]; j++) {
				tmp *= 10;
				tmp += input[i][j] - '0';
			}

			if(i <= line / 2)
				vertex[margin + i][margin + k] = max(vertex[margin + (i - 1)][margin + (k - 1)], vertex[margin + (i - 1)][margin + k]) + tmp;
			else
				vertex[margin + i][margin + k] = max(vertex[margin + (i - 1)][margin + k], vertex[margin + (i - 1)][margin + (k + 1)]) + tmp;
		}
	}

	cout << vertex[margin + line - 1][margin] << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:9: error: 'memset' was not declared in this scope
   14 |         memset(vertex, 0, sizeof(vertex));
      |         ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    3 | #include <algorithm>
  +++ |+#include <cstring>
    4 | using namespace std;
Language: C++

#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <complex>
#include <string>
#include <sstream>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <functional>
#include <iostream>
#include <map>
#include <set>
using namespace std;
typedef pair<int,int> P;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vll;
#define pu push
#define pb push_back
#define mp make_pair
#define eps 1e-9
#define INF 2000000000
#define sz(x) ((int)(x).size())
#define fi first
#define sec second
#define SORT(x) sort((x).begin(),(x).end())
#define all(x) (x).begin(),(x).end()
#define EQ(a,b) (abs((a)-(b))<EPS)
int coor[101][101],tmp[100][100];
int main()
{
　　 memset(coor,0,sizeof(coor));
        memset(tmp,0,sizeof(tmp));
	string s;
	int k=0;
	while(cin >> s)
	{
		int len=s.size();
		len=(len+1)/2;
		for(int i=0;i<len;i++)
		{
			coor[k][i]=s[2*i]-'0';
		}
		k++;
	}
	/*for(int i=0;i<k;i++)
	{
		for(int j=0;j<min(i+1,k-i);j++)
		{
			cout << coor[i][j] <<' ';
		}
		cout << endl;
	}*/
	tmp[0][0]=coor[0][0];
	for(int i=0;i<k/2;i++)
	{
		for(int j=0;j<i+1;j++)
		{
			tmp[i+1][j]=max(tmp[i+1][j],tmp[i][j]+coor[i+1][j]);
			tmp[i+1][j+1]=max(tmp[i+1][j+1],tmp[i][j]+coor[i+1][j+1]);
		}
	}
	int p=k/2;
	for(int i=0;i<k/2;i++)
	{
		for(int j=0;j<(k/2-i);j++)
		{
			tmp[i+p+1][j]=max(tmp[i+p][j],tmp[i+p][j+1])+coor[i+p+1][j];
		}
	}
	/*for(int i=0;i<k;i++)
	{
		for(int j=0;j<min(i+1,k-i);j++)
		{
			printf("%2d ",tmp[i][j]);
		}
		cout << endl;
	}*/
	cout << tmp[k-1][0] << endl;
	return 0;
}

Compiler output:
a.cc:35:1: error: extended character 　 is not valid in an identifier
   35 | 　　 memset(coor,0,sizeof(coor));
      | ^
a.cc:35:1: error: extended character 　 is not valid in an identifier
a.cc: In function 'int main()':
a.cc:35:1: error: '\U00003000\U00003000' was not declared in this scope
   35 | 　　 memset(coor,0,sizeof(coor));
      | ^~~~
Language: C++

#include <iostream>
#include <string>
#include <sstream>
#include <algorithm>  
using namespace std;

int n;
int mas[101][101];
int dp[101][101];

int rec(int i,int j){
  if(i == n) return 0;
  if(j < 0 || mas[i][j] == -1) return -(2 << 26);
  if(dp[i][j]) return dp[i][j];
  int res = 0;
  if(i < n/2) res = max(rec(i+1,j)+mas[i][j],rec(i+1,j+1)+mas[i][j]);
  else if(i >= n/2) res = max(rec(i+1,j-1)+mas[i][j],rec(i+1,j)+mas[i][j]);
  return dp[i][j] = res;
}

int main(){
  memset(mas,-1,sizeof(mas));
  for(int i=0;;i++){
    stringstream ss;  string s; 
    getline(cin,s);
    n = i;
    if(s.size() == 0) break;
    ss << s;
    for(int j=0;;j++){
      char tr; int fig;
      ss >> fig;  mas[i][j] = fig;
      if(ss.peek() == EOF) break;
      ss >> tr;
    }
  }
  cout << rec(0,0) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:3: error: 'memset' was not declared in this scope
   22 |   memset(mas,-1,sizeof(mas));
      |   ^~~~~~
a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    4 | #include <algorithm>
  +++ |+#include <cstring>
    5 | using namespace std;
Language: Java

import java.util.*;

public class Maiin{
	public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String str = sc.nextLine();
        
        int n = Integer.parseInt(str);
        String[] strCor = new String[n];
        String[][] strZahyo = new String[n][2];
        double[][] zahyo = new double[n][2];
        
        int cnt = 0;
        int cntMax = 0;
        
        for(int i = 0; i < n; i++){
        	strCor[i] = sc.nextLine();
        	strZahyo[i] = strCor[i].split(","); 
        	zahyo[i][0] = Double.parseDouble(strZahyo[i][0]);
        	zahyo[i][1] = Double.parseDouble(strZahyo[i][1]);
        }
        
        if(Integer.parseInt(sc.nextLine()) == 0){
        	sc.close();
        }
        
        for(int i = 0; i < n; i++){
        	for(int j = i; j < n; j++){
        		if(isOverlap(zahyo[i][0], zahyo[i][1], zahyo[j][0], zahyo[j][1])){
        			cnt++;
        		}
        		if(cnt >= cntMax){
        			cntMax = cnt;
        		}
        	}
        	cnt = 0;
        }             
        System.out.println(cntMax);
	}

	
	/**
	 * @param x1     ??????????????????x??§?¨?
	 * @param y1     ??????????????????y??§?¨?
	 * @param x2 ??????2????????????x??§?¨?
	 * @param y2     ???2????????????y??§?¨?
	 * @return??????2????????±?????????????????°true????????????????????°false
	 */
	private static boolean isOverlap(double x1, double y1, double x2, double y2){
		
		double r1 = 1.000000;
		double r2 = 1.000000;
		boolean result = false;
		
		if(distance(x1,y1,x2,y2) <= r1+r2){
			result = true;
		}else{
			result = false;
		}
		return result;
	}
	
	/**
	 * @param x1     ??????????????????x??§?¨?
	 * @param y1     ??????????????????y??§?¨?
	 * @param x2     ???2????????????x??§?¨?
	 * @param y2     ???2????????????y??§?¨?
	 * @return??????2???????????????????????¢
	 */
	private static double distance(double x1, double y1, double x2, double y2){

		double dx = x1 - x2;
		double dy = y1 - y2;
		
		return Math.sqrt(dx*dx+dy*dy);
	}
}

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

import java.util.*;

public class Maiin{
	public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String str = sc.nextLine();
        
        int n = Integer.parseInt(str);
        String[] strCor = new String[n];
        String[][] strZahyo = new String[n][2];
        double[][] zahyo = new double[n][2];
        
        int cnt = 0;
        int cntMax = 0;
        
        for(int i = 0; i < n; i++){
        	strCor[i] = sc.nextLine();
        	strZahyo[i] = strCor[i].split(","); 
        	zahyo[i][0] = Double.parseDouble(strZahyo[i][0]);
        	zahyo[i][1] = Double.parseDouble(strZahyo[i][1]);
        }
        
        if(Integer.parseInt(sc.nextLine()) == 0){
        	sc.close();
        }
        
        for(int i = 0; i < n; i++){
        	for(int j = i; j < n; j++){
        		if(isOverlap(zahyo[i][0], zahyo[i][1], zahyo[j][0], zahyo[j][1])){
        			cnt++;
        		}
        		if(cnt >= cntMax){
        			cntMax = cnt;
        		}
        	}
        	cnt = 0;
        }     
        if(cntMax == 0)cntMax = 1;
        System.out.println(cntMax);
	}

	
	/**
	 * @param x1     ??????????????????x??§?¨?
	 * @param y1     ??????????????????y??§?¨?
	 * @param x2 ??????2????????????x??§?¨?
	 * @param y2     ???2????????????y??§?¨?
	 * @return??????2????????±?????????????????°true????????????????????°false
	 */
	private static boolean isOverlap(double x1, double y1, double x2, double y2){
		
		double r1 = 1.000000;
		double r2 = 1.000000;
		boolean result = false;
		
		if(distance(x1,y1,x2,y2) <= r1+r2){
			result = true;
		}else{
			result = false;
		}
		return result;
	}
	
	/**
	 * @param x1     ??????????????????x??§?¨?
	 * @param y1     ??????????????????y??§?¨?
	 * @param x2     ???2????????????x??§?¨?
	 * @param y2     ???2????????????y??§?¨?
	 * @return??????2???????????????????????¢
	 */
	private static double distance(double x1, double y1, double x2, double y2){

		double dx = x1 - x2;
		double dy = y1 - y2;
		
		return Math.sqrt(dx*dx+dy*dy);
	}
}

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

import java.util.Scanner;

public class Main {

	public static void main(String[] args){
	    Scanner s = new Scanner(System.in);
	    while(true){
		    int num = s.nextInt();
		    if(num==-)break;
		    double[][] data = new double[num][2];
		    for(int i=0 ; i<num ; i++){
			String[] temp = s.next().split(",");
			for(int j=0 ; j<2 ; j++)
			    data[i][j] = Double.valueOf(temp[j]).doubleValue();
		    }
		    int[] c = new int[num];
		    for(int i=0 ; i<num ; i++){
			for(int j=0 ; j<num ; j++){
			    if(i!=j){
				if((data[i][0]-data[j][0])*(data[i][0]-data[j][0])+(data[i][1]-data[j][1])*(data[i][1]-data[j][1]) <= 4)
				    c[i]++;
			    }
			}
		    }
		    int max = 0;
		    for(int i=0 ; i<num ; i++)
			max = Math.max(max,c[i]);
		    System.out.println(max+1);
		}
      	}
}

Compiler output:
Main.java:9: error: illegal start of expression
		    if(num==-)break;
		             ^
1 error
Language: Java

15
3.14979,8.51743 
2.39506,3.84915 
2.68432,5.39095 
5.61904,9.16332 
7.85653,4.75593 
2.84021,5.41511 
1.79500,8.59211 
7.55389,8.17604 
4.70665,4.66125 
1.63470,4.42538 
7.34959,4.61981 
5.09003,8.11122 
5.24373,1.30066 
0.13517,1.83659 
7.57313,1.58150 
0

Compiler output:
Main.java:1: error: class, interface, enum, or record expected
15
^
1 error
Language: C

#include<stdio.h>
#include<math.h>

int N,i,j,u[100],r[100]={0},R=0;
double P[100][2];

int pa(int n){return u[n]==n?n:u[n]=pa(u[n]);}
void un(int a,int b){u[pa(a)]=pa(b);}
int dis(double a[2],double b[2])
{
	double x=a[0]-b[0],y=a[1]-b[1];
	return ((x*x+y*y)-4.0<=0.000001)?1:0;
}

int main()
{
	for(;scanf("%d",&N),N;)
	{
		for(i=0;i<N;i++)u[i]=i;
		for(i=0;i<N;i++)
		{
			scanf("%lf,%lf",&P[i][0],&P[i][1]);
			for(j=0;j<i;j++)
				if(dis(P[j],P[i]))
					un(i,j);
		}
		for(i=0;i<N;i++)
			r[pa(u[i])]++;
		for(i=0;i<N;i++)
			R=R>r[i]?R:r[i];
		printf("%d\n",R);
	}
	return 0;
}

Compiler output:
main.c: In function 'pa':
main.c:7:36: error: lvalue required as left operand of assignment
    7 | int pa(int n){return u[n]==n?n:u[n]=pa(u[n]);}
      |                                    ^
Language: C

15
3.14979,8.51743 
2.39506,3.84915 
2.68432,5.39095 
5.61904,9.16332 
7.85653,4.75593 
2.84021,5.41511 
1.79500,8.59211 
7.55389,8.17604 
4.70665,4.66125 
1.63470,4.42538 
7.34959,4.61981 
5.09003,8.11122 
5.24373,1.30066 
0.13517,1.83659 
7.57313,1.58150 
0

Compiler output:
main.c:1:1: error: expected identifier or '(' before numeric constant
    1 | 15
      | ^~
Language: C

#include <stdio.h>
#define SQ(x) ((x) * (x))

typedef struct {
    double x;
    double y;
} POINT;

int dist(POINT a, POINT b)
{
    if (SQ(a.x - b.x) + SQ(a.y - b.y) > 1){
        return (0);
    }
    return (1);
}

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

int main(void)
{
    POINT seal[100], t;
    int n;
    int count, ans;
    double i, j;
    int k;
    
    while (1){
        scanf("%d", &n);
        
        if (!n){
            break;
        }
        
        for (i = 0; i < n; i++){
            scanf("%lf%*c%lf", &seal[i].x, &seal[i].y);
        }
        
        ans = 0;
        for (i = 0; i <= 10; i += 0.01){
            t.y = i;
            for (j = 0; j <= 10; j += 0.01){
                t.x = j;
                count = 0;
                for (k = 0; k < n; k++){
                    if (dist(t, seal[k])){
                        count++;
                    }
                    ans = max(ans, count);
                }
            }
        }
        
        printf("%d\n", ans);
    }
    
    return (0);
}

Compiler output:
main.c: In function 'main':
main.c:41:37: error: array subscript is not an integer
   41 |             scanf("%lf%*c%lf", &seal[i].x, &seal[i].y);
      |                                     ^
main.c:41:49: error: array subscript is not an integer
   41 |             scanf("%lf%*c%lf", &seal[i].x, &seal[i].y);
      |                                                 ^
Language: C++

import math
while True:
    n = input()
    if (n == 0):
        break
    d = []
    EPS = 10 ** (-9)

    for i in range(n):
        a = map(float, raw_input().split(","))
        x = a[0]
        y = a[1]
        d.append([y,x])
    ans = 1
    for i in range(n):
        sheets = 1
        for j in range(n):
            if (i == j):continue
            dist = (d[i][0] - d[j][0]) ** 2  + (d[i][1] - d[j][1]) ** 2
            format(dist, ".12g")
            if (dist <= 4.0 + EPS):
                sheets += 1
        ans = max(ans, sheets)
    print ans

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import math
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

import math
while True:
    n = input()
    if (n == 0):
        break
    d = []
    EPS = 10 ** (-5)

    for i in range(n):
        a = map(float, raw_input().split(","))
        x = a[0]
        y = a[1]
        d.append([y,x])
    ans = 1
    for i in range(n):
        sheets = 1
        for j in range(n):
            if (i == j):continue
            dist = (d[i][0] - d[j][0]) ** 2  + (d[i][1] - d[j][1]) ** 2
            format(dist, ".12g")
            if (dist + EPS <= 4.0):
                sheets += 1
        ans = max(ans, sheets)
    print ans

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import math
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'