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;

int san = 0;
int a[3];
int inu = 0;
int saru = 0;
int kiji = 0;

int main(){
	while (true){
		for (int i = 0; i < 3; i++){
			cin >> a[i];
		}
		sort(a, a + 3);
		if (a[2] * a[2] < a[1] * a[1] + a[0] * a[0] && a[2] < a[0] + a[1]){
			san = san + 1;
			saru = saru + 1;
		}if (a[2] * a[2] == a[1] * a[1] + a[0] * a[0] && a[2] < a[0] + a[1]){
			san = san + 1;
			inu = inu + 1;
		}if (a[2] * a[2] > a[1] * a[1] + a[0] * a[0] && a[2] < a[0] + a[1]){
			san = san + 1;
			kiji = kiji + 1;
		}if (a[2] >= a[0] + a[1]){
			break;
		}
	}
	cout << san << " " << inu << " " << saru << " " << kiji << endl;
}

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

#define RIGHT 1
#define ACUTE 2
#define OBTUSE 3

using namespace std;

void sort(int *a, int *b, int *c) {
	int lines[3] = { *a, *b, *c };

	bool changed = true;

	while(changed) {
		changed = false;

		for(int i = 0;i < 2;i++) {
			if(lines[i] > lines[i + 1]) {
				int tmp;

				tmp = lines[i];
				lines[i] = lines[i + 1];
				lines[i + 1] = tmp;

				changed = true;
			}
		}
	}

	*a = lines[0];
	*b = lines[1];
	*c = lines[2];
}

int main() {
	int a, b, c;
	int triangles[4] = { 0 };
	int result = 0;

	while(cin >> a >> b >> c) {
		sort(&a, &b, &c);
		
		if(c < (a + b)) {
			triangles[0]++;

			int pow_ab = pow(a, 2) + pow(b, 2);
			int pow_c = pow(c, 2);

			if(pow_c == pow_ab) {
				result = RIGHT;
			} else if(pow_c < pow_ab) {
				result = ACUTE;
			} else if(pow_c > pow_ab) {
				result = OBTUSE;
			}

			triangles[result]++;
		} else {
			continue;
		}
	}

	for(int i = 0;i < 4;i++) {
		cout << triangles[i];

		if(i < 3) {
			cout << " ";
		}
	}

	cout << endl;

	return 0;
}

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

using namespace std;

int main() {
	
	int Length[3];
	int Triangle[4] = {0};
	bool flag = 0;
	
	while( cin >> Length[0] >> Length[1] >> Length[2]) {
	
	sort(Length, Length+3);
	
	if( Length[0] + Length[1] <= Length[2] ) flag = 1;
	if(flag == 1) continue;
	
	if( Length[0] * Length[0] + Length[1] * Length[1] 
	== Length[2] * Length[2] )
	Triangle[1]++;
	
	else if(Length[0] * Length[0] + Length[1] * Length[1] 
	> Length[2] * Length[2] )
	Triangle[2]++;
	
	else
	Triangle[3]++;
	
	Triangle[0]++;
	}

	cout << Triangle[0] << " " << Triangle[1] << " "
		 << Triangle[2] << " " << Triangle[3] << "\n";
	return 0;
}

C++: #include <iostream>
#include <math.h>
#include <string>
#include <stdio.h>
#include <string.h>
#include <algorithm>

using namespace std;

int main(void)
{
    int a[100], b[100], c[100],A,B,C,D,P,PP,s1,s2,s3;
    A = 0;
    B = 0;
    C = 0;
    D = 0;
    P = 0; 
    PP = 0;
    s1 = 0;
    s2 = 0;
    s3 = 0; 

    for (int i = 0; i < 100; i++)
    {
        cin >> a[i];
        s1 = a[i];
        cin >> b[i];
        if (b[i] >= s1)
        {
            s1 = 0;
            s1 = b[i];
            s2 = 0;
            s2 = a[i];
        }
        else
        {
            s2 = b[i];
        }
        cin >> c[i];
        if (c[i] >= s1)
        {
            s3 = 0;
            s3 = s2;
            s2 = 0;
            s2 = s1;
            s1 = 0;
            s1 = c[i];
           
        }
        else if (c[i] >= s2)
        {
            s3 = 0;
            s3 = s2;
            s2 = 0;
            s2 = c[i];
        }
        else
        {
            s3 = c[i];
        }

        P = (s2 * s2) + (s3 * s3);
        PP = s1 * s1;

        if (a[i] + b[i] > c[i] && b[i] + c[i] > a[i])
        {
            if (c[i] + a[i] > b[i])
            {
                A += 1;
                if (P == PP)
                {
                    B += 1;

                }
                else if (P > PP)
                {
                    C += 1;
                }
                else if (P < PP)
                {
                    D += 1;
                }

            }
            else
            {
                cout << A << " " << B << " " << C << " " << D << endl;
                break;
            }
        }
        else
        {
            cout << A << " " << B << " " << C << " " << D << endl;
            break;
        }
    }

}

C++: #include <iostream>
#include <string>
#include <sstream>
#include <algorithm>
#include <cmath>

using namespace std;

int main(int argc, char const* argv[])
{
	string str;
	int ei = 0;
	int ty = 0;
	int don = 0;
	while(getline(cin, str)){
			istringstream iss(str);
			int x, y, z;
			iss >> x >> y >> z;
			int maxi = max(x, max(y, z));
			if(maxi == x){
					if(x < y + z){
							if(y * y + z * z - x * x > 0){
									ei++;
							}else if(y * y + z * z - x * x < 0){
									don++;
							}else{
									ty++;
							}
					}else{
							break;
					}
			}else if(maxi == y){
					if(y < x + z){
							if(x * x + z * z - y * y > 0){
									ei++;
							}else if(x * x + z * z - y * y < 0){
									don++;
							}else{
									ty++;
							}
					}else{
							break;
					}
			}else{
					if(z < x + y){
							if(x * x + y * y - z * z > 0){
									ei++;
							}else if(x * x + y * y - z * z < 0){
									don++;
							}else{
									ty++;
							}
					}else{
							break;
					}
			}
	}
	cout << ei + ty + don << " " << ty << " " << ei << " " << don << endl;
	return 0;
}