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 <bits/stdc++.h>
#define rep(i,n)for(int i=0;i<n;i++)
using namespace std;
typedef long long ll;

int main() {
	int W[10], K[10];
	rep(i, 10)scanf("%d", &W[i]);
	rep(i, 10)scanf("%d", &K[i]);
	sort(W, W + 10); sort(K, K + 10);
	cout << W[9] + W[8] + W[7] << ' ' << K[9] + K[8] + K[7] << endl;
	return 0;
}

C++: // tsukasa_diary's programing contest code template
#include <bits/stdc++.h>
using namespace std;
// define
#define for_(i,a,b) for(int i=a;i<b;++i)
#define for_rev(i,a,b) for(int i=a;i>=b;--i)
#define allof(a) a.begin(),a.end()
#define minit(a,b) memset(a,b,sizeof(a))
#define size_of(a) (int)a.size()
// typedef
typedef long long lint;
typedef double Double;
typedef pair<int, int> pii;
//
typedef vector< int > Array;
typedef vector< Array > Matrix;
typedef vector< Double > DArray;
typedef vector< DArray > DMatrix;
typedef vector< string > SArray;
typedef vector< pii > PArray;
// popcount
inline int POPCNT(int _x) { return __builtin_popcount(_x); }
inline int POPCNT(lint _x) { return __builtin_popcountll(_x); }
// inf
const int iINF = 1L << 30;
const lint lINF = 1LL << 60;
// eps
Double EPS = 1e-9;
// in range
inline bool in_range(int _v, int _mx, int _mi) { return _mi <= _v && _v < _mx; }
inline bool in_range(Double _v, Double _mi, Double _mx) { return -EPS < _v - _mi && _v - _mx < EPS; }
inline bool in_range(int _x, int _y, int _W, int _H) { return 0 <= _x && _x < _W && 0 <= _y && _y < _H; }
// neighbor clockwise
const int DX[4] = {0,1,0,-1}, DY[4] = {-1,0,1,0};
const int DX_[8] = {0,1,1,1,0,-1,-1,-1}, DY_[8] = {-1,-1,0,1,1,1,0,-1};

int pointW[10], pointK[10];

void solve() {
	sort(pointW, pointW + 10, greater<int>());
	sort(pointK, pointK + 10, greater<int>());
	
	cout << pointW[0] + pointW[1] + pointW[2] << " " << pointK[0] + pointK[1] + pointK[2] << endl;
}

int main() {
	for_(i,0,10) cin >> pointW[i];
	for_(i,0,10) cin >> pointK[i];
	solve();
	return 0;
}

C++: #include <iostream>
#include <algorithm>
int main()
{
	int W[10],S[10];
	for(int i=0; i<10; i++)std::cin>>W[i];
	for(int i=0; i<10; i++)std::cin>>S[i];
	std::sort(W,W+10);
	std::sort(S,S+10);
	printf("%d %d\n",W[9]+W[8]+W[7],S[9]+S[8]+S[7]);
	return 0;
}

C++: #include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<set>
using namespace std;
int main() {
	vector<int>A;
	vector<int>B;

	for (int i = 0; i < 10; i++) {
		int a;
		cin >> a;
		A.push_back(a);
	}
	for (int i = 0; i < 10; i++) {
		int b;
		cin >> b;
		B.push_back(b);
	}

	sort(A.begin(), A.end());
	sort(B.begin(), B.end());

	reverse(A.begin(), A.end());
	reverse(B.begin(), B.end());

	int w, k;

	w = A[0] + A[1] + A[2];
	k = B[0] + B[1] + B[2];

	cout << w << " " << k << endl;

}

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

int main() {
	int sum[2] = {0}, num[10] = { 0 }, i, j;
	for (j = 0; j < 2; j++) {
		for (i = 0; i < 10; i++) {
			cin >> num[i];
		}
		sort(num, num + 10);
		sum[j] = num[7] + num[8] + num[9];
	}
	cout << sum[0] << " " << sum[1] << endl;
	return 0;
}

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

using namespace std;

int main() {
    int waseda[10];
    int kyoto[10];
    for (int i = 0; i < 10; ++i) {
        cin >> waseda[i];
    }
    sort(waseda, waseda + 10);
    for (int i = 0; i < 10; ++i) {
        cin >> kyoto[i];
    }
    sort(kyoto, kyoto + 10);
    cout << waseda[9] + waseda[8] + waseda[7] << " " << kyoto[9] + kyoto[8] + kyoto[7] << '\n';
}

C++: #include <bits/stdc++.h>
#define FOR(v, a, b) for(int v = (a); v < (b); ++v)
#define FORE(v, a, b) for(int v = (a); v <= (b); ++v)
#define REP(v, n) FOR(v, 0, n)
#define REPE(v, n) FORE(v, 0, n)
#define RS resize
#define CLR clear
#define PB push_back
#define ALL(x) (x).begin(), (x).end()
using namespace std;

int main(){
	
	vector< int > w(10), k(10);
	
	REP(i, 10) cin >> w[i];
	REP(i, 10) cin >> k[i];
	
	sort(ALL(w), greater< int >());
	sort(ALL(k), greater< int >());
	
	cout << w[0] + w[1] + w[2] << " " << k[0] + k[1] + k[2] << endl;
	
	return 0;
}

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

1.
2.テァツつュテァツ板ーテゥツォツ佚ィツシツ?
3.sumita.takaki@gmail.com

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

 **********************************************/
#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[7] + w_uni[8] + w_uni[9];
        int total2 = k_uni[7] + k_uni[8] + k_uni[9];

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

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

        }
        

}

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
  int w[10]={},k[10]={};
  int 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);
  cout << w[7]+w[8]+w[9] << " " << k[7]+k[8]+k[9] << endl;
  return 0;
}

C++: //09-2 ???????????????
#include<iostream>
#include<stdio.h>
#include<string>
#include<vector>
#include<map>
#include<algorithm>
using namespace std;
int main(){
    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);
    int a = W[7] + W[8] + W[9];
    int b = K[7] + K[8] + K[9];
    cout << a << " " << b << endl;
    return 0;
}

C++: #include<iostream>
#include<cstdio>
using namespace std;
int main(){
  int data1[10],data2[10];
  int sum1=0,sum2=0;
  for(int i=0;i<10;i++){
    cin >> data1[i];
  }
  for(int i=0;i<10;i++){
    cin >> data2[i];
  }
  for(int j=0;j<3;j++){
    for(int i=0;i<9-j;i++){
      if(data1[i]>data1[i+1]){
	int temp;
	temp=data1[i];
	data1[i]=data1[i+1];
	data1[i+1]=temp;
      }
      if(data2[i]>data2[i+1]){
	int temp;
	temp=data2[i];
	data2[i]=data2[i+1];
	data2[i+1]=temp;
      }
    }
    sum1+=data1[9-j];
    sum2+=data2[9-j];
  }
  cout << sum1 << " " << sum2 << endl;
  return 0;
}

C++: #include <iostream>
using namespace std;
int main(void)
{
	int a,b,c[101]={0},d,e,f;
	for (a=0;a<10;a++)
	{
		cin>>b;
		c[b]=1;
	}
	d=0;
	e=0;
	for (a=100;a>=0;a--)
	{
		if (c[a]==1&&d<=3)
		{
			e=e+a;
			d++;
		}
	}
	c[101]={0};
	for (a=0;a<10;a++)
	{
		cin>>b;
		c[b]=1;
	}
	d=0;
	f=0;
	for (a=100;a>=0;a--)
	{
		if (c[a]==1&&d<=3)
		{
			f=f+a;
			d++;
		}
	}
	cout<<e<<" "<<f<<endl;
	return 0;
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main()
{
	int inW[9] = {};
	int inK[9] = {};
	for (int i = 0; i > 9; i++){
		cin >> inW[i];
	}
	for (int i = 0; i > 9; i++){
		cin >> inK[i];
	}
	sort(inW, inW + 9);
	sort(inK, inK + 9);
	int sumw = inW[0] + inW[1] + inW[2];
	int sumk = inK[0] + inK[1] + inK[2];
	cout << sumw << sumk << endl;
	return 0;
}