criyle/codenet-compile-errors huggingface dataset:
Language: Java

import java.io.*;import java.util.*;class Main{public static void main(String[]a)throws Exception{int i,h,x=0,y=0,t[]=new int[3];Set<Integer> H=new HashSet<Integer>();BufferedReader B=new BufferedReader(new InputStreamReader(System.in));for(String s;(s=B.readLine())!=null;){a=s.split(",");for(i=0;i<3;)t[i]=Integer.valueOf(_[i++]);Arrays.sort(t);h=Arrays.hashCode(t);if(!H.contains(h)&&t[0]==t[1])y++;if(!H.contains(h)&&t[0]*t[0]+t[1]*t[1]==t[2]*t[2])x++;if(!H.add(h))H.remove(h);}System.out.println(x+"\n"+y);}}


Compiler output:
Main.java:1: error: as of release 9, '_' is a keyword, and may not be used as an identifier
import java.io.*;import java.util.*;class Main{public static void main(String[]a)throws Exception{int i,h,x=0,y=0,t[]=new int[3];Set<Integer> H=new HashSet<Integer>();BufferedReader B=new BufferedReader(new InputStreamReader(System.in));for(String s;(s=B.readLine())!=null;){a=s.split(",");for(i=0;i<3;)t[i]=Integer.valueOf(_[i++]);Arrays.sort(t);h=Arrays.hashCode(t);if(!H.contains(h)&&t[0]==t[1])y++;if(!H.contains(h)&&t[0]*t[0]+t[1]*t[1]==t[2]*t[2])x++;if(!H.add(h))H.remove(h);}System.out.println(x+"\n"+y);}}
                                                                                                                                                                                                                                                                                                                                    ^
1 error
Language: Java

import java.util.Scanner;

public class main{

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・ス
		Scanner sc = new Scanner(System.in);
		int tyou=0;
		int hishi=0;
        int c1 = 0;
        int c2 = 0;

        while(sc.hasNext()){

            String[] s=sc.nextLine().split(",");

           int a=Integer.parseInt(s[0]);
            int b=Integer.parseInt(s[1]);
            int c=Integer.parseInt(s[2]);


            c1=a*a+b*b;
            c2=c*c;

            if(c1==c2){
            	tyou++;

            }else if(a==b){
            	hishi++;
            }

        }
        System.out.println(tyou);
        System.out.println(hishi);


    }
}


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

public class Main {

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

	private static void judgeSquare() {
		int lect = 0;
		int diamond = 0;


			while (sc.hasNext()) {
				String[] str = sc.nextLine().split(",");
				int a = Integer.parseInt(str[0]);
				int b = Integer.parseInt(str[1]);
				int c = Integer.parseInt(str[2]);

					if ( c * c == a * a + b * b  ) {
						lect++;
					} else if ( a == b ) {
						diamond++;
					}
			}

		System.out.println(lect);
		System.out.println(diamond);

	}

}


Compiler output:
Main.java:3: error: cannot find symbol
	static Scanner sc = new Scanner(System.in);
	       ^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
	static Scanner sc = new Scanner(System.in);
	                        ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: Java

import java.io.*;
public class Main {
	public static void main(String[] args) throws IOException{
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		int rec=0,rho=0;
		int a,b,d;
		String str;
		try{
			while((str=br.readLine())!=null){
				str=br.readLine();
				String[] s=str.split(",");
				a=Integer.parseInt(s[0]);
				b=Integer.parseInt(s[1]);
				d=Integer.parseInt(s[2]);
				if(a*a+b*b==d*d) rec++;
				else if(a==b) rho++;
			}
			System.out.println(rec+"\n"+rho);
		}catch(Exception e){
		}
	}

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

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.*;

public class Main{
    static int N, D, money;
	static int[] prices;
	private static int solve(){
        int answer = 0;
        if (prices[0] * 2 > money) return 0;
        if (prices[prices.length - 1] + prices[prices.length - 2] <= money) return prices[prices.length - 1] + prices[prices.length - 2];
        for (int i = 0; i < N - 1; i++)
        {
            int index = Arrays.binarySearch(prices, i + 1, prices.length - i - 1, money - prices[i]);
            if (index > i) return prices[i] + prices[index];
            index = ~index - 1;
            if (index == i) continue;
            answer = Math.max(prices[i] + prices[index], answer);
        }
        return answer;
	}
	public static void main(String args[]){
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] strs = br.readLine().split(",");
        N = Integer.parseInt(strs[0]); D = Integer.parseInt(strs[1]);
        prices = new int[N];
        for (int i = 0; i < N; i++)
            prices[i] = Integer.parseInt(br.readLine());
        Arrays.sort(prices);
        for (int i = 0; i < D; i++)
        {
            money = Integer.parseInt(br.readLine());
            System.out.println(solve());
        }
	}
}

Compiler output:
Main.java:24: error: unreported exception IOException; must be caught or declared to be thrown
        String[] strs = br.readLine().split(",");
                                   ^
Main.java:28: error: unreported exception IOException; must be caught or declared to be thrown
            prices[i] = Integer.parseInt(br.readLine());
                                                    ^
Main.java:32: error: unreported exception IOException; must be caught or declared to be thrown
            money = Integer.parseInt(br.readLine());
                                                ^
3 errors
Language: Java

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.*;

public class Main{
	static int N, D, money;
	static int[] prices;
	private static int solve(){
        int answer = 0;
        if (prices[0] * 2 > money) return 0;
        if (prices[prices.length - 1] + prices[prices.length - 2] <= money) return prices[prices.length - 1] + prices[prices.length - 2];
        for (int i = 0; i < N - 1; i++)
        {
            int index = Arrays.binarySearch(prices, i + 1, prices.length - i - 1, money - prices[i]);
            if (index > i) return prices[i] + prices[index];
            index = ~index - 1;
            if (index == i) continue;
            answer = Math.max(prices[i] + prices[index], answer);
        }
        return answer;
	}
	public static void main(String args[]){
		try{
	        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        	String[] strs = br.readLine().split(",");
    	    N = Integer.parseInt(strs[0]); D = Integer.parseInt(strs[1]);
	        prices = new int[N];
        	for (int i = 0; i < N; i++)
    	        prices[i] = Integer.parseInt(br.readLine());
	        Arrays.sort(prices);
        	for (int i = 0; i < D; i++)
    	    {
	            money = Integer.parseInt(br.readLine());
            	System.out.println(solve());
        	}
    	} catch{}
	}
}

Compiler output:
Main.java:36: error: '(' expected
    	} catch{}
    	       ^
1 error
Language: Java

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.*;

public class Main{
	static int N, D, money;
	static int[] prices;
	private static int solve(){
        int answer = 0;
        if (prices[0] * 2 > money) return 0;
        if (prices[prices.length - 1] + prices[prices.length - 2] <= money) return prices[prices.length - 1] + prices[prices.length - 2];
        for (int i = 0; i < N - 1; i++)
        {
            int index = Arrays.binarySearch(prices, i + 1, prices.length - i - 1, money - prices[i]);
            if (index > i) return prices[i] + prices[index];
            index = ~index - 1;
            if (index == i) continue;
            answer = Math.max(prices[i] + prices[index], answer);
        }
        return answer;
	}
	public static void main(String args[]){
		try{
	        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        	String[] strs = br.readLine().split(",");
    	    N = Integer.parseInt(strs[0]); D = Integer.parseInt(strs[1]);
	        prices = new int[N];
        	for (int i = 0; i < N; i++)
    	        prices[i] = Integer.parseInt(br.readLine());
	        Arrays.sort(prices);
        	for (int i = 0; i < D; i++)
    	    {
	            money = Integer.parseInt(br.readLine());
            	System.out.println(solve());
        	}
    	} catch(){}
	}
}

Compiler output:
Main.java:36: error: illegal start of type
    	} catch(){}
    	        ^
1 error
Language: C

#include<stdio.h>
#include<conio.h>
int main (void ){
int a,b,c,p=0,q=0;
 
    while(scanf("%d,",&a)!=EOF){
            scanf("%d,%d",&b,&c);
if(a+b+c == 12){
	p++;
}
else if(a == b){
	q++;
}

}
printf("%d\n%d\n",p,q);
return 0;

}

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

#include<stdio.h>

int main(void)
{
        int hen1 = 0, hen2 = 0, x = 0;
        int ccount = 0 , hcount = 0;

        while(scanf("%d,%d,%d",&hen1, &hen2, &x) != EOF)
        {
                if(x >= hen1 && x >= hen2)
                {


                        else if(hen1 == hen2)
                        {
                                hcount++;
                        }
                        else
                        {
                                ccount++;
                        }
                }
        }
        printf("%d\n",ccount);
        printf("%d\n",hcount);
        return 0;
}

Compiler output:
main.c: In function 'main':
main.c:14:25: error: expected '}' before 'else'
   14 |                         else if(hen1 == hen2)
      |                         ^~~~
main.c: At top level:
main.c:24:16: error: expected declaration specifiers or '...' before string constant
   24 |         printf("%d\n",ccount);
      |                ^~~~~~
main.c:24:23: error: unknown type name 'ccount'
   24 |         printf("%d\n",ccount);
      |                       ^~~~~~
main.c:25:16: error: expected declaration specifiers or '...' before string constant
   25 |         printf("%d\n",hcount);
      |                ^~~~~~
main.c:25:23: error: unknown type name 'hcount'
   25 |         printf("%d\n",hcount);
      |                       ^~~~~~
main.c:26:9: error: expected identifier or '(' before 'return'
   26 |         return 0;
      |         ^~~~~~
main.c:27:1: error: expected identifier or '(' before '}' token
   27 | }
      | ^
Language: C

#include<stdio.h>
    
int main(){
    
int h1,h2,tai,tcnt,hcnt;

tcnt =0;
hcnt=0;
  
while(scanf("%d,%d,%d",&h1,&h2,&tai)!=EOF){
  if(hi*hi+h2*h2=tai){tcnt=tcnt+1;}
  else if(h1==h2){hcnt=hcnt+1;}

   printf("%d\n%d\n ",tcnt,hcnt);

}
    
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:6: error: 'hi' undeclared (first use in this function); did you mean 'h2'?
   11 |   if(hi*hi+h2*h2=tai){tcnt=tcnt+1;}
      |      ^~
      |      h2
main.c:11:6: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
    
int main(){
    
int h1,h2,tai,tcnt,hcnt;

tcnt =0;
hcnt=0;
  
while(scanf("%d,%d,%d",&h1,&h2,&tai)!=EOF){
  if(h1*h1+h2*h2=tai){tcnt=tcnt+1;}
  else if(h1==h2){hcnt=hcnt+1;}

   printf("%d\n%d\n ",tcnt,hcnt);

}
    
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:17: error: lvalue required as left operand of assignment
   11 |   if(h1*h1+h2*h2=tai){tcnt=tcnt+1;}
      |                 ^
Language: C

#include<stdio.h>
int main(){
int a,b,c,m=0,n=0;
while(scanf("%d,%d,%d",&a,&b,&c)!=EOF){
if(a-b==0)
m++;
if(a*a+b*b-c*c==0)
n++;
}
printf("%d\n%d\n",n.m);
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:20: error: request for member 'm' in something not a structure or union
   10 | printf("%d\n%d\n",n.m);
      |                    ^
Language: C

#include<stdio.h>
main(){
  int a[3],tyo=0,hi=0,i,j,temp;
  while(scanf("%d,%d,%d",&a[0],&a[1],&a[2])!=EOF){

    */
    if(a[0]!=a[1]  && a[0]*a[0]+a[1]*a[1]==a[2]*a[2])
      tyo++;

    if(a[0]==a[1])
      hi++;
       printf("%d ",tyo);
  }
    printf("%d\n%d\n",tyo,hi);
    return 0;
}

Compiler output:
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
    2 | main(){
      | ^~~~
main.c: In function 'main':
main.c:6:6: error: expected expression before '/' token
    6 |     */
      |      ^
Language: C

int main(void){
	int hen1,hen2,taikaku,tyouhou=0,hisigata=0;
	
	while(scanf("%d,%d,%d",&hen1,&hen2,&taikaku) != EOF){
		if(sqrt(hen1*hen1 + hen2*hen2) == taikaku && hen1 == hen2){
			// 正方形
		}else if(sqrt(hen1*hen1 + hen2*hen2) == taikaku){
			// 長方形
			tyouhou++;
		}else if(hen1 == hen2){
			hisigata++;
		}
	}
	printf("%d\n%d\n",tyouhou,hisigata);
}

Compiler output:
main.c: In function 'main':
main.c:4:15: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    4 |         while(scanf("%d,%d,%d",&hen1,&hen2,&taikaku) != EOF){
      |               ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main(void){
main.c:4:15: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    4 |         while(scanf("%d,%d,%d",&hen1,&hen2,&taikaku) != EOF){
      |               ^~~~~
main.c:4:15: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:4:57: error: 'EOF' undeclared (first use in this function)
    4 |         while(scanf("%d,%d,%d",&hen1,&hen2,&taikaku) != EOF){
      |                                                         ^~~
main.c:4:57: note: 'EOF' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>'
main.c:4:57: note: each undeclared identifier is reported only once for each function it appears in
main.c:5:20: error: implicit declaration of function 'sqrt' [-Wimplicit-function-declaration]
    5 |                 if(sqrt(hen1*hen1 + hen2*hen2) == taikaku && hen1 == hen2){
      |                    ^~~~
main.c:1:1: note: include '<math.h>' or provide a declaration of 'sqrt'
  +++ |+#include <math.h>
    1 | int main(void){
main.c:5:20: warning: incompatible implicit declaration of built-in function 'sqrt' [-Wbuiltin-declaration-mismatch]
    5 |                 if(sqrt(hen1*hen1 + hen2*hen2) == taikaku && hen1 == hen2){
      |                    ^~~~
main.c:5:20: note: include '<math.h>' or provide a declaration of 'sqrt'
main.c:14:9: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   14 |         printf("%d\n%d\n",tyouhou,hisigata);
      |         ^~~~~~
main.c:14:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:14:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:14:9: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

#include <stdio.h>

int main(){

   int a,b,c,n1,n2;
   n1=0;
   n2=0;
   while(scanf("%d,%d,%d",&a,&b,&c)!=EOF){
      if(c*c=a*a+b*b)
         n1++;
      if(a==b)
         n2++;
   }
   printf("%d\n%d\n",n1,n2);
}
   return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:13: error: lvalue required as left operand of assignment
    9 |       if(c*c=a*a+b*b)
      |             ^
main.c: At top level:
main.c:16:4: error: expected identifier or '(' before 'return'
   16 |    return 0;
      |    ^~~~~~
main.c:17:1: error: expected identifier or '(' before '}' token
   17 | }
      | ^
Language: C

#include <stdio.h>

int main(){

   int a,b,c,n1,n2;
   n1=0;
   n2=0;
   while(scanf("%d,%d,%d",&a,&b,&c)!=EOF){
      if(c*c=a*a+b*b)
         n1++;
      if(a==b)
         n2++;
   }
   printf("%d\n%d\n",n1,n2);
   return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:13: error: lvalue required as left operand of assignment
    9 |       if(c*c=a*a+b*b)
      |             ^
Language: C

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

#define SQ(x)	((x) * (x))

int main(void)
{
	int x[3];
	int rect, dia;
	
	rect = 0;
	dia = 0;
	
	while (scanf("%d,%d,%d", &x[0], &x[1], &x[2]) != EOF){
			
		if (SQ(x[0]) == SQ(x[1]) + SQ(x[2])){
			rect++;
		}
		else if (SQ[1] == SQ2[2]){
			dia++;
		}
		
	}
		printf("%d\n%d\n", rect, dia);
	return (0);
}

Compiler output:
main.c: In function 'main':
main.c:19:26: error: 'SQ' undeclared (first use in this function)
   19 |                 else if (SQ[1] == SQ2[2]){
      |                          ^~
main.c:19:26: note: each undeclared identifier is reported only once for each function it appears in
main.c:19:35: error: 'SQ2' undeclared (first use in this function); did you mean 'SQ'?
   19 |                 else if (SQ[1] == SQ2[2]){
      |                                   ^~~
      |                                   SQ
Language: C++

#include <iostream>
using namespace std;
int main(void){
    // Your code here!
    int a, b; //隣り合う辺の長さ
    int c;　　//対角線の長さ
    int rectangular = 0, rhombus = 0; //長方形と菱形の個数
    
    while(cin.fail()){
        cin >> a >> b >> c;
        if(a != b && a + b >= c && a * a + b * b == c * c) rectangular++;
        else if(a == b && a + b >= c) rhombus++;
    }
    cout << rectangular << endl;
    cout << rhombus << endl;
}



Compiler output:
a.cc:6:11: error: extended character 　 is not valid in an identifier
    6 |     int c;　　//対角線の長さ
      |           ^
a.cc:6:11: error: extended character 　 is not valid in an identifier
a.cc: In function 'int main()':
a.cc:6:11: error: '\U00003000\U00003000' was not declared in this scope
    6 |     int c;　　//対角線の長さ
      |           ^~~~
a.cc:11:60: error: 'rectangular' was not declared in this scope
   11 |         if(a != b && a + b >= c && a * a + b * b == c * c) rectangular++;
      |                                                            ^~~~~~~~~~~
a.cc:12:39: error: 'rhombus' was not declared in this scope
   12 |         else if(a == b && a + b >= c) rhombus++;
      |                                       ^~~~~~~
a.cc:14:13: error: 'rectangular' was not declared in this scope
   14 |     cout << rectangular << endl;
      |             ^~~~~~~~~~~
a.cc:15:13: error: 'rhombus' was not declared in this scope
   15 |     cout << rhombus << endl;
      |             ^~~~~~~
Language: C++

p (r=$<.map{|l|a,b,c=l.split/,/.map{|i|i.to_i**2};a+b!=c&&a-b}).count(!0),r.count(0)

Compiler output:
a.cc:1:3: error: expected constructor, destructor, or type conversion before '(' token
    1 | p (r=$<.map{|l|a,b,c=l.split/,/.map{|i|i.to_i**2};a+b!=c&&a-b}).count(!0),r.count(0)
      |   ^
a.cc:1:63: error: expected unqualified-id before ')' token
    1 | p (r=$<.map{|l|a,b,c=l.split/,/.map{|i|i.to_i**2};a+b!=c&&a-b}).count(!0),r.count(0)
      |                                                               ^
Language: C++

#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <algorithm>
#include <vector>
#include <cstdlib>
#include <cstdio>
#include <string>
using namespace std;

#define TYO 0
#define HIS 1

int main(){
	int in1, in2, in3;
	int ans[2] = {};

	while (scanf("%d,%d,%d", &in1, &in2, &in3) != EOF){
		// 長方形check
		if (pow(in1, 2) + pow(in2, 2) == pow(in3, 2)){
			ans[TYO]++;
		}
		else if (in1 == in2){
			ans[HIS]++;
		}
	}
	for (int i = 0; i < 2; i++){
		cout << ans[i] << endl;
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:21: error: 'pow' was not declared in this scope
   19 |                 if (pow(in1, 2) + pow(in2, 2) == pow(in3, 2)){
      |                     ^~~
Language: C++

// #define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <algorithm>
#include <vector>
#include <cstdlib>
#include <cstdio>
#include <string>
using namespace std;

#define TYO 0
#define HIS 1

int main(){
	int in1, in2, in3;
	int ans[2] = {};

	while (scanf("%d,%d,%d", &in1, &in2, &in3) != EOF){
		// 長方形check
		if (pow(in1, 2) + pow(in2, 2) == pow(in3, 2)){
			ans[TYO]++;
		}
		else if (in1 == in2){
			ans[HIS]++;
		}
	}
	for (int i = 0; i < 2; i++){
		cout << ans[i] << endl;
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:21: error: 'pow' was not declared in this scope
   19 |                 if (pow(in1, 2) + pow(in2, 2) == pow(in3, 2)){
      |                     ^~~
Language: C++

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

int main(void) {
    string s;
    int rect = 0, rhom = 0;
    while (cin >> s) {
        replace(s.begin(), s.end(), ',', ' ');
        stringstream ss(s);
        int x, y, z;
        ss >> x >> y >> z;

        if (x == y || y == z || z == x) rhom++;
        else if (x*x + y*y == z*z) rect++;
    }

    cout << rect << endl;
    cout << rhom << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: 'replace' was not declared in this scope
   10 |         replace(s.begin(), s.end(), ',', ' ');
      |         ^~~~~~~
Language: C++

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

int main(void) {
    string s;
    int rect = 0, rhom = 0;
    while (cin >> s) {
        replace(s.begin(), s.end(), ',', ' ');
        stringstream ss(s);
        int x, y, z;
        ss >> x >> y >> z;

        if (x == y || y == z || z == x) rhom++;
        else if (x*x + y*y == z*z) rect++;
    }

    cout << rect << endl;
    cout << rhom << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: 'replace' was not declared in this scope
   10 |         replace(s.begin(), s.end(), ',', ' ');
      |         ^~~~~~~
Language: C++

#include <iostream>
#include <algorithm>
using namespace std;
int main(void){
	int a[3],ans[2];
	char com;
	ans[0]=0;ans[1]=0;
	while(cin>>a[0]>>com>>a[1]>>com>>a[2]){
		if(a[2]*a[2]==a[0]*a[0]+a[1]*a[1])ans[0]++;
		if(a[0]==a[1])ans[1]++;
	}
	cout<<ans[0]<<endl<<ans[1]<<endl;
	return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:13:18: error: expected '}' at end of input
   13 |         return 0;
      |                  ^
a.cc:4:15: note: to match this '{'
    4 | int main(void){
      |               ^
Language: C++

#include<stdio.h>

int main(){

int x,y,z;
int N=0,W=0;
while(scanf("%d %d %d",&x,&y,&z)!=EOF){
if(x==y)N++;
else if(x!=y)W++;
}
printf("%d\n,N);printf("%d\n,W);

return 0;
}

Compiler output:
a.cc:11:27: error: stray '\' in program
   11 | printf("%d\n,N);printf("%d\n,W);
      |                           ^
a.cc: In function 'int main()':
a.cc:11:26: error: 'd' was not declared in this scope
   11 | printf("%d\n,N);printf("%d\n,W);
      |                          ^
Language: C++

#include<stdio.h>

int main(){
int x,y,z;
int N=0,W=0;
while(scanf("%d,%d,%d,&x,&y,&z)!=EOF){
if(x!=y)N++;
else if(x==y)W++;
}
printf("%d\n%d\n,N,W);
return 0;
}

Compiler output:
a.cc:6:13: warning: missing terminating " character
    6 | while(scanf("%d,%d,%d,&x,&y,&z)!=EOF){
      |             ^
a.cc:6:13: error: missing terminating " character
    6 | while(scanf("%d,%d,%d,&x,&y,&z)!=EOF){
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:10:8: warning: missing terminating " character
   10 | printf("%d\n%d\n,N,W);
      |        ^
a.cc:10:8: error: missing terminating " character
   10 | printf("%d\n%d\n,N,W);
      |        ^~~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:7:1: error: expected primary-expression before 'if'
    7 | if(x!=y)N++;
      | ^~
a.cc:7:12: error: expected ')' before ';' token
    7 | if(x!=y)N++;
      |            ^
      |            )
a.cc:6:6: note: to match this '('
    6 | while(scanf("%d,%d,%d,&x,&y,&z)!=EOF){
      |      ^
a.cc:8:1: error: 'else' without a previous 'if'
    8 | else if(x==y)W++;
      | ^~~~
a.cc: At global scope:
a.cc:10:7: error: expected constructor, destructor, or type conversion before '(' token
   10 | printf("%d\n%d\n,N,W);
      |       ^
a.cc:12:1: error: expected declaration before '}' token
   12 | }
      | ^
Language: C++

#include<stdio.h>

int main(){
int x,y,z;
int N=0,W=0;
while(scanf("%d,%d,%d",&x,&y,&z)!=EOF){
if(z*z=x*x+y*y)N++;
else if(x==y)W++;
}
printf("%d\n%d\n",N,W);
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: lvalue required as left operand of assignment
    7 | if(z*z=x*x+y*y)N++;
      |    ~^~
Language: C++

include <cstdio>
using namespace std;

int main(){
	int a, b, c, ans1=0, ans2=0;

	while( scanf("%d,%d,%d", &a,&b,&c) != EOF ){
		if( a*a + b*b == c*c ) ans1++;
		else if( a == b ) ans2++;
	}
	printf("%d\n%d\n", ans1, ans2);
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <cstdio>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:7:16: error: 'scanf' was not declared in this scope
    7 |         while( scanf("%d,%d,%d", &a,&b,&c) != EOF ){
      |                ^~~~~
a.cc:7:47: error: 'EOF' was not declared in this scope
    7 |         while( scanf("%d,%d,%d", &a,&b,&c) != EOF ){
      |                                               ^~~
a.cc:1:1: note: 'EOF' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | include <cstdio>
a.cc:11:9: error: 'printf' was not declared in this scope
   11 |         printf("%d\n%d\n", ans1, ans2);
      |         ^~~~~~
a.cc:11:9: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C++

#include <iostream>

using namespace std;

int main(){
	int a, b, c;
	int cho=0;
	int hi=0;

	while(cin >> a >> b >> c){


		if(a*a + b*b = c*c){
			cho = cho + 1;
		}
		if(a==b){
			hi = hi + 1;
		}
	}
	cout << cho << endl;
	cout << hi << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:24: error: lvalue required as left operand of assignment
   13 |                 if(a*a + b*b = c*c){
      |                    ~~~~^~~~~
Language: C++

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

int main()
{
	int a, b, c;
	int r = 0;
	int l = 0;
	while (scanf_s("%d,%d,%d", &a, &b, &c) != EOF ) {
		if (a*a + b*b == c*c) {//??´?§?????§???¢
			r++;
		}
		else if (a == b) {//?????????????§???¢
			l++;
		}
	}
	cout << r << endl;
	cout << l << endl;
	
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:16: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   10 |         while (scanf_s("%d,%d,%d", &a, &b, &c) != EOF ) {
      |                ^~~~~~~
      |                scanf
Language: C++

#include<iostream>
#include<cmath>
using namespace std;
int main(){
	int a, b, c;
	while(cin >> a >> b >>c){
		int rect,rhom;
		if(a * a + b * b == c * c) rect++;
		else if(a == b) rhom++;
	}
	cout << rect << "?\n" << rhom << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:17: error: 'rect' was not declared in this scope
   11 |         cout << rect << "?\n" << rhom << endl;
      |                 ^~~~
a.cc:11:34: error: 'rhom' was not declared in this scope
   11 |         cout << rect << "?\n" << rhom << endl;
      |                                  ^~~~
Language: C++

#include<iostream>
using namespace std;
int main(){
	int a, b, c, rect, = 0, rhom = 0;
	while(cin >> a >> b >> c){
		if( a * a + b * b == c * c ) rect++;
		else if( a == b ) rhom++;
	}
	cout << rect << "?\n" << rhom << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:28: error: expected unqualified-id before '=' token
    4 |         int a, b, c, rect, = 0, rhom = 0;
      |                            ^
a.cc:7:35: error: 'rhom' was not declared in this scope
    7 |                 else if( a == b ) rhom++;
      |                                   ^~~~
a.cc:9:34: error: 'rhom' was not declared in this scope
    9 |         cout << rect << "?\n" << rhom << endl;
      |                                  ^~~~
Language: C++

#include<iostream>
using namespace std;
int main(){
	int a, b, c, rect = 0, rhom = 0;
	char d
	while(cin >> a >> d >> b >> d >> c){
		if( a * a + b * b == c * c ) rect++;
		else if( a == b ) rhom++;
	}
	cout << rect << endl << rhom << endl;
}

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

#include <bits/stdc++.h>
 
using namespace std;
 
/*-------------------------------*/
#define FOR(i, a, b) for(int i = (a); i < (b); i++) 
#define RFOR(i, a, b) for(int i = (b) - 1; i >= (a); i--)
#define REP(i, n) for(int i = 0; i < (n); i++)
#define RREP(i, n) for(int i = (n) - 1; i >= 0; i--)
#define all(i) (i).begin(),(i).end()
#define pb push_back
#define mp make_pair 
 
typedef long long ll;
typedef pair<int, int> pint;
typedef vector<int> vi;
typedef vector<vector<int> > vii;
typedef vector<long long> llv;
typedef vector<pint> vpint;
/*-------------------------------*/
 
int main(void)
{
  int a[3];
  char b[2];
  int rect = 0, rhom = 0;
  
  while (cin >> a[0] >> b[0] >> a[1] >> b[1] >> a[2]){
    if (x[0] == x[1]) rhom++;
    else if(a[0] * a[0] + a[1] * a[1] == a[2] * a[2]) rect++;
  }
  cout << rect << "\n" << rhom << endl;

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:9: error: 'x' was not declared in this scope
   29 |     if (x[0] == x[1]) rhom++;
      |         ^
Language: C++

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

int main() {
	int a, b, c;
	int co = 0, cp = 0;
	while (scanf_s("%d,%d,%d", &a, &b, &c) + 1) {
		if ((a*a) + (b*b) == c*c) {
			co++;
		}
		if (a + b > c) {
			cp++;
		}
	}
	cout << co << "\n" << cp << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:16: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
    8 |         while (scanf_s("%d,%d,%d", &a, &b, &c) + 1) {
      |                ^~~~~~~
      |                scanf
Language: C++

import sys
rec=rho=0
for line in sys.stdin:
#while True:
#	line=raw_input()
	if line=="a":
		break
	a,b,c=map(int,line.split(","))
	if a==b:
		rho+=1
	elif a*a+b*b==c*c:
		rec+=1
print rec
print rho

Compiler output:
a.cc:4:2: error: invalid preprocessing directive #while
    4 | #while True:
      |  ^~~~~
a.cc:5:13: error: "=" after #line is not a positive integer
    5 | #       line=raw_input()
      |             ^
a.cc:1:1: error: 'import' does not name a type
    1 | import sys
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

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

int main(){
  int a, b, c;
  int tyou = 0;
  int hishi = 0;
  
  while(scanf("%d %d %d", &a, &b, &c)!=EOF){
    if(a==b || a==c || b==c){
      if(a+b>c && b+c>a && c+a>b){
        hishi++;
    }else{
      if(a>b){
        if(a>c){
          if(a*a==b*b+c*c) tyou++;
        }else{
          if(c*c==a*a+b*b) tyou++;
        }
      }else{
        if(b>c){
          if(b*b==a*a+c*c) tyou++;
        }else{
          if(c*c==a*a+b*b) tyou++;
        }
      }
    }
  }
  
  std::cout << tyou << std::endl << hishi << std::endl;
  
  return 0;
}

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

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

int main(){
  int a, b, c;
  int tyou = 0;
  int hishi = 0;
  
  while(scanf("%d,%d,%d\n", &a, &b, &c)!=EOF){
    if(a==b || a==c || b==c){
      if(a+b>c && b+c>a && c+a>b){
        hishi++;
      }
    }
    if{
      if(a>b){
        if(a>c){
          if(a*a==b*b+c*c) tyou++;
        }else{
          if(c*c==a*a+b*b) tyou++;
        }
      }else{
        if(b>c){
          if(b*b==a*a+c*c) tyou++;
        }else{
          if(c*c==a*a+b*b) tyou++;
        }
      }
    }
  }
  
  std::cout << tyou << std::endl << hishi << std::endl;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:7: error: expected '(' before '{' token
   16 |     if{
      |       ^
      |       (
Language: C++

#include<iostream>
#include<vector>
#include<algorithm>

using namespace std;
int main()
{
	vector<vector<int>> n;
	int ch = 0;
	int hisi = 0;
	int i, j,k,l = 0;
	while (scanf_s("%d,%d,%d",&i,&j,&k) != EOF) {
		vector<int>v;
		
		v.push_back(i);
		v.push_back(j);
		v.push_back(k);
		sort(&v[0], &v[2]);
		n.push_back(v);
		l++;
	}
	for (int a = 0; a < l; a++) {
		
		if ((n[a][0] ^ 2 )== ((n[a][1] ^ 2 )+ (n[a][2] ^2))) {
			if (!(n[a][0] == n[a][1] == n[a][2])) {
				ch++;
			}
		}
		else if ((n[a][0] == (n[a][1] || n[a][2])) || (n[a][1] == n[a][2])) {
			if (!(n[a][0] == n[a][1] == n[a][2])) {
				hisi++;
			}
		}
	}
	cout << ch << "\n" << hisi << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:16: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   12 |         while (scanf_s("%d,%d,%d",&i,&j,&k) != EOF) {
      |                ^~~~~~~
      |                scanf
Language: C++

#include<iostream>
#include<vector>
#include<algorithm>

using namespace std;
int main()
{
	vector<vector<int> > n;
	int ch = 0;
	int hisi = 0;
	int i, j,k,l = 0;
	while (scanf_s("%d,%d,%d",&i,&j,&k) != EOF) {
		vector<int>v;
		
		v.push_back(i);
		v.push_back(j);
		v.push_back(k);
		sort(&v[0], &v[2]);
		n.push_back(v);
		l++;
	}
	for (int a = 0; a < l; a++) {
		
		if ((n[a][0] ^ 2 )== ((n[a][1] ^ 2 )+ (n[a][2] ^2))) {
			if (!(n[a][0] == n[a][1] == n[a][2])) {
				ch++;
			}
		}
		else if ((n[a][0] == (n[a][1] || n[a][2])) || (n[a][1] == n[a][2])) {
			if (!(n[a][0] == n[a][1] == n[a][2])) {
				hisi++;
			}
		}
	}
	cout << ch << "\n" << hisi << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:16: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   12 |         while (scanf_s("%d,%d,%d",&i,&j,&k) != EOF) {
      |                ^~~~~~~
      |                scanf
Language: C++

#include<cstdio>
using namespace std;

int main(){
int a,b,c,x=0,y=0;
While(scanf("%d,%d,%d",&a,&b,&c)!=EOF){
If(a==b)x++;
if(a*a+b*b==c*c)y++;
}
printf("%d?\n%d?\n",y,x);
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:1: error: 'While' was not declared in this scope
    6 | While(scanf("%d,%d,%d",&a,&b,&c)!=EOF){
      | ^~~~~
Language: C++

#include<cstdio>
using namespace std;

int main(){
int a,b,c,x=0,y=0;
While(scanf("%d,%d,%d",&a,&b,&c)!=EOF){
if(a==b)x++;
if(a*a+b*b==c*c)y++;
}
printf("%d?\n%d?\n",y,x);
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:1: error: 'While' was not declared in this scope
    6 | While(scanf("%d,%d,%d",&a,&b,&c)!=EOF){
      | ^~~~~
Language: C++

#include <cstdio>
using namespace std;

#define scanf scanf_s
#define printf printf_s

int a, b, c, r = 0, d = 0;

int main(){
	while (scanf("%d,%d,%d", &a, &b, &c) != EOF) {
		if (a*a + b*b == c*c) {
			r++;
		}
		if (a == b) {
			d++;
		}
	}
	printf("%d\n%d\n", r, d);

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:15: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
    4 | #define scanf scanf_s
      |               ^~~~~~~
a.cc:10:16: note: in expansion of macro 'scanf'
   10 |         while (scanf("%d,%d,%d", &a, &b, &c) != EOF) {
      |                ^~~~~
a.cc:5:16: error: 'printf_s' was not declared in this scope; did you mean 'printf'?
    5 | #define printf printf_s
      |                ^~~~~~~~
a.cc:18:9: note: in expansion of macro 'printf'
   18 |         printf("%d\n%d\n", r, d);
      |         ^~~~~~
Language: C++

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

int main() {
	int sides[3]; int square=0,para=0;
	while (scanf("%d,%d,%d", &sides[0], &sides[1], &sides[2]) != EOF) {
		//??£?????¢???check
		if (sides[0] * sides[0] + sides[1] * sides[1] == sides[2] * sides[2]) {
			square++; para++;
		}
		//??????????????¢???check
		else if (sides[0] == sides[1]) {
			para++;
		}
		cout << square << endl << para << endl;
	}

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

import sys
x,y=0,0
for line in sys.stdin:
	a,b,c = map(int,line[:-1].split(','))
	if a*a + b*b == c*c:
		x += 1
	if a == b:
		y += 1
print("{}\n{}".format(x,y))



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

#include<iostream>
int main()
{
	int cnt[2] = { 0,0 };
	while (true)
	{
		int a, b, c;
		char foo;
		std::cin >> a >> foo >> b >> foo >> c;
		if (std::cin.eof())
		{
			break;
		}
		if (c == hypot(a, b))
		{
			cnt[0]++;
		}
		else if (a == b)
		{
			cnt[1]++;
		}
	}
	std::cout << cnt[0] << std::endl;
	std::cout << cnt[1] << std::endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:26: error: 'hypot' was not declared in this scope
   14 |                 if (c == hypot(a, b))
      |                          ^~~~~
Language: C++

#include <cstdio>

using namespace std;

int main()
{
  int x, y, r, hisi = 0, tyou = 0;
  while (scanf("%d %d %d ", &x, &y, &r) == 3) {
    if (x == y) {hisi++;}
    if (x * x + y * y = r * r) {tyou++;}
  }
  
  printf("%d\n%d\n", hisi, tyou);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:15: error: lvalue required as left operand of assignment
   10 |     if (x * x + y * y = r * r) {tyou++;}
      |         ~~~~~~^~~~~~~
Language: C++

#include <cstdio>

using namespace std;

int main()
{
  int x, y, r, hisi = 0, tyou = 0;
  while (scanf("%d,%d,%d ", &x, &y, &r) == 3) {
    if (x == y) {hisi++;}
    if (x * x + y * y = r * r) {tyou++;}
  }
  
  printf("%d\n%d\n", hisi, tyou);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:15: error: lvalue required as left operand of assignment
   10 |     if (x * x + y * y = r * r) {tyou++;}
      |         ~~~~~~^~~~~~~
Language: C++

#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <string>
#include <set>
using namespace std;

int main()
{
	int t=0, h=0;
	set<vector<int> > T, H;
	int a, b, c;
	string buf;
	while(cin>>buf){
		if(buf=="0") break;
		sscanf(buf.c_str(),"%d,%d,%d", &a, &b, &c);
		vector<int> all;
		all.push_back(a);
		all.push_back(b);
		all.push_back(c);
		sort(all.begin(), all.end());
		if(all[0]==all[1] || all[1]==all[2]); H.insert(all)
		if(all[0]*all[0]+all[1]*all[1]==all[2]*all[2]) T.insert(all);
	}
	cout<<T.size()<<endl<<H.size()<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:68: error: expected ';' before 'if'
   23 |                 if(all[0]==all[1] || all[1]==all[2]); H.insert(all)
      |                                                                    ^
      |                                                                    ;
   24 |                 if(all[0]*all[0]+all[1]*all[1]==all[2]*all[2]) T.insert(all);
      |                 ~~
Language: C++

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

int main(void)
{
	int a,b;
	int t;

	int countt;
	int counth;

	char input[100];

	while(1)
	{
		gets(input);
		a = input[0] - '0';
		b = input[2] - '0';
		t = input[4] - '0';
		if(a*a+b*b == t*t)//直角を持つ
		{
			if(a == b)
				++countt;
			else
				++counth;
		}
		else
			if(a == b)
				++counth;
		if(input[5] == EOF)
			break;
	}
	cout << countt << endl;
	cout << counth << endl;
	return 0;
}

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

#include <cstdio>
using namespace std;

int main()
{
	int a,b,c,tc,rc;
	tc = rc = 0;
	while(scanf("%d,%d,%d",&a,&b,&c) == 3)
	{
		if(a == b) ++ rc;
		else if(a * a + b * b == c * c) ++tc;
	}
	cout << tc << endl << rc << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:9: error: 'cout' was not declared in this scope
   13 |         cout << tc << endl << rc << endl;
      |         ^~~~
a.cc:2:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include <cstdio>
  +++ |+#include <iostream>
    2 | using namespace std;
a.cc:13:23: error: 'endl' was not declared in this scope
   13 |         cout << tc << endl << rc << endl;
      |                       ^~~~
a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    1 | #include <cstdio>
  +++ |+#include <ostream>
    2 | using namespace std;
Language: C++

#include <iostream>
using namespace std;
 
int main()
{
    int a = 0, b = 0;
    int x,y,z;
    char a, b;
    while(cin >> x >> a >> y >> b >> t)
   {
        if(((x * x) + (y * y)) == z* z) a++;
        if(x == y) h++;
    }j
    cout << a << endl;
    cout << b << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:10: error: conflicting declaration 'char a'
    8 |     char a, b;
      |          ^
a.cc:6:9: note: previous declaration as 'int a'
    6 |     int a = 0, b = 0;
      |         ^
a.cc:8:13: error: conflicting declaration 'char b'
    8 |     char a, b;
      |             ^
a.cc:6:16: note: previous declaration as 'int b'
    6 |     int a = 0, b = 0;
      |                ^
a.cc:9:38: error: 't' was not declared in this scope
    9 |     while(cin >> x >> a >> y >> b >> t)
      |                                      ^
a.cc:12:20: error: 'h' was not declared in this scope
   12 |         if(x == y) h++;
      |                    ^
a.cc:13:6: error: 'j' was not declared in this scope
   13 |     }j
      |      ^
Language: C++

#include <iostream>
using namespace std;
 
int main()
{
    int a = 0, b = 0;
    int x,y,z;
    char a, b;
    while(cin >> x >> a >> y >> b >> z)
   {
        if(((x * x) + (y * y)) == z* z) a++;
        if(x == y) b++;
    }j
    cout << a << endl;
    cout << b << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:10: error: conflicting declaration 'char a'
    8 |     char a, b;
      |          ^
a.cc:6:9: note: previous declaration as 'int a'
    6 |     int a = 0, b = 0;
      |         ^
a.cc:8:13: error: conflicting declaration 'char b'
    8 |     char a, b;
      |             ^
a.cc:6:16: note: previous declaration as 'int b'
    6 |     int a = 0, b = 0;
      |                ^
a.cc:13:6: error: 'j' was not declared in this scope
   13 |     }j
      |      ^
Language: Java

import java.util.*;

class Main{
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
int n=sc.nextInt();
int k=new int[n][10];
for(int i=0;i<n;i++){
for(int j=0;j<10;j++){
k[i][j]=sc.nextInt();
}
}
for(int g=0;g<n;g++){
if(dfs(g,0,0,0,k)==true){System.out.println("YES");}
else{System.out.println("NO");}
}
}
public static boolean dfs(int i,int j,int r,int l,final int[][] k){
if(j==10){return true;}
else if(k[i][j]>r&&k[i][j]>l){
if(r>l){r=k[i][j];}
else{l=k[i][j];}
}
else if(k[i][j]>r){r=k[i][j];}
else if(k[i][j]>l){l=k[i][j];}
else{return false;}
return dfs(i,j+1,r,l,k);
}
}

Compiler output:
Main.java:7: error: incompatible types: int[][] cannot be converted to int
int k=new int[n][10];
      ^
Main.java:10: error: array required, but int found
k[i][j]=sc.nextInt();
 ^
Main.java:14: error: incompatible types: int cannot be converted to int[][]
if(dfs(g,0,0,0,k)==true){System.out.println("YES");}
               ^
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
3 errors
Language: Java

import java.util.Scanner;

/**
 * Created by sotetsuk on 2015/07/31.
 */
public class AOMain {
    static final int K = 10;
    static int N;
    static int[] balls = new int[10];
    static Scanner sc = new Scanner(System.in);
    static int l, r;

    public static void read() {
        for(int i = 0; i < K; i++) {
            balls[i] = sc.nextInt();
        }
    }

    public static boolean dfs(int i) {
        // stop condition
        if(i == K) return true;

        // recursive
        boolean flag_l = false; boolean flag_r = false;
        if(l == -1 || balls[l] < balls[i]) {
            int tmp_l = l; l = i; flag_l = dfs(i + 1); l = tmp_l;
        }
        if(r == -1 || balls[r] < balls[i]) {
            int tmp_r = r; r = i; flag_r = dfs(i + 1); r = tmp_r;
        }
        return flag_l || flag_r;
    }

    public static void solve() {
        l = -1; r = -1;
        String ans = dfs(0) ? "YES" : "NO";
        System.out.println(ans);
    }

    public static void main(String[] args) {
        N = sc.nextInt();
        for(int i = 0; i < N; i++) {
            read();
            solve();
        }

    }
}

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

import  java.util.*;
class Main{
    int N;
    int[] m=new int [10];  
    int l=0;
    int r=0;
    String ans="YES";
    Main(){
	Scanner sc=new Scanner(System.in);
	N=sc.nextInt();
	for(int i=0; i<N; i++){
	    for(int j=0; j<10; j++){
		m[j] =sc.nextInt();
		if(l m[j]
		

	




    public static void main(String[] args){
	new Main();
    }
}

Compiler output:
Main.java:14: error: ')' expected
		if(l m[j]
		    ^
Main.java:14: error: not a statement
		if(l m[j]
		      ^
Main.java:14: error: ';' expected
		if(l m[j]
		         ^
Main.java:22: error: illegal start of expression
    public static void main(String[] args){
    ^
4 errors
Language: Java

import java.util.*;
class main{
	Scanner sc=new Scanner(System.in);
	void aa(){
		int n=sc.nextInt();
		for(int i=0;i<n;i++){
			String YN="YES";
			int r=sc.nextInt();
			int l=0;
			for(int j=0;j<9;j++){
				int ball=sc.nextInt();
				if(ball>r)r=ball;
				else if(ball>l)l=ball;
				else YN="NO";
			}
			System.out.println(YN);
		}
	}
	public static void main(String[]arg){
		new Main().aa();
	}
}

Compiler output:
Main.java:2: error: duplicate class: main
class main{
^
Main.java:20: error: cannot access Main
		new Main().aa();
		    ^
  bad source file: ./Main.java
    file does not contain class Main
    Please remove or make sure it appears in the correct subdirectory of the sourcepath.
2 errors
Language: Java

import java.util.*;
import java.io.*;

public class Ball{
	static int a = 0; //??????????????¢??°
	static int b = 0;
	static int n;
	static int[][] input;
	public static void main(String[] args)throws IOException{
	Scanner sc = new Scanner(System.in);
	BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
	n = sc.nextInt();
	input = new int[n][10];
	for(int i = 0;i < input.length;i++){
		for(int j = 0;j < 10;j++){
			input[i][j] = Integer.parseInt(sc.next());
		}
	}
	for(int i = 0;i < input.length;i++){
		if(dfs(0,input[i])){
			System.out.println("yes");
		}else{
			System.out.println("no");
		}
	}
	}
	
	static boolean dfs(int i,int[] k){
		if(i == 10) return a == k[9] || b == k[9];
		if(k[i] > a){
			a = k[i];
		}else if(k[i] > b){
			b = k[i];
		}
		if(dfs(i+1,k)) return true;
		return false;
	}
}

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

import java.util.Scanner;

public class aoj0033 {

	public static int[] b;
	public static int[] f;
	public static int[] s;
	public static boolean ok;

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		while(n--!=0){
			b = new int[10];
			
			for(int i=0;i<10;i++){
				b[i]=scan.nextInt();
				}
			
			f = new int[10];
			s = new int[2];
			ok = false;
			
			dfs(0);
			
			System.out.println(ok?"YES":"NO");
		}
	}
	
	public static boolean check(){
		s[0] = s[1] = 0;
		
		for(int i=0;i<10;i++){
			if(s[f[i]]>=b[i])return false;
			s[f[i]] = b[i];
		}
		return true;
	}

	public static void dfs(int k){
		if(k==10){
			ok |= check();
		}else{
			f[k] = 0;
			dfs(k+1);
			f[k] = 1;
			dfs(k+1);
		}
	}
}

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