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>
#include <algorithm>
using namespace std;

const double EPS = 1e-8;

int main(){
  int v[3],ans[3],ansn=0;
  bool f = false;
  fill(ans,ans+3,0);
  while(cin >> v[0] >> v[1] >> v[2]){
    if(f) continue;
    sort(v,v+3);
    if(v[2] >= v[1] + v[0]){
      cout << ansn;
      for(int i=0;i<3;i++) cout << ' ' << ans[i];
      cout << endl;
      f = true;
    } else {
      double w[3];
      for(int i=0;i<3;i++) w[i] = (double)v[i];
      double a = (w[0]*w[0] + w[1]*w[1] - w[2]*w[2]) / (2 * w[0] * w[1]);

      ansn++;
      if(a > EPS) ans[1]++;
      else if(a < -EPS) ans[2]++;
      else ans[0]++;
    }
  }
}

C++: #include<iostream>
using namespace std;
int main(){

	int i,k,j,a=0,b=0,c=0,d=0;
while(1){
	cin>>i>>k>>j;
	if(i>j){swap(i,j);}
	if(k>j){swap(k,j);}

	if(i+k>j&&k+j>i&&i+j>k){a=a+1;}
	else{break;}

	if(i*i+k*k>j*j){b=b+1;}
	if(i*i+k*k<j*j){c=c+1;}
	if(i*i+k*k==j*j){d=d+1;}

}
    cout<<a<<" "<<d<<" "<<b<<" "<<c<<endl;

	return 0;
}

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

int a[3], c[3];

int main(){
	while(scanf("%d%d%d",&a[0],&a[1],&a[2])){
		sort(a,a+3,greater<int>());
		if(a[0] >= a[1]+a[2]) break;
		if(a[0]*a[0] == a[1]*a[1]+a[2]*a[2]) c[0]++;
		else if(a[0]*a[0] < a[1]*a[1]+a[2]*a[2]) c[1]++;
		else c[2]++;
	}
	printf("%d %d %d %d\n", c[0]+c[1]+c[2],c[0],c[1],c[2]);
}

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


bool sankaku(int a, int b, int c) {
    int max_ = a;
    if (max_ < b) {
        max_ = b;
    }
    if (max_ < c) {
        max_ = c;
    }
    if (a + b + c - max_ > max_) {
        return true;
    }
    else {
        return false;
    }
}


int nani_sankaku(int a, int b, int c) {
    int hen[3] = {a, b, c};
    sort(hen, hen + 3);
    double ab = sqrt(pow(a, 2) + pow(b, 2));
    double c_ = pow(c, 2);
    if (ab > c) {
        return 0;
    }
    if (ab == c) {
        return 1;
    }
    if (ab < c) {
        return 2;
    }

}


int main() {
    int ANS[3] = {0, 0, 0};
    while (true) {
        int a;
        int b;
        int c;
        cin >> a >> b >> c;

        if (sankaku(a, b, c)) {
            ANS[nani_sankaku(a, b, c)]++;
        }
        else {
            cout << ANS[0] << ' ' << ANS[1] << ' ' << ANS[2] << '\n';
            return 0;
        }
    }
}

C++: #define _USE_MATH_DEFINES
#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
using namespace std;

int main() {
	int a, b, c;
	int tri = 0;
	int acte = 0;
	int right = 0;
	int obtuse = 0;
	vector<int> t(3);
	while (cin >> a >> b >> c) {
		t[0] = a;
		t[1] = b;
		t[2] = c;
		sort(t.begin(), t.end());
		a = pow(t[0], 2);
		b = pow(t[1], 2);
		c = pow(t[2], 2);
		if (t[0] + t[1] > t[2]) {
			tri++;
			if (a + b == c) {
				right++;
			}
			else if (a + b > c){
				acte++;
			}
			else if (a + b < c) {
				obtuse++;
			}
		}
	}
	cout << tri << " " << right << " " << acte << " " << obtuse << endl;
	return 0;
}

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

using namespace std;

/*
三角形：最大の辺 < その他の辺の和
鋭角三角形：最大の辺の二乗 < 最小の辺の二乗＋中間の辺の二乗
直角三角形：最大の辺の二乗 = 最小の辺の二乗＋中間の辺の二乗
鈍角三角形：最大の辺の二乗 > 最小の辺の二乗＋中間の辺の二乗
*/

int main() {
	int a[3];
	int Triangle = 0;
	int eikaku = 0;
	int chokkaku = 0;
	int donkaku = 0;

	while (true) {
		cin >> a[0] >> a[1] >> a[2];
		sort(begin(a), end(a));
		// 三角判定
		if (a[2] < a[1] + a[0]) {
			Triangle++;
			const int a0_sq = a[0] * a[0];
			const int a1_sq = a[1] * a[1];
			const int a2_sq = a[2] * a[2];
			//鋭角判定
			if (a2_sq < a1_sq + a0_sq) {
				eikaku++;
			}
			//直角判定
			else if(a2_sq == a1_sq + a0_sq) {
				chokkaku++;
			}
			else {
				donkaku++;
			}
		}
		else {
			break;
		}
	}

	cout << Triangle << ' ' << chokkaku << ' ' << eikaku << ' ' << donkaku << endl;

	return 0;
}

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

const double EPS = 1e-8;

int main(){
  int v[3],ans[3],ansn=0;
  bool f = false;
  fill(ans,ans+3,0);
  while(cin >> v[0] >> v[1] >> v[2]){
    if(f) continue;
    sort(v,v+3);
    if(v[2] >= v[1] + v[0]){
      cout << ansn;
      for(int i=0;i<3;i++) cout <<  ans[i];
      cout << endl;
      f = true;
    } else {
      double w[3];
      for(int i=0;i<3;i++) w[i] = (double)v[i];
      double a = (w[0]*w[0] + w[1]*w[1] - w[2]*w[2]) / (2 * w[0] * w[1]);

      ansn++;
      if(a > EPS) ans[1]++;
      else if(a < -EPS) ans[2]++;
      else ans[0]++;
    }
  }
}