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 <iostream>
#include <algorithm>
#define MEMBER 20
using namespace std;
int n=MEMBER,k=0;
int score[MEMBER];
int main(){
	while(k!=n){
		cin >>score[k];
		k++;
	}
	sort(score,score+(10));
	sort(score+(10),score+(20));
	//k=0;
	//while(k!=n){
	//	cout <<score[k]<< " ";
	//	k++;
	//}
	cout << score[7]+score[8]+score[9]<<" ";
	cout << score[17]+score[18]+score[19]<<endl;
	return 0;
}

C++: #include <iostream>
#include <fstream>
#include <typeinfo>
#include <vector>
#include <cmath>
#include <set>
#include <map>
#include <string>
#include <algorithm>
#include <cstdio>
#include <queue>
#include <iomanip>
#include <cctype>
#define syosu(x) fixed<<setprecision(x)
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
typedef pair<double,double> pdd;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<char> vc;
typedef vector<vc> vvc;
typedef vector<bool> vb;
typedef vector<vb> vvb;
typedef vector<P> vp;
typedef vector<vp> vvp;
typedef pair<int,P> pip;
typedef vector<pip> vip;
const int inf=1<<25;
const double pi=acos(-1);
const double eps=1e-10;
const vi emp;

vector<ll> a(20);

int main(){
	for(auto i=a.begin();i!=a.end();i++) cin>>*i;
	sort(a.begin(),a.begin()+10);
	sort(a.begin()+10,a.end());
	cout<<a[7]+a[8]+a[9]<<' '<<a[17]+a[18]+a[19]<<endl;
}

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

int main()
{
int w, k;
vector<int> ws, ks;
ws.resize(10);
ks.resize(10);
for(int i = 0; i < 10; ++i)
scanf("%d", &ws[i]);
for(int i = 0; i < 10; ++i)
scanf("%d", &ks[i]);
sort(ws.rbegin(), ws.rend());
sort(ks.rbegin(), ks.rend());
w = ws[0] + ws[1] + ws[2];
k = ks[0] + ks[1] + ks[2];
printf("%d %d\n", w, k);
}

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

using namespace std;

int stuw[10] , answ = 0;
int stuk[10] , ansk = 0;

int main(){

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

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

	sort(stuw , stuw + 10 , greater<int>());
	sort(stuk , stuk + 10 , greater<int>());

	for(int i = 0; i < 3; i++){
		answ += stuw[i];
		ansk += stuk[i];
	}

	cout << answ << " " << ansk << endl;

	return 0;
}

C++: #include<iostream>
#include<algorithm>
#include<vector>
#include<functional>
using namespace std;
int main() {
	int w = 0;
	int k = 0;
	int ww[20] = {};
	int hh[20] = {};
	for (int i = 0; i < 10; i++) {
		cin >> ww[i];
	}
	for (int i = 0; i < 10; i++) {
		cin >> hh[i];
	}
	sort(ww, ww + 20, greater<int>());
	sort(hh, hh + 20, greater<int>());
	w = ww[0] + ww[1] + ww[2];
	k = hh[0] + hh[1] + hh[2];
	cout << w << " " << k << endl;
	
	return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <algorithm>
#include <string>
#include <cstring>
#include <cctype>
#include <cmath>
#include <stack>
#include <queue>
#include <vector>
#include <set>
#include <map>
#include <list>
#include <stdio.h>
#include <string.h>
#include <cstdlib>
#include <math.h>
#include <bitset>
#define INF 2000000000
using namespace std;
int dx[4]={1,0,-1,0},dy[4]={0,1,0,-1};
#define ll long long
#define PL pair<long long, long long>
#define P pair<int,int>
#define mk make_pair
#define en endl;
#define WHITE 0
#define BLACK 2
#define GRAY 1
#define RE return 0;
#define HERE cout<<"    "<<"HERE"<<en

string jj("JOI");
string ii("IOI");

int main(){
  priority_queue<int> pq_w;
  for(int i=0; i<10; i++){
    int n;
    cin>>n;
    pq_w.push(n);
  }
  priority_queue<int> pq_k;
  for(int i=0; i<10; i++){
    int n;
    cin>>n;
    pq_k.push(n);
  }
  
  int w=0,k=0;
  for(int i=0; i<3; i++){
    w+=pq_w.top(); pq_w.pop();
    k+=pq_k.top(); pq_k.pop();
  }
  cout<<w<<" "<<k<<en
}

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

int main(){
  int x,i;
  vector<int>w,k;
  for(i=0;i<10;i++)scanf("%d",&x),w.push_back(x);
  for(i=0;i<10;i++)scanf("%d",&x),k.push_back(x);
  sort(w.begin(),w.end());
  sort(k.begin(),k.end());
  printf("%d %d\n",w[7]+w[8]+w[9],k[7]+k[8]+k[9]);
}

C++: #include<iostream>
#include<cstdio>
#include<string>
#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);
  cout << w[7] + w[8] + w[9] << " " << k[7] + k[8] + k[9] << endl;
  return 0;
}

C++: // Tazoe

#include <iostream>
using namespace std;

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

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

	for(int i=0; i<9; i++){
		for(int j=i+1; j<10; j++){
			if(W[i]<W[j]){
				int tmp = W[i];
				W[i] = W[j];
				W[j] = tmp;
			}
		}
	}

	for(int i=0; i<9; i++){
		for(int j=i+1; j<10; j++){
			if(K[i]<K[j]){
				int tmp = K[i];
				K[i] = K[j];
				K[j] = tmp;
			}
		}
	}

	cout << W[0]+W[1]+W[2] << ' ' << K[0]+K[1]+K[2] << '\n';

	return 0;
}

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

int main(){
    vector<int> w(10);
    vector<int> k(10);

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

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

    sort(w.begin(), w.end(), greater<int>());
    sort(k.begin(), k.end(), greater<int>());

    int w_sum = 0;
    int k_sum = 0;

    for(int i=0; i<3; i++){
        w_sum += w[i];
        k_sum += k[i];
    }

    printf("%d %d\n", w_sum, k_sum);

    return 0;
}

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

using namespace std;

int main()
{
    vector<int> W(10);
    vector<int> K(10);
    
    for(int i = 0; i < 10; i++) { cin >> W[i]; }
    for(int i = 0; i < 10; i++) { cin >> K[i]; }
    
    sort(W.begin(), W.end(), greater<int>());
    sort(K.begin(), K.end(), greater<int>());
    
    cout << W[0] + W[1] + W[2] << ' ' << K[0] + K[1] + K[2] << endl;
    
    return 0;
}

C++: #include <stdio.h>

#define N 10

int main(void){
	int wScores[N];
	int kScores[N];
	int wBests,kBests;
	
	for (int i=0;i<N;i++) scanf("%d",&wScores[i]);
	for (int i=0;i<N;i++) scanf("%d",&kScores[i]);
	
	wBests=0; kBests=0;
	for (int i=0;i<3;i++){
		int max, p;
		max = 0;
		for (int j=0;j<N;j++){
			if (wScores[j] > max){
				max = wScores[j];
				p = j;
			}
		}
		wBests += max;
		wScores[p] = 0;
	}
	for (int i=0;i<3;i++){
		int max, p;
		max = 0;
		for (int j=0;j<N;j++){
			if (wScores[j] > max){
				max = kScores[j];
				p = j;
			}
		}
		kBests += max;
		kScores[p] = 0;
	}
	printf("%d %d\n",wBests, kBests);
	return 0;
}

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

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

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

 **********************************************/
#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){
                
        int w_uni[10],k_uni[10];


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

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

        sort(w_uni, w_uni+9);
        sort(k_uni, k_uni+9);

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

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

        }
        

}