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<cstring>
using namespace std;

int main(){
	int n;
	int a[10000][4],point[1000],juni[1000],c,d;
	memset(point,0,sizeof(point));
	cin>>n;
	c=1;
	d=0;
	for(int i=0;i<(n*(n-1)/2);i++){
		cin>>a[i][0]>>a[i][1]>>a[i][2]>>a[i][3];
		if(a[i][2]>a[i][3]){
			point[a[i][0]] += 3;
		}
		else if(a[i][2]<a[i][3]){
			point[a[i][1]] += 3;
		}
		else{
			point[a[i][0]] += 1;
			point[a[i][1]] += 1;
		}
	}
	for(int i=0;i<2000;i++){
		for(int j=1;j<=n;j++){
			if(point[j]==(1999-i)){
				juni[j]=c;
				d++;
			}
		}
		c += d;
		d=0;
	}
	for(int i=1;i<=n;i++){
		cout<<juni[i]<<endl;
	}
	return 0;
}

C++: #include <iostream>
#include <algorithm>
using namespace std;
typedef pair<int,int> P;

#define loop(i,n) for(int i=1;i<=n;i++)
int score[102];
P order[102];
int r[102];

int main(){
  int n,a,b,c,d;
  cin>>n;
  loop(i,n)score[i]=0;
  loop(i,n*(n-1)/2){
    cin>>a>>b>>c>>d;
    if(c>d)score[a]+=3;
    else if(c<d)score[b]+=3;
    else score[a]++,score[b]++;
  }
  loop(i,n){
    order[i]=P(score[i],i);
  }
  sort(order+1,order+n+1,greater<P>());
  int ps=-1,pr=0;
  loop(i,n){
    if(ps==order[i].first)r[order[i].second]=pr;
    else pr=r[order[i].second]=i,ps=order[i].first;
  }
  loop(i,n)cout<<r[i]<<endl;
  return 0;
}

C++: import Control.Monad
import Control.Applicative
import Data.List

main = do
	n <- readLn
	l <- map (map (read :: String -> Int) . words) <$> replicateM ((n * (n - 1)) `div` 2) getLine
	mapM_ print $ solve n l

point :: [(Int, Int)] -> [Int] -> [(Int, Int)]
point x [a, b, c, d]
	| c < d = (b, 3):x
	| c == d = (a, 1):(b, 1):x
	| c > d = (a, 3):x

func :: Int -> Int -> [(Int, Int)] -> [(Int, Int)]
func a b [] = [(b, a)]
func a b ((x, y):z)
	| a == -1 = func x y z
	| x == a = func a (b + y) z
	| otherwise = (b, a):(func x y z)

func2 :: Int -> Int -> Int -> [(Int, Int)] -> [(Int, Int)]
func2 a b c [] = []
func2 a b c ((x, y):z)
	| a == -1 = (y, 1):(func2 x 1 2 z)
	| a == x = (y, b):(func2 x b (c + 1) z)
	| otherwise = (y, c):(func2 x c (c + 1) z)

func3 :: [(Int, Int)] -> [Int]
func3 l = map (\(x, y) -> y) $ sort l

solve :: Int -> [[Int]] -> [Int]
solve n l = func3 $ func2 (-1) (-1) (-1) $ reverse $ sort $ func (-1) (-1) $ sort $ foldl point [(x, 0) | x <- [1..n]] l

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

C++: // 基本テンプレート
// #define _GLIBCXX_DEBUG // for STL debug (optional)
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <string>
#include <cstring>
#include <deque>
#include <list>
#include <queue>
#include <stack>
#include <vector>
#include <utility>
#include <algorithm>
#include <map>
#include <set>
#include <complex>
#include <cmath>
#include <limits>
#include <cfloat>
#include <climits>
#include <ctime>
#include <cassert>
#include <numeric>
#include <fstream>
#include <functional>
#include <bitset>
using namespace std;

#define debug(...) fprintf(stderr, __VA_ARGS__)
#define int long long int
 
template<typename T> void chmax(T &a, T b) {a = max(a, b);}
template<typename T> void chmin(T &a, T b) {a = min(a, b);}
template<typename T> void chadd(T &a, T b) {a = a + b;}
 
typedef pair<int, int> pii;
typedef long long ll;
 
int dx[] = {0, 0, 1, -1};
int dy[] = {1, -1, 0, 0};
const ll INF = 1001001001001001LL;
const ll MOD = 1000000007LL;
 
signed main() {
    int N; cin >> N;

    vector< pair<int, int> > point(N);
    vector<int> ans(N);
    for(int i=0; i<N; i++) point[i].second = i;
    for(int i=0; i<N*(N-1)/2; i++) {
        int A, B, C, D; cin >> A >> B >> C >> D;
        A--; B--;
        if(C == D) {
            point[A].first++;
            point[B].first++;
        }
        else if(C < D) {
            point[B].first += 3;
        }
        else {
            point[A].first += 3;
        }
    }
    sort(point.rbegin(), point.rend());

    int rank = 1, pre = -1;
    for(int i=0; i<N; i++) {
        if(pre < 0) {
            pre = point[i].first;
            ans[ point[i].second ] = rank;
        }
        else if(pre == point[i].first) {
            ans[ point[i].second ] = rank;
        }
        else {
            rank = i+1;
            ans[ point[i].second ] = rank;
        }
        pre = point[i].first;
    }

    for(int i=0; i<N; i++) cout << ans[i] << endl;
    return 0;
}

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

int main(){
  int n;
  cin >> n;
  vector<int> point(n,0);
  for(int i=0;i<n*(n-1)/2;i++){
    int a,b,c,d;
    cin >> a >> b >> c >> d; a--; b--;
    if(c<d){
      point[b] += 3;
    }else if(c>d){
      point[a] += 3;
    }else{
      point[a]++; point[b]++;
    }
  }
  vector<int> rank = point;
  sort(rank.begin(),rank.end());
  
  for(int i=0;i<n;i++){
    int pos = upper_bound(rank.begin(),rank.end(),point[i]) - rank.begin();
    cout << n-pos+1 << endl;
  }
}

C++: #include <iostream>

#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define REP(i,m,n) for (int i=m;i<(int)(n);i++)

const int INF = 10000000;
using namespace std;
typedef long long  ll;
const int MAX = 10000;

/** Problem0566 : Soccer **/
int main()
{
	int team[100]={0};
	int n, a, b, as, bs;
	
	cin >> n;
	rep(i, n*(n-1)/2) {
		cin >> a >> b >> as >> bs;
		a--; b--;
		if (as > bs) {
			team[a]+=3;
		} else if (bs > as) {
			team[b]+=3;
		} else {
			team[a]++; team[b]++;
		}
	}
	rep(i, n) {
		int myS = team[i];
		int rank=1;
		rep(j, n) {
			if (i!=j && myS<team[j])
				rank++;
		}
		cout << rank << endl;
	}
	return 0;
}