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<string>
#include<algorithm>
#include<iomanip>
using namespace std;
#define pi 3.141592653589793283462
int main(){
	int W[10];
	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,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<algorithm>
using namespace std;

int main(){
	int k[10],w[10];
	for(int i=0;i<10;i++){
		scanf("%d",&k[i]);
	}
	for(int i=0;i<10;i++){
		scanf("%d",&w[i]);
	}
	sort(k,k+10);
	sort(w,w+10);
	k[0]+=k[1]+k[2];
	w[0]+=w[1]+w[2];
	printf("%d %d\n",k[0],w[0]);
}

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

int main()
{
  int n[10];

  for (int i = 0; i < 2; i++){
    for (int j = 0; j < 10; j++){
      scanf("%d", &n[j]);
    }
    sort(n, n + 10);
    printf("%d", n[9] + n[8] + n[7]);
    if (!i){
      printf(" ");
    }
    else {
      printf("\n");
    }
  }

  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 = 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);

C++: #include <cstdio>
#include <cstdlib>
using namespace std;
int main()
{
int w[3],x;
for(int j=0;j<2;j++){
 memset(w,0,sizeof(w));
 for(int i=0;i<10;i++){
 scanf("%d",&x);
 if(x>w[0]){w[2]=w[1]; w[1]=w[0]; w[0]=x;}
 else if(x>w[1]) {w[2]=w[1]; w[1]=x;}
 else if(x>w[2]) w[2]=x;
 }
 printf("%d\n",w[0]+w[1]+w[2]);
}
}

C++: #include<iostream>
using namespace std;
int main(void)
{
    int W=0,k=0,toku[11],A,ta;
    for(int i=0;i<10;i++){
        cin>>toku[i];
    }
    for(int i=0;i<3;i++){
            A=0;
        for(int j=0;j<10;j++){
            if(A<toku[j]){
                A=toku[j];
                ta=j;
            }
        }
        W+=A;
        toku[ta]=0;
    }
       for(int i=0;i<10;i++){
        cin>>toku[i];
    }
    for(int i=0;i<3;i++){
            A=0;
        for(int j=0;j<10;j++){
            if(A<toku[j]){
                A=toku[j];
                ta=j;
            }
        }
        k+=A;
        toku[ta]=0;
    }
    cout<<W<<" "<<k<<"\n";
}

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

void sort(int a[]) {
	for(int i = 0; i < 10; i++)
		for (int j = i; j > 0; j--)
			if (a[j-1] < a[j]) {
				int t = a[j-1];
				a[j-1] = a[j];
				a[j] = t;
			}

}

int main(void) {
	int a[10], b[10], asum = 0, bsum = 0;
	for (int i = 0; i < 10; i++) {
		cin >> a[i];
	}
	for (int i = 0; i < 10; i++) {
		cin >> b[i];
	}
	sort(a);
	sort(b);
	
	asum = a[0] + a[1] + a[2];
	bsum = b[0] + b[1] + b[2];
	
	cout << asum << ' ' << bsum << endl;
	
	return 0;
}

C++: #include<iostream>
#include<vector>
#include<algorithm>
#include<functional>
using namespace std;
int main() {
	vector<int> W, K;
	int dommy;
	for (int i = 0; i < 10; ++i) {
		cin >> dommy;
		W.push_back(dommy);
	}
	sort(W.begin(), W.end(), greater<int>());
	for (int i = 0; i < 10; ++i) {
		cin >> dommy;
		K.push_back(dommy);
	}
	sort(K.begin(), K.end(), greater<int>());
	int Wpoint = 0, Kpoint = 0;
	for (int i = 0; i < 3; ++i) {
		Wpoint += W[i];
	}
	for (int i = 0; i < 3; ++i) {
		Kpoint += K[i];
	}
	cout << Wpoint << ' ' << Kpoint << endl;
	return 0;
}

C++: #include <iostream>
#include <algorithm>
using namespace std;
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
int pt[2][10];
int ans[2];
int main(){
	FOR(i,0,2){
		FOR(j,0,10)cin>>pt[i][j];
		sort(pt[i],pt[i]+10);
	}
	FOR(i,0,2)FOR(j,0,3)ans[i]+=pt[i][9-j];
	cout<<ans[0]<<" "<<ans[1]<<endl;
	return 0;
}

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

// http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0533

int main() {
	int a[10], b[10];
	for (int i = 0; i < 10; i++) cin >> a[i];
	for (int i = 0; i < 10; i++) cin >> b[i];
	sort(a, a + 10);
	sort(b, b + 10);
	cout << (a[7] + a[8] + a[9]);
	cout << " ";
	cout << (b[7] + b[8] + b[9]) << endl;
	return 0;
}

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

int main(){
    vector<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.begin(), w.end());
    sort(k.begin(), k.end());
    cout << w[9]+w[8]+w[7] << " "
        << k[9]+k[8]+k[7] << endl;
    return 0;
}

C++: #include<iostream>
#include<algorithm>
#include<string>
#include<vector>
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[10];
	}
	sort(W, W + 10);
	reverse(W, W + 10);
	sort(K, K + 10);
	reverse(K, K + 10);
	cout << W[0] << W[1] << W[2] << endl;
	cout << K[0] << K[1] << K[2] << endl;

	//ポイントカード
	/*
	int N, M;
	cin >> N >> M;
	int a;
	int A[5000];
	int b = 0;
	int x = 0;
	for (int i = 0; i <  M; i++) {
		cin >> a;
		if (a < N) {
			A[x]=a;
			x++;
		}
		else
		{
			b++;
		} 
		cin >> a;
	}
	int sum = 0;
	if (b < M - 1) {
		sort(A, A+x);
		reverse(A, A+x);
		for (int i = 0; i < M - 1 - b; i++) {
			sum += N - A[i];
		}
	}
	cout << sum << endl;
	*/

	//合計時間
	/*
	int sum=0, n;
	for (int i = 0; i < 4; i++) {
	cin >> n;
	sum += n;
	}
	cout << sum / 60 << endl;
	cout << sum % 60 << endl;
	//平均点
	/*
	int P[5];
	int sum=0;
	for (int i = 0; i < 5; i++) {
	cin >> P[i];
	if (P[i] < 40) P[i] = 40;
	sum += P[i];
	}
	cout << sum / 5 << endl;
	*/
	//投票
	/*
	int N, M;
	cin >> N >> M;
	int A[1000], vote[1000];
	for (int i = 0; i < N; i++) {
	cin >> A[i];
	vote[i] = 0;
	}
	int b;
	for (int i = 0; i < M; i++) {
	cin >> b;
	for (int j = 0; j < N; j++) {
	if (A[j] <= b) {
	vote[j]++;
	break;
	}
	}
	}
	int temps = 0, ans;
	for (int i = 0; i < N; i++) {
	if (vote[i] > temps) {
	temps = vote[i];
	ans = i;
	}
	}
	cout << ans + 1 << endl;
	*/

	//2.すごろく	
	/*
	int n;
	cin >> n;
	int A, _A = 1;
	int k = 0;
	int A_count[100];
	A_count[0] = 1;
	for (int i = 0; i < n; i++)
	{
	cin >> A;
	if (A == 1)
	{
	if (A == _A)
	{
	A_count[k]++;
	}
	else
	{
	k++;
	A_count[k] = 2;
	}
	}
	_A = A;
	}
	sort(A_count, A_count + k + 1);
	cout << A_count[k] << endl;
	*/

	//タイムカード
	/*
	int t[2][3];
	int x[3][3];
	for (int n=0; n < 3; n++)
	{
	for (int i=0; i < 2; i++)
	for (int k=0; k < 3; k++)
	cin >> t[i][k];

	for (int m = 2; m >= 0; m--)
	{
	x[n][m] = t[1][m] - t[0][m];
	if (t[0][m] > t[1][m])
	{
	x[n][m] += 60;
	t[1][m - 1]--;
	}
	}
	}
	for (int n= 0; n < 3; n++)
	{
	cout << x[n][0] << ' ' << x[n][1] <<' '<< x[n][2] << 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;
}