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

#include <iostream>
#include <vector>
using namespace std;
int main(){
	int n;
	vector<int> a(3);
	cin >> n;
	for(int i=0;i<n;i++){
		cin>>a[0]>>a[1]>>a[2];
		sort(a.begin(),a.end());
		if(a[2]*a[2]==a[0]*a[0] + a[1]*a[1]){
			cout << "YES" << endl;
		}else{
			cout << "NO" << endl;
		}
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:17: error: 'sort' was not declared in this scope; did you mean 'short'?
   10 |                 sort(a.begin(),a.end());
      |                 ^~~~
      |                 short
Language: C++

import Control.Monad
import Data.List

main = do
  n <- readLn
  s <- map (map (read :: (String -> Int)) . words) <$> replicateM n getLine
  mapM_ putStrLn $ map (\x -> if x then "YES" else "NO") $ map (\x -> (x !! 2) ^ 2 == (x !! 0) ^ 2 + (x !! 1) ^ 2)  $ map (sort) s

Compiler output:
a.cc:7:25: error: stray '\' in program
    7 |   mapM_ putStrLn $ map (\x -> if x then "YES" else "NO") $ map (\x -> (x !! 2) ^ 2 == (x !! 0) ^ 2 + (x !! 1) ^ 2)  $ map (sort) s
      |                         ^
a.cc:7:65: error: stray '\' in program
    7 |   mapM_ putStrLn $ map (\x -> if x then "YES" else "NO") $ map (\x -> (x !! 2) ^ 2 == (x !! 0) ^ 2 + (x !! 1) ^ 2)  $ map (sort) s
      |                                                                 ^
a.cc:1:1: error: 'import' does not name a type
    1 | import Control.Monad
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

using namespace std;
int main(){
  int N,a,b,c;
  cin>>N;
  for(int i=0;i<N;i++){
    cin>>a>>b>>c;
    if((a*a)==(b*b)+(c*c))
      cout<<"YES"<<endl;
    else if((b*b)==(a*a)+(c*c))
      cout<<"YES"<<endl;
    else if((c*c)==(a*a)+(b*b))
      cout<<"YES"<<endl;
    else
      cout<<"NO"<<endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'cin' was not declared in this scope
    4 |   cin>>N;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:8:7: error: 'cout' was not declared in this scope
    8 |       cout<<"YES"<<endl;
      |       ^~~~
a.cc:8:7: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:8:20: error: 'endl' was not declared in this scope
    8 |       cout<<"YES"<<endl;
      |                    ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | using namespace std;
a.cc:10:7: error: 'cout' was not declared in this scope
   10 |       cout<<"YES"<<endl;
      |       ^~~~
a.cc:10:7: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:10:20: error: 'endl' was not declared in this scope
   10 |       cout<<"YES"<<endl;
      |                    ^~~~
a.cc:10:20: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
a.cc:12:7: error: 'cout' was not declared in this scope
   12 |       cout<<"YES"<<endl;
      |       ^~~~
a.cc:12:7: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:12:20: error: 'endl' was not declared in this scope
   12 |       cout<<"YES"<<endl;
      |                    ^~~~
a.cc:12:20: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
a.cc:14:7: error: 'cout' was not declared in this scope
   14 |       cout<<"NO"<<endl;
      |       ^~~~
a.cc:14:7: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:14:19: error: 'endl' was not declared in this scope
   14 |       cout<<"NO"<<endl;
      |                   ^~~~
a.cc:14:19: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

#include <iostream>
using namespace std;

int main(){
	const int N = 3;
	int l[N];
	int n;
	cin >> n;
	for(int i = 0; i < n; ++i) {
		cin >> l[0] >> l[1] >> l[2];
		sort(l, l + N);
		if(l[0] * l[0] + l[1] * l[1] == l[2] * l[2]) {
			cout << "YES" << endl;
		} else {
			cout << "NO" << endl;
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:17: error: 'sort' was not declared in this scope; did you mean 'short'?
   11 |                 sort(l, l + N);
      |                 ^~~~
      |                 short
Language: C++

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

int main() {
  int n;
  scanf("%d",&n);
  int a[3];
  while(n--){
    for(int i=0;i<3;i++){
      cin>>a[i];
    }
    sort(a,a+3);
    if(a[0]*a[0]+a[1]*a[1]==a[2]*a[2]){
      printf("YES\n");
    }else{
      printf("NO\n");
    }
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   13 |     sort(a,a+3);
      |     ^~~~
      |     short
Language: C++

n = int(input())
for i in range(n):
  h = list(map(int,input()))
  h.sort()
  if h[0]**2 ++ h[1]**2 == h[2]**2:
    print('YES')
  else:
    print('NO')

Compiler output:
a.cc:6:11: warning: multi-character character constant [-Wmultichar]
    6 |     print('YES')
      |           ^~~~~
a.cc:8:11: warning: multi-character character constant [-Wmultichar]
    8 |     print('NO')
      |           ^~~~
a.cc:1:1: error: 'n' does not name a type
    1 | n = int(input())
      | ^
Language: C++

//clang 3.8.0

#include  <stdio.h>

int main(void)
{
    int *a, *b, *c;
    int n, i, temp;
    
    scanf("%d", &n);
    
    a = (int *)malloc(sizeof(int) * n);
    b = (int *)malloc(sizeof(int) * n);
    c = (int *)malloc(sizeof(int) * n);
    
    for(i = 0; i < n; i ++){
        scanf("%d %d %d", &a[i], &b[i], &c[i]);
        
        if(a[i] > b[i]){
            if(a[i] > c[i]){
                temp = c[i];
                c[i] = a[i];
                a[i] = temp;
            }else{
                //no_problem
            }
        }else if(b[i] > c[i]){
            temp = c[i];
            c[i] = b[i];
            b[i] = temp;
        }else{
            //no_problem
        }
    }
    
    for(i = 0; i < n; i ++){
        printf("%s\n", (a[i] * a[i] + b[i] * b[i] == c[i] * c[i]) ? ("Yes") : ("No"));
    }
    
    free(a); free(b); free(c);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:16: error: 'malloc' was not declared in this scope
   12 |     a = (int *)malloc(sizeof(int) * n);
      |                ^~~~~~
a.cc:4:1: note: 'malloc' is defined in header '<cstdlib>'; this is probably fixable by adding '#include <cstdlib>'
    3 | #include  <stdio.h>
  +++ |+#include <cstdlib>
    4 | 
a.cc:40:5: error: 'free' was not declared in this scope
   40 |     free(a); free(b); free(c);
      |     ^~~~
a.cc:40:5: note: 'free' is defined in header '<cstdlib>'; this is probably fixable by adding '#include <cstdlib>'
Language: C++

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

bool IsRightTriangle(const int a, const int b, const int c)
{
	vector<int> SideLength(3);
	SideLength[0] = a;
	SideLength[1] = b;
	SideLength[2] = c;
	sort(SideLength.begin(), SideLength.end(), greater<int>());
	if(SideLength[0] * SideLength[0] == SideLength[1] * SideLength[1] + SideLength[2] * SideLength[2]){
		return true;
	}else{
		return false;
	}
}

int main()
{
	int N;
	cin >> N;
	for(int i = 0; i < N; i++){
		int a, b, c;
		cin >> a >> b >> c;
		if(IsRightTriangle(a, b, c)){
			cout << "YES" << endl;
		}else{
			cout << "NO"  << endl;
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'bool IsRightTriangle(int, int, int)':
a.cc:7:9: error: 'vector' was not declared in this scope
    7 |         vector<int> SideLength(3);
      |         ^~~~~~
a.cc:3:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    2 | #include <algorithm>
  +++ |+#include <vector>
    3 | using namespace std;
a.cc:7:16: error: expected primary-expression before 'int'
    7 |         vector<int> SideLength(3);
      |                ^~~
a.cc:8:9: error: 'SideLength' was not declared in this scope
    8 |         SideLength[0] = a;
      |         ^~~~~~~~~~
a.cc:17:1: warning: control reaches end of non-void function [-Wreturn-type]
   17 | }
      | ^
Language: C++

#include<stdio.h>
??
int main(void){
????????????????int a,b,c,temp;
????????????????int i,j;
????????????????int N;
??
????????????????scanf("%d",&N);
??
????????????????int k[N][3];
??
????????????????i=0;
??
????????????????while(scanf("%d %d %d",&a,&b,&c)!=EOF){
????????????????????????????????if(a>b){
????????????????????????????????temp=b;
????????????????????????????????b=a;
????????????????????????????????a=temp;
????????????????????????????????}
????????????????????????????????if(b>c){
????????????????????????????????temp=c;
????????????????????????????????c=b;
????????????????????????????????b=temp;
????????????????????????????????}
??
????????????????????????????????k[i][0]=a;
????????????????????????????????k[i][1]=b;
????????????????????????????????k[i][2]=c;
????????????????????????????????i++;
????????????????????????????????if(N==i) break;
??
????????????????}
??
????????????????for(j=0;j<N;j++){
????????????????????????????????if(k[j][2]*k[j][2]==k[j][1]*k[j][1]+k[j][0]*k[j][0]){
????????????????????????????????printf("YES \n");
????????????????????????????????}else{
????????????????????????????????printf("NO \n");
????????????????????????????????}
????????????????}
??
????????????????return 0;
}

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

#include<iostream>
using namespace std;
int main(){
  int a,b,c;
  int i;
  cin>>i;
  for(int j = 0 ; j<i ; j++){
  cin>>a>>b>>c
  if(a*a == b*b+c*c)
    cout<<"YES"<<endl;
  else if(b*b == a*a+c*c)
    cout<<"YES"<<endl;
  else if(c*c == b*b+a*a)
    cout<<"YES"<<endl;
  else
    cout<<"NO"<<endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:15: error: expected ';' before 'if'
    8 |   cin>>a>>b>>c
      |               ^
      |               ;
    9 |   if(a*a == b*b+c*c)
      |   ~~           
a.cc:11:3: error: 'else' without a previous 'if'
   11 |   else if(b*b == a*a+c*c)
      |   ^~~~
Language: C++

import Control.Applicative
import Control.Monad
import Data.List

main = do
    n <- read<$>getLine
    tris <- map (map read.words)<$>replicateM n getLine
    mapM_ (putStrLn.yesOrNo.isRightTriangle) tris

isRightTriangle list = x^2 + y^2 == z^2
    where [x,y,z] = sort list

yesOrNo x = if x then "YES" else "NO"

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

#include <algorithm>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>

using namespace std;
int main()
{
	int n ;
	cin >> n;
	for (int i = 0; i < n; i++) {
		int a[3];
		cin >> a[0] >> a[1] >> a[2];
		sort(a, a + 3);
		if (a[2] < a[1] + a[0]&&a[1]<a[2]+a[0]&&a[0]<a[1]+a[2]) { cout << "YES"; }
		else { cout << "NO"; }
		cout << endl;
		}
	return 0;

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

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

int sq(int x){return x*x;}
int main(){
  int n;
  cin>>n;
  for(int i=0;i<n;i++){
    int a,b,c;
    cin>>a>>b>>c;
    cout<<(sq(max([a,b,c]))*2==sq(a)+sq(b)+sq(c) ? "YES" :"NO")<<endl;
  }
  return 0;
}

Compiler output:
a.cc: In lambda function:
a.cc:11:26: error: expected '{' before ')' token
   11 |     cout<<(sq(max([a,b,c]))*2==sq(a)+sq(b)+sq(c) ? "YES" :"NO")<<endl;
      |                          ^
a.cc: In function 'int main()':
a.cc:11:18: error: no matching function for call to 'max(main()::<lambda()>)'
   11 |     cout<<(sq(max([a,b,c]))*2==sq(a)+sq(b)+sq(c) ? "YES" :"NO")<<endl;
      |               ~~~^~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 1 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   template argument deduction/substitution failed:
a.cc:11:18: note:   'main()::<lambda()>' is not derived from 'std::initializer_list<_Tp>'
   11 |     cout<<(sq(max([a,b,c]))*2==sq(a)+sq(b)+sq(c) ? "YES" :"NO")<<endl;
      |               ~~~^~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   candidate expects 2 arguments, 1 provided
Language: C++

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

	int n;
	int a,b,c;
	int a[3];
	string str[];
	
	n = Integer.parseInt(br.readLine());
	str[]=new str[n];
	for(int i=0;i<n;i++){

	a = Integer.parseInt(br.readLine());
	b = Integer.parseInt(br.readLine());
	c = Integer.parseInt(br.readLine());

	a[0]=max(a,b,c);
	if(a[0]==a){
		a[1]=b;
		a[2]=c;
	}elseif(a[0]==b){
		a[1]=a;
		a[2]=c;
	}elseif(a[0]==c){
		a[1]=b;
		a[2]=a;
	}
	if(a[0]^2==a[1]^2+a[2]^2){
		str[i]="YES";
	}else{
		str[i]="NO";
	}
	}

	for(int i=0;i<n;i++){
				System.out.println(str[i]);
	}
    }
}

Compiler output:
a.cc:1:1: error: expected unqualified-id before 'public'
    1 | public class HelloWorld {
      | ^~~~~~
Language: C++

Class Tenmou{
public class HelloWorld {
    public static void main (String[] args) {

	int n;
	int a,b,c;
	int a[3];
	string str[];
	
	n = Integer.parseInt(br.readLine());
	str[]=new str[n];
	for(int i=0;i<n;i++){

	a = Integer.parseInt(br.readLine());
	b = Integer.parseInt(br.readLine());
	c = Integer.parseInt(br.readLine());

	a[0]=max(a,b,c);
	if(a[0]==a){
		a[1]=b;
		a[2]=c;
	}elseif(a[0]==b){
		a[1]=a;
		a[2]=c;
	}elseif(a[0]==c){
		a[1]=b;
		a[2]=a;
	}
	if(a[0]^2==a[1]^2+a[2]^2){
		str[i]="YES";
	}else{
		str[i]="NO";
	}
	}

	for(int i=0;i<n;i++){
				System.out.println(str[i]);
	}
    }
}
}

Compiler output:
a.cc:1:1: error: 'Class' does not name a type; did you mean 'class'?
    1 | Class Tenmou{
      | ^~~~~
      | class
Language: C++

#include <cstdlib>
#include <vector>
#include <math.h>
using namespace std;

int main(){
	vector<vector<int> > a;

	int lines = 0;
	scanf("%d", &lines);

	bool isOk[lines];
	for (int i = 0; i < lines; ++i)
	{
		int l[3];
		for (int j = 0; j < 3; ++j)
			scanf("%d", &l[j]);

		if(pow(l[0], 2.0) + pow(l[1], 2.0) == pow(l[2], 2.0)) isOk[i] = true;
		if(!isOk[i] && pow(l[1], 2.0) + pow(l[2], 2.0) == pow(l[0], 2.0)) isOk[i] = true;
		if(!isOk[i] && pow(l[2], 2.0) + pow(l[0], 2.0) == pow(l[1], 2.0)) isOk[i] = true;
	}

	for (int i = 0; i < lines; ++i)
	{
		if(isOk[i]) printf("YES\n");
		else printf("NO\n");
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: 'scanf' was not declared in this scope
   10 |         scanf("%d", &lines);
      |         ^~~~~
a.cc:26:29: error: 'printf' was not declared in this scope
   26 |                 if(isOk[i]) printf("YES\n");
      |                             ^~~~~~
a.cc:4:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
    3 | #include <math.h>
  +++ |+#include <cstdio>
    4 | using namespace std;
a.cc:27:22: error: 'printf' was not declared in this scope
   27 |                 else printf("NO\n");
      |                      ^~~~~~
a.cc:27:22: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C++

#include <iostream>

int main ()
{
    int N, x, y, z, X, Y, Z;
    std::cin >> N;
    for (int n = N; n > 0; --n) {
        std::cin >> x >> y >> z;
        X = x * x;
        Y = y * y;
        Z = z * z;
        if (X + Y = Z || Y + Z = X || Z + X = Y) {
            std::cout << "YES" << std::endl;
        } else {
            std::cout << "NO" << std::endl;
        }
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:36: error: lvalue required as left operand of assignment
   12 |         if (X + Y = Z || Y + Z = X || Z + X = Y) {
      |                                  ~~^~~~~~~~
Language: C++

// 0003.cpp : ??????????????? ??¢????????±????????§????????¨????????? ?????????????????????????????????
//
#include<stdio.h>
#include "stdafx.h"
#include <algorithm>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>

using namespace std;
int main()
{
	int n ;
	cin >> n;
	for (int i = 0; i < n; i++) {
		int a[3];
		cin >> a[0] >> a[1] >> a[2];
		sort(a, a + 3);
		if (a[2]*a[2]==a[1]*a[1]+a[0]*a[0]) { cout << "YES"<<endl; }
		else { cout << "NO"<<endl; }
		
		}
	return 0;

}

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

def main():
    def inputs():
        li = []
        count = 0
        try:
            N = input()
            while count < int(N):
                li.append(input())
                count += 1
        except EOFError:
            return li
        return li

    li = inputs()
    for x in li:
        tmp = x.split(" ")
        tmp = sorted(tmp)
        a,b,c = int(tmp[0]),int(tmp[1]),int(tmp[2])
        if c**2 == a**2 + b**2:
            print("YES")
        else:
            print("NO")
    return None

main()

Compiler output:
a.cc:1:1: error: 'def' does not name a type
    1 | def main():
      | ^~~
Language: C++

#include <iostream>
#include <algorithm>
using namespace std;
int main(){
    int n = 0;
    int a[3];
    cin >> n;
    for(int i = 0; i < n; i++){
        cin >> a[0] >> a[1] >> a[2];
        sort(a, a+3, greater<int>());
        if(pow(a[1], 2) + pow(a[2], 2) == pow(a[0], 2)){
            cout << "YES" << endl;
        }else{
            cout << "NO" << endl;
        }
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:12: error: 'pow' was not declared in this scope
   11 |         if(pow(a[1], 2) + pow(a[2], 2) == pow(a[0], 2)){
      |            ^~~
Language: C++

#include <iostream>
#include <algorithm>
using namespace std;
int main(){
    int n = 0;
    int a[3];
    cin >> n;
    for(int i = 0; i < n; i++){
        cin >> a[0] >> a[1] >> a[2];
        sort(a, a+3);
        if((pow(a[0], 2) + pow(a[1], 2)) == pow(a[2], 2)){
            cout << "YES" << endl;
        }else{
            cout << "NO" << endl;
        }
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:13: error: 'pow' was not declared in this scope
   11 |         if((pow(a[0], 2) + pow(a[1], 2)) == pow(a[2], 2)){
      |             ^~~
Language: C++

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

int N;
int a[3]; 

int main() {
  for (int i = 0; i < N; ++i) {
    scanf("%d %d %d",a[1],a[2],a[3]);
    sort(a,a+3);
    if (a[1]*a[1] + a[2]*a[2] = a[3]*a[3]) {
      printf("%s\n" , YES);
    } else {
      printf("%s\n" , NO);
    }
  }
  
}

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

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

int N;
int a[3]; 

int main() {
  for (int i = 0; i < N; ++i) {
    scanf("%d %d %d",a[1],a[2],a[3]);
    sort(a,a+3);
    if (a[1]*a[1] + a[2]*a[2] = a[3]*a[3]) {
      printf("%s\n" , YES);
    } else {
      printf("%s\n" , NO);
    }
  }
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:19: error: lvalue required as left operand of assignment
   11 |     if (a[1]*a[1] + a[2]*a[2] = a[3]*a[3]) {
      |         ~~~~~~~~~~^~~~~~~~~~~
a.cc:12:23: error: 'YES' was not declared in this scope
   12 |       printf("%s\n" , YES);
      |                       ^~~
a.cc:14:23: error: 'NO' was not declared in this scope; did you mean 'N'?
   14 |       printf("%s\n" , NO);
      |                       ^~
      |                       N
Language: C++

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

int N;
int a[3]; 

int main() {
  for (int i = 0; i < N; ++i) {
    scanf("%d %d %d",a[1],a[2],a[3]);
    sort(a,a+3);
    if (a[1]*a[1] + a[2]*a[2] = a[3]*a[3]) {
      printf("YES\n");
    } else {
      printf("NO\n");
    }
  }
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:19: error: lvalue required as left operand of assignment
   11 |     if (a[1]*a[1] + a[2]*a[2] = a[3]*a[3]) {
      |         ~~~~~~~~~~^~~~~~~~~~~
Language: C++

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

int N;
int a[3]; 
int b,c,d;

int main() {
  for (int i = 0; i < N; ++i) {
    scanf("%d %d %d",a[1],a[2],a[3]);
    sort(a,a+3);
    b = a[1]*a[1];
    c = a[2]*a[2];
    d = a[3]*a[3];
    if ( b + c = d ) {
      printf("YES\n");
    } else {
      printf("NO\n");
    }
  }
  
}

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

#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
 
#define MAX 1000
#define MIN 1
 
using namespace std;
 
bool right(int a,int b,int c) {
 if(((a * a) + (b * b)) == (c * c)) {
  return true;
 } else {
  return false;
} 

int main() {
 int i = 0,j;
 int n;
 int side[3];
 bool cnt = false;
 vector<string> judge;
 
 cin >> n;
 
 while(i < n) {
  cin >> side[0] >> side[1] >> side[2];
 
  for(j = 0;j < 3;++j) {
   if((side[j] < MIN) || (side[j] > MAX)) {
    cnt = true;
   }
  }
 
  if(cnt == true) continue; 
 
  sort(side, side + 3);
 
  if((right(side[0],side[1],side[2]) == true) {
   judge.push_back("YES");
  } else {
   judge.push_back("NO");
  }

  ++i;
 }
 
 for(i = 0;i < judge.size();++i) {
  cout << judge.at(i) << endl;
 }
 
 return 0;
}

Compiler output:
a.cc: In function 'bool right(int, int, int)':
a.cc:18:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   18 | int main() {
      |         ^~
a.cc:18:9: note: remove parentheses to default-initialize a variable
   18 | int main() {
      |         ^~
      |         --
a.cc:18:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:18:12: error: a function-definition is not allowed here before '{' token
   18 | int main() {
      |            ^
a.cc:54:2: error: expected '}' at end of input
   54 | }
      |  ^
a.cc:11:31: note: to match this '{'
   11 | bool right(int a,int b,int c) {
      |                               ^
Language: C++

#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
 
#define MAX 1000
#define MIN 1
 
using namespace std;
 
bool right(int a,int b,int c) {
 if(((a * a) + (b * b)) == (c * c)) {
  return true;
 } else {
  return false;
 }
}

int main() {
 int i = 0,j;
 int n;
 int side[3];
 bool cnt = false;
 vector<string> judge;
 
 cin >> n;
 
 while(i < n) {
  cin >> side[0] >> side[1] >> side[2];
 
  for(j = 0;j < 3;++j) {
   if((side[j] < MIN) || (side[j] > MAX)) {
    cnt = true;
   }
  }
 
  if(cnt == true) continue; 
 
  sort(side, side + 3);
 
  if((right(side[0],side[1],side[2]) == true) {
   judge.push_back("YES");
  } else {
   judge.push_back("NO");
  }

  ++i;
 }
 
 for(i = 0;i < judge.size();++i) {
  cout << judge.at(i) << endl;
 }
 
 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:41:46: error: expected ';' before '{' token
   41 |   if((right(side[0],side[1],side[2]) == true) {
      |                                              ^~
      |                                              ;
a.cc:43:5: error: expected primary-expression before 'else'
   43 |   } else {
      |     ^~~~
a.cc:43:4: error: expected ')' before 'else'
   43 |   } else {
      |    ^~~~~
      |    )
a.cc:41:5: note: to match this '('
   41 |   if((right(side[0],side[1],side[2]) == true) {
      |     ^
Language: C++

#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
 
#define MAX 1000
#define MIN 1
 
using namespace std;
 
bool right(int a,int b,int c) {
 if(((a * a) + (b * b)) == (c * c)) {
  return true;
 } else {
  return false;
 }
}

int main() {
 int i = 0,j;
 int n;
 int side[3];
 bool cnt = false;
 vector<string> judge;
 
 cin >> n;
 
 while(i < n) {
  cin >> side[0] >> side[1] >> side[2];
 
  for(j = 0;j < 3;++j) {
   if((side[j] < MIN) || (side[j] > MAX)) {
    cnt = true;
   }
  }
 
  if(cnt == true) continue; 
 
  sort(side, side + 3);
 
  if((right(side[0],side[1],side[2]) == true) {
   judge.push_back("YES");
  } else {
   judge.push_back("NO");
  }

  ++i;
 }
 
 for(i = 0;i < judge.size();++i) {
  cout << judge.at(i) << endl;
 }
 
 return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:41:46: error: expected ';' before '{' token
   41 |   if((right(side[0],side[1],side[2]) == true) {
      |                                              ^~
      |                                              ;
a.cc:43:5: error: expected primary-expression before 'else'
   43 |   } else {
      |     ^~~~
a.cc:43:4: error: expected ')' before 'else'
   43 |   } else {
      |    ^~~~~
      |    )
a.cc:41:5: note: to match this '('
   41 |   if((right(side[0],side[1],side[2]) == true) {
      |     ^
a.cc:54:11: error: expected '}' at end of input
   54 |  return 0;
      |           ^
a.cc:19:12: note: to match this '{'
   19 | int main() {
      |            ^
Language: C++

#include<stdio.h>
int main(){
	int N,x,y,z;
	scanf("%d %d %d",&x,&y,&z);
	for(i=0;i<N;i++){
		if(x^2+y^2==z^2||x^2+z^2==y^2||y^2+z^2==x^2){
			printf("Yes\n");
		}
		else {
			printf("No\n");
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:13: error: 'i' was not declared in this scope
    5 |         for(i=0;i<N;i++){
      |             ^
Language: C++

#include <iostream>

usingnamespace std;

int main(){
int a,b,c,d;
cin>>a;
for(int i=0;i<a;i++){
cin>>b>>c>>d;
if(b*b+c*c==d*d||c*c+d*d==b*b||d*d+b*b=c*c){
cout <<"YES"<<endl;
}else{
cout <<"NO"<<endl;
}
}
return 0;
}

Compiler output:
a.cc:3:1: error: 'usingnamespace' does not name a type
    3 | usingnamespace std;
      | ^~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:7:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 | cin>>a;
      | ^~~
      | std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:10:30: error: lvalue required as left operand of assignment
   10 | if(b*b+c*c==d*d||c*c+d*d==b*b||d*d+b*b=c*c){
      |    ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
a.cc:11:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   11 | cout <<"YES"<<endl;
      | ^~~~
      | std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:11:15: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   11 | cout <<"YES"<<endl;
      |               ^~~~
      |               std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:13:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   13 | cout <<"NO"<<endl;
      | ^~~~
      | std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:13:14: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   13 | cout <<"NO"<<endl;
      |              ^~~~
      |              std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <iostream>

using namespace std;

int main(){
int a,b,c,d;
cin>>a;
for(int i=0;i<a;i++){
cin>>b>>c>>d;
if(b*b+c*c==d*d||c*c+d*d==b*b||d*d+b*b=c*c){
cout <<"YES"<<endl;
}else{
cout <<"NO"<<endl;
}
}
return 0;
}

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

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

#define N 1000

struct{int a[3];} d[N];

int main(){
    int i,j,L;
    int longest,short;

    for(i=0; i<N,scanf("%d %d %d",&d[i].a[0],&d[i].a[1],&d[i].a[2])!=EOF; i++);
    L=i;
    for(i=0;i<L;i++){        
        longest=0;
        for(j=0;j<3;j++)
            if(longest<d[i].a[j])
                longest=d[i].a[j];
        for(j=0;j<3;j++)
            if(d[i].a[j]!=longest)
                short+=pow(d[i].a[j],2);
        if(short==pow(longest,2))
            printf("YES");
        else
            printf("NO");
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:17: error: expected unqualified-id before 'short'
   10 |     int longest,short;
      |                 ^~~~~
a.cc:21:22: error: expected unqualified-id before '+=' token
   21 |                 short+=pow(d[i].a[j],2);
      |                      ^~
a.cc:22:17: error: expected unqualified-id before '==' token
   22 |         if(short==pow(longest,2))
      |                 ^~
Language: C++

//
//  main.cpp
//  b
//
//  Created by h3037178 on 2017/07/31.
//  Copyright ?? 2017??´ ?????£?????????. All rights reserved.
//

#include <iostream>
#include<algorithm>
#include<math.h>
using namespace std;
int main(){
    int n,a,i[3],f[3];
    cin>>n;
    if(n>1000){
        break;
    }
    for(int l=0;l<n;l++){
                for(a=0;a<3;a++){
            cin>>i[a];
            f[a]=i[a]^2;
        }
        if(i[a]<=0||i[a]>1000){
                break;
            }
        sort(f,f+3);
        if(f[2]==f[0]+f[1]){
            cout<<"YES"<<endl;
        }else{
            cout<<"NO"<<endl;
        }
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:9: error: break statement not within loop or switch
   17 |         break;
      |         ^~~~~
Language: C++

int main(){
    
    int a[3];
    int N;
    int i,j,k,tmp;
    
    cin>>N;
    for(k=0;k<N;k++){
        cin>>a[0]>>a[1]>>a[2];
        for(i=0;i<2;i++){
            for(j=i+1;j<3;j++){
                if(a[j]>a[i]){
                    tmp=a[i];
                    a[i]=a[j];
                    a[j]=tmp;
                }
            }
            
            
        }
        
        if(pow(a[0],2)==pow(a[1],2)+pow(a[2],2)){
            cout<<"YES"<<endl;
        }else{
            cout<<"NO"<<endl;
        }
    
    }

}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: 'cin' was not declared in this scope
    7 |     cin>>N;
      |     ^~~
a.cc:22:12: error: 'pow' was not declared in this scope
   22 |         if(pow(a[0],2)==pow(a[1],2)+pow(a[2],2)){
      |            ^~~
a.cc:23:13: error: 'cout' was not declared in this scope
   23 |             cout<<"YES"<<endl;
      |             ^~~~
a.cc:23:26: error: 'endl' was not declared in this scope
   23 |             cout<<"YES"<<endl;
      |                          ^~~~
a.cc:25:13: error: 'cout' was not declared in this scope
   25 |             cout<<"NO"<<endl;
      |             ^~~~
a.cc:25:25: error: 'endl' was not declared in this scope
   25 |             cout<<"NO"<<endl;
      |                         ^~~~
Language: C++

#include <iostream>
using namespace std;

void sjx(double a, double b, double c)
{
	if (a < b + c && b < a + c && c < a + b)
		cout << "yes" << endl;
	else
		cout << "no" << endl;
}
int main()
{
	int a;

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

#include <bits/stdc++.h>
using namespace std;
int main(){
  while(scanf("%d %d %d",&a,&b,&c)!=EOF){
    if(a*a+b*b==c*c) printf("YES\n");
    else if(a*a+c*c==b*b) printf("YES\n");
    else if(b*b+c*c==a*a) printf("YES\n");
    else printf("NO\n");
  }
  return 0;
}

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

#include <iostream>
#include <math.h>
using namespace std;
int main(){
	int a,b[3]={0};
	cin>>a;
	for (int A=0;A<a;A++){
		cin>>b[0]>>b[1]>>b[2];
		sort(b,b+3);
		b[0]=pow(b[0],2);
		b[1]=pow(b[1],2);
		b[2]=pow(b[2],2);
		if (b[2]==b[0]+b[1])cout<<"Yes"<<endl;
		else cout<<"NO"<<endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:17: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
    9 |                 sort(b,b+3);
      |                 ^~~~
      |                 sqrt
Language: C++

#include<iostream>
#include<stdio.h>
#include<algorithm>
#include<math.h>
using namespace std;
int main()
{
	int n,a,b,c,a1,b2,c2;
	cin>>n;
	for(int i=0;i<n;i++)
	{
		cin>>a>>b>>c;
		a1=pow(a,2);
		b2=pow(b,2);
		c2=pow(c,2);
		if(a1+b2==c2)
			cout<<"YES"<<endl;
		if(a1+c2==b2)
			cout<<"YES"<<endl;
		if(b2+c2==a2)
			cout<<"YES"<<endl;
		if(a1+b2!=c2&&a1+c2!=b2&&b2+c2!=a1)
			cout<<"NO"<<endl;
	}
				
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:27: error: 'a2' was not declared in this scope; did you mean 'c2'?
   20 |                 if(b2+c2==a2)
      |                           ^~
      |                           c2
Language: C++

#include<iostream>
using namespace std;
int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    int n,a,b,c;
    cin >> n
    while(n--){
        cin >> a >> b >> c;
        if(a<b) swap(a,b);
        if(a<c) swap(a,c);
        if((a*a)==(b*b+c*c))    cout << "YES\n";
        else cout << "NO\n";
    }
}
   

Compiler output:
a.cc: In function 'int main()':
a.cc:7:13: error: expected ';' before 'while'
    7 |     cin >> n
      |             ^
      |             ;
    8 |     while(n--){
      |     ~~~~~
Language: C++

#include <iostream>
#include <stdio.h>
#include <vector>
#include <algorithm>
#include <math.h>

int main() {
    int n;
    std::vector<int> V;
    
    scanf("%d", &n);
    for (int i = 0; i < n; i++) {
        int a, b, c; std::cin >> a >> b >> c;
        V.push_back(pow(a,2)); V.push_back(pow(b, 2)); V.push_back(pow(c, 2));
        std::sort(V.begin(), V.end());
        if (v[2] == v[1] + v[0]) printf("YES\n");
        else printf("NO\n");
    }
    
    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:16:13: error: 'v' was not declared in this scope
   16 |         if (v[2] == v[1] + v[0]) printf("YES\n");
      |             ^
Language: C++

#!/usr/bin/env ruby

n = gets.split[0].to_i
1.upto(n) do |i|
  line = gets
  a, b, c = line.split.map {&:to_i}.sort
  if a ** 2 + b ** 2 == c ** 2
    puts "YES"
  else
    puts "NO"
  end
end



Compiler output:
a.cc:1:2: error: invalid preprocessing directive #!
    1 | #!/usr/bin/env ruby
      |  ^
a.cc:3:1: error: 'n' does not name a type
    3 | n = gets.split[0].to_i
      | ^
a.cc:6:36: error: expected unqualified-id before '.' token
    6 |   a, b, c = line.split.map {&:to_i}.sort
      |                                    ^
Language: C++

#include <stdio.h>
#include <algorithm>
using namespace std;
int main(){
int i, n,j,cnt = 0;
scanf("%d",&n);tri[3];
for (i = 0; i < n; i++){
for (j = 0; j < 3; j++){
scanf("%d",tri[i]);
}
sort(tri,tri+3);
if (tri[0]*tri[0] + tri[1]*tri[1] = tri[2]*tri[2]) cnt++;
}
printf("%d\n",cnt);
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:16: error: 'tri' was not declared in this scope
    6 | scanf("%d",&n);tri[3];
      |                ^~~
Language: C++



#include <stdio.h> #include <algorithm> using namespace std; int main(){ int i, n,j,cnt = 0; scanf("%d",&n);int tri[3]; for (i = 0; i < n; i++){ for (j = 0; j < 3; j++){ scanf("%d",tri[i]); } sort(tri,tri+3); if (tri[0]*tri[0] + tri[1]*tri[1] = tri[2]*tri[2]) cnt++; } printf("%d\n",cnt); return 0; }



Compiler output:
a.cc:3:20: warning: extra tokens at end of #include directive
    3 | #include <stdio.h> #include <algorithm> using namespace std; int main(){ int i, n,j,cnt = 0; scanf("%d",&n);int tri[3]; for (i = 0; i < n; i++){ for (j = 0; j < 3; j++){ scanf("%d",tri[i]); } sort(tri,tri+3); if (tri[0]*tri[0] + tri[1]*tri[1] = tri[2]*tri[2]) cnt++; } printf("%d\n",cnt); return 0; }
      |                    ^
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

#include <stdio.h> #include <algorithm> using namespace std; int main(){ int i, n,j,cnt = 0; scanf("%d",&n);int tri[3]; for (i = 0; i < n; i++){ for (j = 0; j < 3; j++){ scanf("%d",&tri[i]); } sort(tri,tri+3); if (tri[0]*tri[0] + tri[1]*tri[1] = tri[2]*tri[2]) cnt++; } printf("%d\n",cnt); return 0; } 


Compiler output:
a.cc:1:20: warning: extra tokens at end of #include directive
    1 | #include <stdio.h> #include <algorithm> using namespace std; int main(){ int i, n,j,cnt = 0; scanf("%d",&n);int tri[3]; for (i = 0; i < n; i++){ for (j = 0; j < 3; j++){ scanf("%d",&tri[i]); } sort(tri,tri+3); if (tri[0]*tri[0] + tri[1]*tri[1] = tri[2]*tri[2]) cnt++; } printf("%d\n",cnt); return 0; }
      |                    ^
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

#include <stdio.h> 
#include <algorithm> 
using namespace std; 
int main(){
 int i, n,j,cnt = 0,tri[3]; 
 scanf("%d",&n);
 for (i = 0; i < n; i++){
  for (j = 0; j < 3; j++){
   scanf("%d",&tri[j]);
  }
  sort(tri,tri+3);
  if (tri[0]*tri[0] + tri[1]*tri[1] = tri[2]*tri[2]) cnt++;
 } printf("%d\n",cnt);
 return 0;
 }


Compiler output:
a.cc: In function 'int main()':
a.cc:12:21: error: lvalue required as left operand of assignment
   12 |   if (tri[0]*tri[0] + tri[1]*tri[1] = tri[2]*tri[2]) cnt++;
      |       ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
Language: C++

#include <iostream>

int N;
int x, y, z;

int main() {
    std::cin >> N;

    int a = 0, b = 0, c = 0;
    for(i = 0; i<N; ++i) {
        int a = std::min(x, std::min(y, z));
        int c = std::max(x, std::max(y, z));
        int b = (x + y + z) - (a + c);

        if(a*a + b*b == c*c) {
            std::cout << "YES" << std::endl;
        } else {
            std::cout << "NO" << std::endl;
        }
    }
}


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

#include<iostream>
#include<algorithm>

inline bool isTriangle(int edge[]){
    return edge[2]<edge[0]+edge[1]?true:false;
}

int main(void){
    int edge[3];
    int n;
    std::cin>>n;
    for(int i=0;i<n;i++){
        std::cin>>edge[0]>>edge[1]>>edge[2];
        std::sotr(edge,edge+3);
        std::cout<<(isTriangle(edge)?"YES":NO")<<std::endl;
    }
    return 0;
}


Compiler output:
a.cc:15:46: warning: missing terminating " character
   15 |         std::cout<<(isTriangle(edge)?"YES":NO")<<std::endl;
      |                                              ^
a.cc:15:46: error: missing terminating " character
   15 |         std::cout<<(isTriangle(edge)?"YES":NO")<<std::endl;
      |                                              ^~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:14:14: error: 'sotr' is not a member of 'std'; did you mean 'sort'?
   14 |         std::sotr(edge,edge+3);
      |              ^~~~
      |              sort
a.cc:15:44: error: 'NO' was not declared in this scope
   15 |         std::cout<<(isTriangle(edge)?"YES":NO")<<std::endl;
      |                                            ^~
a.cc:15:46: error: expected ')' before '}' token
   15 |         std::cout<<(isTriangle(edge)?"YES":NO")<<std::endl;
      |                    ~                         ^
      |                                              )
   16 |     }
      |     ~
Language: C++

#include<iostream>
#include<algorithm>

inline bool isTriangle(int edge[]){
    return edge[2]<edge[0]+edge[1]?true:false;
}

int main(void){
    int edge[3];
    int n;
    std::cin>>n;
    for(int i=0;i<n;i++){
        std::cin>>edge[0]>>edge[1]>>edge[2];
        std::sotr(edge,edge+3);
        std::cout<<(isTriangle(edge)?"YES":"NO")<<std::endl;
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:14: error: 'sotr' is not a member of 'std'; did you mean 'sort'?
   14 |         std::sotr(edge,edge+3);
      |              ^~~~
      |              sort
Language: C++

#include <iostream>
#include <vector>
#include <functional>
#include <cmath>
using namespace std;

int main() {

    int N;
    cin >> N;

    int a, b, c;

    for(int i = 0; i < N; i++) {
        cin >> a >> b >> c;

        vector<int> vec;

        vec.push_back(a);
        vec.push_back(b);
        vec.push_back(c);

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

        if(pow(vec[0], 2) == pow(vec[1], 2) + pow(vec[2], 2)) {
            cout << "YES" << endl;
        } else {
            cout << "NO" << endl;
        }
    }

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:23:9: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
   23 |         sort(vec.begin(), vec.end(), greater<int>());
      |         ^~~~
      |         sqrt
Language: C++

int main(void){
   int i,N,a,b,c;
   scanf("%d",&N);
   for(i=1;i<=N;i++){
       scanf("%d %d %d",&a,&b,&c);
   if ((a*a+b*b==c*c||a*a+c*c==b*b||b*b+c*c==a*a)
     && (a > 0 && b > 0 && c > 0)) {
       printf("YES\n");
   }
 else {
   printf("NO\n");
 }  
     }
   return 0;
}   


Compiler output:
a.cc: In function 'int main()':
a.cc:3:4: error: 'scanf' was not declared in this scope
    3 |    scanf("%d",&N);
      |    ^~~~~
a.cc:8:8: error: 'printf' was not declared in this scope
    8 |        printf("YES\n");
      |        ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main(void){
a.cc:11:4: error: 'printf' was not declared in this scope
   11 |    printf("NO\n");
      |    ^~~~~~
a.cc:11:4: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C++

int main(void){
   int i,N,a,b,c;
   scanf("%d",&N);
   for(i=1;i<=N;i++){
       scanf("%d %d %d",&a,&b,&c);
   if ((a*a+b*b==c*c||a*a+c*c==b*b||b*b+c*c==a*a)
     && (a > 0 && b > 0 && c > 0)) {
       printf("YES\n");
   }
 else {
   printf("NO\n");
 }  
     }
   return 0;   
}



Compiler output:
a.cc: In function 'int main()':
a.cc:3:4: error: 'scanf' was not declared in this scope
    3 |    scanf("%d",&N);
      |    ^~~~~
a.cc:8:8: error: 'printf' was not declared in this scope
    8 |        printf("YES\n");
      |        ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main(void){
a.cc:11:4: error: 'printf' was not declared in this scope
   11 |    printf("NO\n");
      |    ^~~~~~
a.cc:11:4: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C++

def main():
    n = int(input())
    for i in range(n):
        a, b, c=(int(x) for x in input().split())
        if a+b<=c or a+c<=b or b+c<=a:
            print("NO")
        else:
            print("YES")

main()


Compiler output:
a.cc:1:1: error: 'def' does not name a type
    1 | def main():
      | ^~~
Language: C++

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

int main(){
  int N;
  int a,b,c;
  int n=0;
    
    while(1){

  cin >> N;
    
    if(N <= 0 || N > 1000)
        
    else
        break;
    }
    
    string x[N];

while(N > 0 && cin >> a >> b >> c){
    
    
    while(1){
        if(a < 1 || a > 1000 || b < 1 || b > 1000 || c < 1 || c > 1000){
            
            break;
        }
        
        else{
    if(a+b>c && b+c>a && c+a>b){
        x[n]="YES";
    }
    else{
        x[n]="NO";
    }
            N--;
            n++;
            break;
        }
  }
}
    for(int i = 0;i < n;i++)
        cout << x[i] << endl;
    
  return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:16:5: error: expected primary-expression before 'else'
   16 |     else
      |     ^~~~
Language: C++

#include <cstdin>
#include <iostream>
#include <vector>
#include <string>
#include <sstream>

using namespace std;


vector<string> splitString(const string& str, const string& separator = " ") {
	vector<string> ret;

	std::size_t bp, ep;
	bp = ep = 0;
	while((ep = str.find_first_of(separator, bp)) != string::npos){
		if(bp != ep){
			ret.push_back(string(str.begin() + bp, str.begin() + ep));
		}
		bp = ep + 1;
	}

	if(bp <= str.size() - 1){
		ret.push_back(string(str.begin() + bp, str.end()));
	}

	return ret;
}

template <class T>
T convertStringToNumber(const string& str) {
	stringstream ss;
	T ret;

	ss << str;
	ss >> ret;

	return ret;
}


void inputData(vector<string>& data_set) {
	string buffer;

	getline(cin, buffer);
	int n = convertStringToNumber<int>(buffer);

	for(int i = 0; i < n; ++i) {
		getline(cin, buffer);
		data_set.push_back(buffer);
	}
}

bool isRightTriangle(const vector<int>& edge_set) {
	int max_index = 0;

	if(edge_set[max_index] < edge_set[(max_index+1)%3])
		max_index = (max_index+1)%3; 
	if(edge_set[max_index] < edge_set[(max_index+2)%3])
		max_index = (max_index+2)%3; 

	return ((edge_set[max_index] * edge_set[max_index]) ==
				(edge_set[(max_index+1)%3] * edge_set[(max_index+1)%3]
				+ edge_set[(max_index+2)%3] * edge_set[(max_index+2)%3]));
}


vector<bool> evaluateTriangle(const vector<string>& data_str) {
	vector<bool> ret(data_str.size());

	for(int i = 0; i < data_str.size(); ++i) {
		auto temp = splitString(data_str[i]);
		vector<int> buff { convertStringToNumber<int>(temp[0]),
							convertStringToNumber<int>(temp[1]),
							convertStringToNumber<int>(temp[2])};

		ret[i] = isRightTriangle(buff);
	}

	return ret;
}


void doAllProcess() {
	vector<string> buffer;

	inputData(buffer);

	vector<bool> ret = evaluateTriangle(buffer);

	for(int i = 0; i < ret.size(); ++i)
		std::cout << (ret[i] ? "YES" : "NO") << std::endl;
}



int main() {
	doAllProcess();

	return 0;
}


Compiler output:
a.cc:1:10: fatal error: cstdin: No such file or directory
    1 | #include <cstdin>
      |          ^~~~~~~~
compilation terminated.