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>
#include<climits>
#include<cmath>
#include<cstdio>
#include<cstdlib>
#include<ctime>
#include<string>
#include<cstring>
#include<vector>
#include<stack>
#include<queue>
#include<set>
#include<bitset>

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> i_i;

#define PI 3.141592653589793238462643383279
#define mod 1000000007LL
#define rep(i, n) for(i = 0;i < n;++i)
#define rep1(i, n) for(i = 1;i < n;++i)
#define per(i, n) for(i = n - 1;i > -1;--i)
#define int(x) int x; scanf("%d",&x)
#define int2(x, y) int x, y; scanf("%d%d",&x, &y)
#define int3(x, y, z) int x, y, z; scanf("%d%d%d",&x, &y, &z)
#define int4(v, x, y, z) int v, x, y, z; scanf("%d%d%d%d", &v, &x, &y, &z)
#define int5(v, w, x, y, z) int v, w, x, y, z; scanf("%d%d%d%d%d", &v, &w, &x, &y, &z)
#define ll2(x, y) ll x, y; cin >> x >> y;
#define scn(n, a) rep(i, n)cin >> a[i]
#define sc2n(n, a, b) rep(i, n)cin >> a[i] >> b[i]
#define pri(x) cout << (x) << "\n"
#define pri2(x, y) cout << (x) << " " << (y) << "\n"
#define pri3(x, y, z) cout << (x) << " " << (y) << " " << (z) << "\n"
#define pb push_back
#define mp make_pair
#define all(a) (a).begin(),(a).end()
#define endl "\n"
#define kabe puts("---------------------------")
#define kara puts("")
#define debug(x) cout << " --- " << (x) << "\n"
#define debug2(x, y) cout << " --- " << (x) << " " << (y) << "\n"
#define debug3(x, y, z) cout << " --- " << (x) << " " << (y) << " " << (z) << "\n"
#define X first
#define Y second
#define eps 0.0001
#define prid(x) printf("%.15lf\n", x)

int a[3];
int res[4] = {0};

signed main(void){
  int i, j;
  for(int testcase = 0;testcase >= 0;testcase++){
    scanf("%d%d%d", &a[0], &a[1], &a[2]);
    sort(a, a + 3);
    ++res[0];
    if(a[0] <= 0 || a[1] <= 0 || a[2] <= 0 || a[2] >= a[1] + a[0])break;
    else if(a[2] * a[2] == a[0] * a[0] + a[1] * a[1])++res[1];
    else if(a[2] * a[2] > a[0] * a[0] + a[1] * a[1])++res[3];
    else ++res[2];


//*/

//*/ break;
  }
  printf("%d %d %d %d\n", res[0] - 1, res[1], res[2], res[3]);
  return 0;
}

C++: #include <algorithm>
#include <cstdio>
#include <iostream>
#include <map>
#include <cmath>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#include <stdlib.h>
#include <stdio.h>
#include <bitset>
#include <cstring>
#include <deque>
#include <iomanip>
#include <limits>
using namespace std;
#define FOR(I,A,B) for(int I = (A); I < (B); ++I)
#define CLR(mat) memset(mat, 0, sizeof(mat))
typedef long long ll;
int main()
{
  ios::sync_with_stdio(false);
  cin.tie(0);
  int a[3];
  int ans[4]; // 個数直角鋭角鈍角
  CLR(ans);
  while(cin>>a[0]>>a[1]>>a[2]) {
    sort(a,a+3);
    if(a[2] >= a[1] + a[0]) break;
    ans[0]++;
    if(a[2]*a[2]==a[1]*a[1]+a[0]*a[0]) ans[1]++;
    if(a[2]*a[2]<a[1]*a[1]+a[0]*a[0]) ans[2]++;
    if(a[2]*a[2]>a[1]*a[1]+a[0]*a[0]) ans[3]++;
  }
  FOR(i,0,4) {
    if(i) cout << " ";
    cout << ans[i];
  }
  cout << endl;
  return 0;
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int t[3],x,y;
int a=0,b=0,c=0;
int main(){
  while(1){
    cin>>t[0]>>t[1]>>t[2];
    sort(t,t+3);
    x=t[0]*t[0]+t[1]*t[1];
    y=t[2]*t[2];
    if(t[0]+t[1]<=t[2]){
      break;
    }else if(x==y){
      a++;
    }else if(x>y){
      b++;
    }else if(x<y){
      c++;
    }
  }
  cout<<a+b+c<<' '<<a<<' '<<b<<' '<<c<<endl;
  return 0;
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main(){
  int a[3];
  int s=0,e=0,d=0,t=0;
  while(cin>>a[0]>>a[1]>>a[2]){
    sort(a,a+3);
    if(a[0]+a[1]>a[2]){
      s++;
      if(a[0]*a[0]+a[1]*a[1]<a[2]*a[2]) d++;
      else if(a[0]*a[0]+a[1]*a[1]==a[2]*a[2]) t++;
      else if(a[0]*a[0]+a[1]*a[1]>a[2]*a[2]) e++;
    }
  }
  cout << s << ' ' << t << ' ' << e << ' ' << d << endl;
  return 0;
}

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

using namespace std;

int sankaku,eikaku,tyokkaku,donkaku;
int hen[3];
bool musi;

int main(void){

  sankaku = eikaku = tyokkaku = donkaku = 0;
  musi = false;

  while( cin >> hen[0] >> hen[1] >> hen[2] ){

    if( !musi ){

      sort( hen , hen + 3 );

      if( hen[2] >= hen[0] +  hen[1] ){
	musi = true;
	continue;
      }
      sankaku++;

      for( int i = 0 ; i < 3 ; i++ )
	hen[i] = pow( (double)hen[i] , 2 );

      if( hen[2] == hen[0] + hen[1] ) tyokkaku++;
      if( hen[2] < hen[0] + hen[1] ) eikaku++;
      if( hen[2] > hen[0] + hen[1] ) donkaku++;
      
      
    }
  }
  cout << sankaku << " " << tyokkaku << " " << eikaku << " " << donkaku << endl;
  return 0;
}

C++: #include <bits/stdc++.h>
typedef long long LL;
using namespace std;

int main(){
  vector<int> a(3);
  int cnt[4] = {0, 0, 0, 0};
  while (cin >> a[0] >> a[1] >> [2]) {
    if (a[0] + a[1] > a[2] && a[0] + a[2] > a[1] && a[1] + a[2] > a[0]) {
      cnt[0] ++;
      sort(a.begin(), a.end());
      if (a[0] * a[0] + a[1] * a[1] > a[2] * a[2])  cnt[1] ++;
      if (a[0] * a[0] + a[1] * a[1] == a[2] * a[2]) cnt[2] ++;
      if (a[0] * a[0] + a[1] * a[1] < a[2] * a[2])  cnt[3] ++;
    }
  }

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

C++: #include<cstdio>
int main(void){
    
    int a=0,b=0,c=0;
    int change=0;
    int right=0,obtuse=0,acute=0;
    int value=0,check=0,count=0;
    int flag=true;
    while(flag){
        count++;
        scanf("%d%d%d",&a,&b,&c);
        if(c<a){
            change=a;
            a=c;
            c=a;
        }
        if(c<b){
            change=b;
            b=c;
            c=b;
        }
        check=a+b-c;
        value=a*a+(b*b-c*c);
        if(check<=0){
            break;
        }
        if(value==0){
            right++;
        }
        else if(value<0){
            obtuse++;
        }
        else{
            acute++;
        }
    }
    printf("%d %d %d %d",count,right,acute,obtuse);
    return 0;
}