Go: package main
// 三角形の形は辺の長さで決まる． 順番に３つの正整数が与えられたとき， 辺の長さがそれらの値と一致する三角形が存在するかどうかを調べ,
//  存在するなら鋭角三角形，直角三角形，鈍角三角形のいずれかを判定し， 次の入力へ進む． 三角形が存在しないとき， それまでに入力された，
// 三角形，直角三角形，鋭角三角形，鈍角三角形の 個数を空白で区切って出力し， それ以降の入力は無視して終了する
// 入力の中には必ず三角形が存在しないようなものがある と仮定してよい. 入力の行数は判らないが各行には３つの正整数が空白で区切って書かれている．
//  ただし，各整数は100 以下とする.

// return
// 三角形 直角三角形　鈍角三角形 鈍角三角形
import (
	"os"
	"fmt"
	"bufio"
)


var sc = bufio.NewScanner(os.Stdin)

func max(a, b, c int) (int, int, int) {
	if a > b {
		if b > c {
			return a, b, c
		} else {
			return c, a, b
		}
	} else {
		if b > c {
			return b, a, c
		} else {
			return c, b, a
		}
	}
}

func find_trianges(a, b, c int) string {
	a, b, c = max(a, b, c)
	r := b*b + c*c
	if a*a > r {
		return "obtuse_triangle"
	} else if a*a < r {
		return "sharped_triangle"
	} else {
		return "right_triangle"
	}
}

func main() {
	s := bufio.NewScanner(os.Stdin)
	var t, r_t, s_t, o_t int = 0, 0, 0, 0
	for s.Scan() {
		var a, b, c int
		fmt.Sscan(s.Text(), &a, &b, &c)
			a, b, c = max(a, b, c)
			if (a < b + c) {
				r := find_trianges(a, b, c)
				switch r {
				case "right_triangle":
					r_t++
				case "sharped_triangle":
					s_t++
				case "obtuse_triangle":
					o_t++
				}
				t++
			}	else {
				break
			}
			
	}
	fmt.Println(t, r_t, s_t, o_t)
}

C++: #include<iostream>
using namespace std;

int out[4] = {0};

int main() {
int l[3];
while( cin >> l[0] >> l[1] >> l[2] ) {
sort(l, l+3);
if ( l[2] > l[0] + l[1] )
break;

out[0]++;
if ( l[2] * l[2] == l[0] * l[0] + l[1] * l[1] )
out[1]++;
if ( l[2] * l[2] < l[0] * l[0] + l[1] * l[1] )
out[2]++;
if ( l[2] * l[2] > l[0] * l[0] + l[1] * l[1] )
out[3]++;
}

cout << out[0] << " " << out[1] << " " << out[2] << " " << out[3] << endl;
return 0;
}

C++: #include <iostream>
using namespace std;

int main() {
	
	int e = 0, t = 0, d = 0, all = 0;
	
	while (1) {
		int i, j, k;
		cin >> i >> j >> k;
		if (i < j && k < j) {
			int temp = i;
			i = j;
			j = temp;
		}
		else if (i <k && j < k) {
			int temp = i;
			i = k;
			k = temp;
		}
		
		if (j + k <= i) break;
		int ii = i * i, jj = j * j, kk = k*k;
		if (ii == jj + kk) t++;
		else if (ii < jj + kk) e++;
		else d++;
		all++;
	}
	
	cout << all << " " << t << " " << e << " " << d << "\n";
	
	return 0;
}

C++: #include <algorithm>
#include <iostream>
using namespace std;

int main()
{
  int a[3];
  int n, x, y, z;

  x = y = z = n = 0;
  while (cin >> a[0] >> a[1] >> a[2]){
    sort(a, a + 3);
    int s = a[0];
    int d = a[1];
    int f = a[2];

    if (s + d <= f){
      cout << n << " " << x << " "<< y << " "<< z << endl;
      return 0;
    }
    n++;

    if (s * s + d * d == f * f){
      x++;
    }
    if (s * s + d * d > f * f){
      y++;
    }
    if (s * s + d * d < f * f){
      z++;
    }
  }

  cout << n << " " << x << " " << y << " " << z << endl;

  return 0;
}

C++: #include<iostream>
#include<string>
#include<vector>
#include<utility>
#include<queue>
#include<algorithm>
#include<cmath>
#include<cstdio>
#include<cstring>
#include<cstdlib>
#include<map>
#include<complex>
#define INF 2147483647
#define llINF 9223372036854775807
#define pb push_back
#define mp make_pair 
#define F first
#define S second
#define ll long long

using namespace std;
int main(){
  vector<int>ve(3);
  bool flag=false;
  int ans[4]={};
  while(cin>>ve[0]>>ve[1]>>ve[2]){
    if(flag)continue;
    sort(ve.begin(),ve.end(),greater<int>());
    if(ve[0]>=ve[1]+ve[2]){
      flag=true;
      continue;
    }
    if((ve[0]*ve[0])==(ve[1]*ve[1]+ve[2]*ve[2])){
      ans[0]++;
      ans[1]++;
    }else if(ve[0]*ve[0]<ve[1]*ve[1]+ve[2]*ve[2]){
      ans[0]++;
      ans[2]++;
    }else{
      ans[0]++;
      ans[3]++;
    }
    //cout<<ans[0]<<" "<<ans[1]<<" "<<ans[2]<<" "<<ans[3]<<endl;
  }
  cout<<ans[0]<<" "<<ans[1]<<" "<<ans[2]<<" "<<ans[3]<<endl;
  return 0;
}

C++: #include <stdio.h>
#include <algorithm>
using namespace std;

int main(){
    int inp[3], tyoku = 0, don = 0, ei = 0;
    for (int i = 0; i < 5; i++){
        scanf("%d %d %d",&inp[0], &inp[1], &inp[2]);
        sort(inp, inp + 3);
        
        if(inp[0] + inp[1] > inp[2]){
            int p = inp[0]*inp[0] + inp[1]*inp[1];
            int q = inp[2]*inp[2];
            if(p == q) tyoku++;
            else if(p < q) don++;
            else ei++;
        }
    }
    
    printf("%d %d %d %d¥n", tyoku +don +ei, tyoku,ei,don);
    return 0;
}

C++: #include<iostream>
#include<algorithm>
#include<cmath>
#include<cstdio>

using namespace std;

int main()
{
  int n[3]; 
  int a = 0, b = 0, c = 0;
  while(true)
  {
    cin >> n[0] >> n[1] >> n[2];
    sort(n, n + 3);
    if(n[0] + n[1] <= n[2])
    {
      printf("%d %d %d %d\n", a + b + c, a, b, c);
      return 0;
    }
    double d = pow(n[0], 2) + pow(n[1], 2), v = pow(n[2], 2);
    
    if(d == v)
      a++;
    else if(d > v)
      b++;
    else if(d < v)
      c++;
  }
}

C++: #include <bits/stdc++.h>
using namespace std;
int main()
{
	vector<int> vec(4, 0);
	int b, a, c;
	while(cin >> a >> b >> c)
	{
		vector<int> v;
		v.push_back(a);
		v.push_back(b);
		v.push_back(c);
		sort(v.begin(), v.end());
		int a1 = v[2] * v[2];
		int b1 = v[1] * v[1];
		int c1 = v[0] * v[0];
		if(!(abs(b - c) < a && a < b + c))
		{
			for(int i = 0; i < 4; i++)
			{
				if(i == 3)
					cout << vec[i] << endl;
				else
					cout << vec[i] << " ";
			}
			return 0;
		}
		vec[0]++;
		if(a1 == b1 + c1)
			vec[1]++;
		else if(a1 < b1 + c1)
			vec[2]++;
		else
			vec[3]++;
	}
}

C++: #include <bits/stdc++.h>
#define PB push_back
#define MP make_pair
#define REP(i,n) for (int i=0;i<(n);i++)
#define ALL(a) (a).begin(),(a).end()
#define MOD 10000
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> P;
const ull B=100000007;
const int INF=1e9;
int main(){
      int a[3],cnt[4];
      memset(cnt,0,sizeof(cnt));
      while(cin>>a[0]>>a[1]>>a[2]){
            sort(a,a+3);
            if(a[0]+a[1]<=a[2]){
                  REP(i,4)printf("%d%c",cnt[i],i==3?'\n':' ');
                  break;
            }
            cnt[0]++;
            if(a[0]*a[0]+a[1]*a[1]==a[2]*a[2])cnt[1]++;
            else if(a[0]*a[0]+a[1]*a[1]>a[2]*a[2])cnt[2]++;
            else cnt[3]++;
      }
}

C++: #include <iostream>
using namespace  std;

bool exist(int a,int b,int c){
    bool flag=false;
    if(a>0&&b>0&&c>0&&a+b>c&&a+c>b&&c+b>a)flag=true;
    return flag;
}
int type_check(int a,int b,int c){
    if(a*a+b*b==c*c)return 0;
    else if(c*c<b*b+a*a)return 1;
    else if(c*c>a*a+b*b)return 2;
    else return 3;
}

int main(){
    //1:直角 2:鋭角 3: 鈍角 4:三角形
    int c1=0,c2=0,c3=0,c4=0;
    int t_side[3];
    while(true){
        cin >> t_side[0]>>t_side[1]>>t_side[2];
        sort(t_side, t_side + 3, greater<int>());
        if(!exist(t_side[0],t_side[1],t_side[2]))break;
        switch(type_check(t_side[0],t_side[1],t_side[2])){
            case 0: c1++; break;
            case 1: c2++; break;
            case 2: c3++; break;
        }
        c4++;
    }
    cout <<c4<<" "<<c1<<" "<<c2<<" "<<c3<<endl;
    return 0;
}

C++: #include<iostream>
#include<algorithm>
using namespace std;

int process(int *data){
  int x,y;
  sort(data,data+3);
  x = (data[0]*data[0])+(data[1]*data[1]);
  y = (data[2]*data[2]);
  if(data[0]+data[1] <= data[2]){
    return -1;
  }else if(x == y){
    return 1;
  }else if(x > y){
    return 2;
  }else{
    return 3;
  }
}

int main(){
  int tyokkaku,eikaku,donkaku;
  int data[3];
  tyokkaku = eikaku = donkaku = 0;
  cin >> data[0] >> data[1] >> data[2];
  while(process(data) != -1){
    if(process(data) == 1){
      tyokkaku++;
    }else if(process(data) == 2){
      eikaku++;
    }else{
      donkaku++;
    }
    cin >> data[0] >> data[1] >> data[2];
  }

  cout << tyokkaku+eikaku+donkaku << ' '<< tyokkaku << ' '<< eikaku << ' ' << donkaku << endl;

  return 0;

}