Go: package main

import (
	"fmt"
	"bufio"
	"os"
	"strconv"
	"strings"
	"sort"
)

var sc = bufio.NewScanner(os.Stdin)

func nextLine() string {
	sc.Scan()
	return sc.Text()
}

func nextLineInt() []int {
	arr := strings.Split(nextLine(), " ")
	var ret []int
	for _, v := range arr {
		x, _ := strconv.Atoi(v)
		ret = append(ret, x)
	}
	return ret
}

type Pair struct {
	First int
	Second int
}

type Pairs []Pair

func (s Pairs) Len() int {
	return len(s)
}

func (s Pairs) Swap(i, j int) {
	s[i], s[j] = s[j], s[i]
}

func (s Pairs) Less(i, j int) bool {
	return s[i].First > s[j].First
}

func main() {
	var n int
	arr := nextLineInt()
	n = arr[0]
	result := []Pair{}
	for i := 0; i < n; i++ {
		result = append(result, Pair{0, i})
	}
	for i := 0; i < n * (n - 1) / 2; i++ {
		arr := nextLineInt()
		A := arr[0]
		B := arr[1]
		C := arr[2]
		D := arr[3]
		if C > D {
			result[A-1].First += 3
		} else if C < D {
			result[B-1].First += 3
		} else {
			result[A-1].First++
			result[B-1].First++
		}
	}
	sort.Sort(Pairs(result))
	var ans [111]int
	point := 1000000000
	top := 0
	for i, r := range result {
		// 前の人よりポイントが低い
		if point > r.First {
			top = i + 1
			point = r.First
		}
		ans[r.Second] = top
	}
	for i := 0; i < n; i++ {
		fmt.Println(ans[i])
	}
}

C++: #include <iostream>
#include <string>
#include <map>
#include <vector>
#include <utility>
#include <set>
#include <stack>
#include <queue>
#include <deque>
#include <algorithm>
#include <cmath>
#include <iomanip>

#define rep(i,j,k) for(int i=(int)j;i<(int)k;i++)
#define itrep(i,x) for(auto i=(x).begin(); i!=(x).end();i++)
#define Sort(x) sort((x).begin(),(x).end())
#define all(x) (x).begin(),(x).end()
#define fi first
#define se second
#define vec vector
#define INF (int)1e9
#define INFL 1e18
#define MOD 1000000007
#define pb push_back
#define MP make_pair
#define PI 3.1415926535
#define fcout cout<<fixed<<setprecision(10)
typedef long long int ll;
typedef std::pair<int,int> P;
int D=1;
int dx[4]={0,1,0,-1},dy[4]={-1,0,1,0};
int day[12]={31,28,31,30,31,30,31,31,30,31,30,31};
//template<typename T>void pp(T x){cout<<x<<endl;}

using namespace std;

int main(){
    int n;
    cin>>n;
    vector<pair<int,int> > v(n);
    rep(i,0,n){
        v[i].fi=0;
        v[i].se=i+1;
    }

    rep(i,0,n*(n-1)/2){
        int a,b,c,d;
        cin>>a>>b>>c>>d;
        a--; b--;
        if(c>d)v[a].fi+=3;
        else if(c<d)v[b].fi+=3;
        else {
            v[a].fi++;
            v[b].fi++;
        }
    }

    Sort(v);
    vector<int> ans(n);
    int score=1;
    ans[v[v.size()-1].se-1]=1;
    for(int i=n-2;i>=0;i--){
        if(v[i].fi==v[i+1].fi)ans[v[i].se-1]=score;
        else {
            score=n-i;
            ans[v[i].se-1]=score;
        }
    }
    rep(i,0,n){
        cout<<ans[i]<<endl;
    }
    return 0;
}

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

using namespace std;

int main() {
	int n, team[101] = { 0 }, a, b, c, d, rank;
	cin >> n;

	for (int i = 0; i < n * (n - 1) / 2; i++) {
		cin >> a >> b >> c >> d;
		c == d ? team[a]++, team[b]++ : (c > d ? team[a] += 3 : team[b] += 3);
	}

	for (int i = 1; i <= n; i++) {
		rank = 1;
		for (int j = 1; j <= n; j++) {
			team[i] < team[j] ? rank++ : NULL;
		}
		cout << rank << endl;
	}

	return 0;
}

C++: #include <iostream>
#include <vector>
#include <string>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>	// require sort next_permutation count __gcd reverse etc.
#include <cstdlib>	// require abs exit
#include <cstdio>	// require scanf printf
#include <functional>
#include <numeric>	// require accumulate
#include <cmath>
#include <climits>
#include <limits>
#include <cfloat>
#include <iomanip>	// require setw
#include <sstream>	// require stringstream 
#include <cstring>	// require memset
#include <cctype>	// require tolower, toupper
#include <fstream>	// require freopen
#include <ctime>
#define rep(i,n) for(int i=0;i<(n);i++)
#define ALL(A) A.begin(), A.end()
#define DEBUG 0

using namespace std;

typedef long long ll;
typedef pair<int, int> P;
string FILE_NAME = "testcase.soccer";
string NAME;
string itos (int n )
{
	stringstream ss;
	ss << n;

	return ss.str();
}
int score[100][100];

int main()
{
//	cut here before submit 
#if DEBUG
	NAME = FILE_NAME;
	int CNT = 1;
	NAME += itos (CNT );
	while (freopen (NAME.c_str() , "r", stdin ) != NULL ) {
#endif
	int n;
	cin >> n;
//	vector<int> score (n+1, 0 );
	memset (score, 0, sizeof (score ) );

	rep (i, n*(n-1)/2 ){
		int a, b, c, d;
		cin >> a >> b >> c >> d;
		a--;b--;
		if (c > d ){
			score[a][b] = 	3;
		}else
		if (c < d ){
			score[b][a] = 3;
		}else{
			score[a][b] = score[b][a] = 1;
		} // end if
	} // end rep
	vector<P> total (n );
	rep (i, n ){
		total[i].second = i;
		rep (j, n ){
			total[i].first -= score[i][j];
		} // end rep
	} // end rep
	sort (ALL (total ) );
	vector<P> rank (n);
	rep (i, n ){
		rank[i].first = total[i].second;
		if (i != 0 && total[i-1].first == total[i].first ){
			rank[i].second = rank[i-1].second;
		}else{
			rank[i].second = i+1;
		} // end rep
	} // end rep

	sort (ALL (rank ) );
	rep (i, n ){
		cout << rank[i].second << endl;
	} // end rep

#if DEBUG
	CNT++;	// cut here before submit
	NAME = FILE_NAME;
	NAME += itos (CNT );
	} // end loop; cut here before submit
#endif			
	return 0;
}

C++: #include<stdio.h>
int main(void)
{
	int n;
	int a[10000],b[10000],c[10000],d[10000];
	int t[10000],s[10000];
	int i,j;
	int cnt[10000];
	
	scanf("%d",&n);
	for(i=1;i<=n*(n-1)/2;i++){
		scanf("%d %d %d %d",&a[i],&b[i],&c[i],&d[i]);
		t[i]=0;
		cnt[i]=1;
	}
	for(i=1;i<=n*(n-1)/2;i++){
		if(c[i]>d[i]){
			t[a[i]]+=3;
		}
		else if(c[i]==d[i]){
			t[a[i]]+=1;
			t[b[i]]+=1;
		}
		else{
			t[b[i]]+=3;
		}
	}
	for(i=1;i<=n;i++){
		for(j=1;j<=n;j++){
			if(t[i]<t[j]){
				cnt[i]++;
			}
		}
	}
	for(i=1;i<=n;i++){
		printf("%d\n",cnt[i]);
	}
	return 0;
}

C++: #include<iostream>
using namespace std ;
int main( void )
{
	short n ;
	short i ,j ;
	short team[ 4 ] ;
	short cnt ;
	cin >> n ;
	short point[ n + 1 ] = { 0 } ;
	for( i = 0 ; i < n * ( n - 1 ) / 2 ; i++ )
	{
		cin >> team[ 0 ] >> team[ 2 ] >> team[ 1 ] >> team[ 3 ] ;
		if( team [ 1 ] == team[ 3 ] )
		{
			point[ team[ 0 ] ]++ ;
			point[ team[ 2 ] ]++ ;
		}
		else
		{
			point[ team[ 1 ] > team[ 3 ] ? team[ 0 ] : team[ 2 ] ] += 3 ;
		}
	}
	for( i = 1 ; i <= n ; i++ )
	{
		cnt = 1 ;
		for( j = 1 ; j <= n ; j++ )
		{
			if( i == j )
			{
				continue ;
			}
			if( point[ i ] < point[ j ] )
			{
				cnt++ ;
			}
		}
		cout << cnt << endl ;
	}
	return 0 ;
}

C++: #include <iostream>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <vector>
#include <string>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <algorithm>

using namespace std;

#define rep(i,j) REP((i), 0, (j))
#define REP(i,j,k) for(int i=(j);(i)<(k);++i)
#define BW(a,x,b) ((a)<=(x)&&(x)<=(b))
#define ALL(v) (v).begin(), (v).end()
#define LENGTHOF(x) (sizeof(x) / sizeof(*(x)))
#define AFILL(a, b) fill((int*)a, (int*)(a + LENGTHOF(a)), b)
#define MP make_pair
#define PB push_back
#define F first
#define S second
#define INF 1 << 30
#define EPS 1e-10

typedef pair<int, int> pi;
typedef pair<int, pi> pii;
typedef vector<int> vi;
typedef queue<int> qi;
typedef long long ll;

int point[100], N, A, B, C, D, rank[100];

int main(){
  scanf("%d", &N);
  rep(i, N*(N-1)/2){
    scanf("%d%d%d%d", &A, &B, &C, &D); A--; B--;
    if(C == D){ point[A]++; point[B]++; }
    else point[C>D?A:B] += 3;
  }

  rep(i, N) rep(j, N)
    if(point[i] < point[j]) rank[i]++;

  rep(i, N) printf("%d\n", rank[i]+1);
  return 0;
}