Go: package main

import (
	"fmt"
	"sort"
)

func calcScore(n, m []int) (int, int) {
	sort.Ints(n)
	sort.Ints(m)
	
	return n[9] + n[8] + n[7], m[9] + m[8] + m[7]
}

func main(){
	var team_W, team_K []int
	var inp int
	
		for i := 0; i < 10; i++ {		
			fmt.Scan(&inp)
			team_W = append(team_W, inp)
		}

		for j := 0;  j< 10; j++ {		
			fmt.Scan(&inp)
			team_K = append(team_K, inp)
		}

	fmt.Println(calcScore(team_W, team_K))
}

C++: #include <cstdio>
#include <climits>
#include <iostream>
#include <string>
#include <vector>
#include <set>
#include <cmath>
#include <stack>
#include <algorithm>
#include <random>
#include <iomanip>
#include <map>
#include <queue>
#include <functional>
#include <numeric>
#include <chrono>
#include <cstdlib>
using ll = long long;
using namespace std;

const ll MOD = 1e9 + 7;
const double pi = acos(-1);
typedef pair<int, int> P;
#define REP(i, n) for (int(i) = 0; (i) < (n); ++(i))
#define repi(i, a, b) for (int i = int(a); i < int(b); ++i)
#define EPS 1e-4
#define OUTPUT(i) (cout << (ll)i << endl)
#define ALL(a) ((a).begin(), (a).end())

bool operator<(const pair<ll, ll> &a, const pair<ll, ll> &b)
{

    if (a.first == b.first)
        return a.second < b.second;

    return a.first < b.first;
}

ll gcd(ll a, ll b)
{
    if (b == 0)
        return a;
    return gcd(b, a % b);
}
int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);

    //cout << fixed << setprecision(15);

    int a[10], b[10];
    REP(i, 10)
    {
        cin >> a[i];
    }
    REP(i, 10)
    {
        cin >> b[i];
    }
    sort(a, a + 10);
    sort(b, b + 10);

    cout << a[7] + a[8] + a[9] << " " << b[7] + b[8] + b[9] << endl;
    return 0;
}

C++: #include <bits/stdc++.h>

using namespace std;
typedef long long ll;
typedef pair<int,int> P;

int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);

	int w[10],k[10];

	for (int i = 0;i < 10;i++){
		cin >> w[i];
	}
	for (int i = 0;i < 10;i++){
		cin >> k[i];
	}

	sort(w,w+10); sort(k,k+10);

	cout << w[7]+w[8]+w[9] << " " << k[7]+k[8]+k[9] << endl;

	return 0;

}

C++: #include<iostream>
#include<string.h>
#include<vector>
#include<list>
#include<stdio.h>
#include<math.h>
#include<iomanip>
#include<map>
#include<stack>
#include<queue>
#include<algorithm>
#define range(i,a,b) for(int i = (a); i < (b); i++)
#define rep(i,b) range(i,0,b)
#define debug(x) cout << "debug " << x << endl;
using namespace std;

int main(){
    int wsum = 0, ksum = 0;
    int inp;
    vector<int> w, k;
    rep(i,10){
        cin >> inp;
        w.push_back(inp);
    }
    rep(i,10){
        cin >> inp;
        k.push_back(inp);
    }
    sort(w.begin(), w.end(), greater<int>());
    sort(k.begin(), k.end(), greater<int>());
    rep(i, 3){
        wsum+= w[i];
        ksum+= k[i];
    }
    cout << wsum << ' ' << ksum << endl;
}

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

int a[10];
int b[10];

int score(int x[10]){
  int a=0,b=0,c=0,tmp;

  for(int i=0;i<10;i++){
    if(a < x[i]){
      tmp = a;
      a = x[i];
      x[i] = tmp;
    }
    if(b < x[i]){
      tmp = b;
      b = x[i];
      x[i] = tmp;
    }
    if(c < x[i]){
      tmp = c;
      c = x[i];
      x[i] = tmp;
    }
  }
  return a + b + c;
}
int main(){
  for(int i=0;i<10;i++)cin >> a[i];
  for(int i=0;i<10;i++)cin >> b[i];

  int sa = score(a);
  int sb = score(b);
  
  cout << sa << " " << sb << endl;

  return 0;
}

C++: /**********************************************

1.
2.炭田高輝
3.sumita.takaki@gmail.com

last updated: 2013-07-10@12:32

 **********************************************/
#include<iostream>
#include<algorithm>
#include<sstream>
#include<vector>
#include<queue>
#include<deque>
#include<map>
#include<set>
#include<string>
#include<cstdio>
#include<cmath>
#include<cstring>
#include<cctype>
using namespace std;

int main(void) {

        while(1){
                
        vector<int> w_uni(10);
        vector<int> k_uni(10);

        for(int i=0; i<10; i++){
                cin >> w_uni[i];
        }

        for(int i=0; i<10; i++){
                cin >> k_uni[i];                
        }

        sort(w_uni.begin(), w_uni.end());
        sort(k_uni.begin(), k_uni.end());

        int total1 = w_uni[0] + w_uni[1] + w_uni[2];
        int total2 = k_uni[0] + k_uni[1] + k_uni[2];

        if(total1 == 0 && total2 == 0)break;

        cout << total1 << ' '<< total2 << endl;

        }
        

}

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

int main()
{
	int w[10], k[10], ans1, ans2;
	
	for (int i = 0; i < 10; i++){
		scanf("%d", &w[i]);
	}
	for (int i = 0; i < 10; i++){
		scanf("%d", &k[i]);
	}
	
	sort(w, w+10);
	sort(k, k+10);
	
	ans1 =  w[9] + w[8] + w[7];
	ans2 =  k[9] + k[8] + k[7];
	
	
	printf("%d %d\n", ans1, ans2);
	
	return (0);
}

C++: #include<stdio.h>
#include<algorithm>
#include<functional>
using namespace std;
int main(void)
{
	int i,s=0,z=0,a[11],aa[11];
	for(i=1;i<=10;i++){
		scanf("%d",&a[i]);
	}
	sort(a,a+11,greater<int>());
	for(i=1;i<=10;i++){
		scanf("%d",&aa[i]);
	}
	sort(aa,aa+11,greater<int>());
	s=a[0]+a[1]+a[2];
	z=aa[0]+aa[1]+aa[2];
	printf("%d %d\n",s,z);
	return 0;
}

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

int main() {

	//ifstream cin("INPUT.txt");
	//ofstream cout("OUTPUT.txt");

	int W[10], K[10], sum, i;
	for(i = 0; i < 10; i++) {
		cin >> W[i];
	}
	for(i = 0; i < 10; i++) {
		cin >> K[i];
	}
	sort(W, W+10);
	sort(K, K+10);
	sum = 0;
	for(i = 0; i < 3; i++) {
		sum += W[9-i];
	}
	cout << sum << " ";
	sum = 0;
	for(i = 0; i < 3; i++) {
		sum += K[9-i];
	}
	cout << sum << endl;

	return 0;

}

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

using namespace std;

int main()
{
	int W[10];
	int K[10];
	int wtotal;
	int ktotal;
	
	for (int i = 0; i < 10 ; i++){
		cin >> W[i];
	}
	for (int i = 0; i < 10 ; i++){
		cin >> K[i];
	}
	
	sort(W,W+10);
	reverse(W,W+10);
	
	sort(K,K+10);
	reverse(K,K+10);
	
	wtotal = W[0] + W[1] + W[2];
	ktotal = K[0] + K[1] + K[2];
	
	cout << wtotal <<" "<< ktotal << endl;
	
	return (0);
}

C++: #include <iostream>
//#include <fstream>
#include <vector>
#include <string>
//#include <cstdlib>
#include <algorithm>
//#include <set>
//#include <conio.h>
using namespace std;

int main(){
	vector<int> w(10);
	vector<int> k(10);
	vector<int> wmax(3);
	vector<int> kmax(3);
	int wsum=0, ksum=0;
	for(int i=0; i<3; ++i){
		wmax[i] = 0;
		kmax[i] = 0;
	}

	for(int i=0; i<10; ++i){
		cin >> w[i];
		if(w[i]>wmax[0]){
			wmax[0] = w[i];
			sort(wmax.begin(),wmax.end());
			continue;
		}
		if(w[i]>wmax[1]){
			wmax[1] = w[i];
			sort(wmax.begin(),wmax.end());
			continue;
		}
		if(w[i]>wmax[2]){
			wmax[2] = w[i];
			sort(wmax.begin(),wmax.end());
			continue;
		}
	}
	for(int i=0; i<10; ++i){
		cin >> k[i];
		if(k[i]>kmax[0]){
			kmax[0] = k[i];
			sort(kmax.begin(),kmax.end());
			continue;
		}
		if(k[i]>kmax[1]){
			kmax[1] = k[i];
			sort(kmax.begin(),kmax.end());
			continue;
		}
		if(k[i]>kmax[2]){
			kmax[2] = k[i];
			sort(kmax.begin(),kmax.end());
			continue;
		}
	}

	for(int i=0; i<3; ++i){
		wsum += wmax[i];
		ksum += kmax[i];
	}

	cout << wsum << " " << ksum << endl;
	return 0;
}

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

int main() {
	int w[11],k[11],p;
	for(int i=1; i<=10; i++){
		cin>>w[i];
		p=i;
		if(i>1){
			while(p>1){
				if(w[p]>w[p-1]){
					w[p-1]=w[p];
					p=p-1;
				}
				else
					break;
			}
		}
	}
	for(int i=1; i<=10; i++){
		cin>>k[i];
		p=i;
		if(i>1){
			while(p>1){
				if(k[p]>k[p-1]){
					k[p-1]=k[p];
					p=p-1;
				}
				else
					break;
			}
		}
	}
	cout<<w[1]+w[2]+w[3]<<" "<<k[1]+k[2]+k[3]<<endl;
	return 0;
}