Go: package main

import (
	"fmt"
	"sort"
)

// TriangleKind kind of triangle
type TriangleKind int

const (
	// Nothing not triangle
	Nothing TriangleKind = iota
	// RightTriangle the right triangle
	RightTriangle
	// SharpTriangle the sharp triangle
	SharpTriangle
	// ObtuseTriangle the obtuse triangle
	ObtuseTriangle
) // const for Triangle kind

type result struct {
	rTriangle int
	sTriangle int
	oTriangle int
}

func (res *result) String() string {
	return fmt.Sprintf("%d %d %d %d", res.rTriangle+res.sTriangle+res.oTriangle, res.rTriangle, res.sTriangle, res.oTriangle)
}

func checkTriangleType(a int, b int, c int) TriangleKind {
	p := []int{a, b, c}
	sort.Sort(sort.IntSlice(p))
	if !(p[0]+p[1] > p[2] && p[1]+p[2] > p[0] && p[2]+p[0] > p[1]) {
		return Nothing
	}

	c = (p[0] * p[0]) + (p[1] * p[1]) - (p[2] * p[2])
	if c == 0 {
		return RightTriangle
	}
	if c > 0 {
		return SharpTriangle
	}
	return ObtuseTriangle
}

func main() {
	var res = new(result)
	var a, b, c int
	var hasNext = true
	for hasNext {
		fmt.Scanf("%d %d %d", &a, &b, &c)
		switch checkTriangleType(a, b, c) {
		case Nothing:
			hasNext = false
		case RightTriangle:
			res.rTriangle++
		case SharpTriangle:
			res.sTriangle++
		case ObtuseTriangle:
			res.oTriangle++
		}
	}
	fmt.Println(res.String())
}

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;

}