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 <stdio.h>
#include <algorithm>

using namespace std;

int main(void)
{
	int w[10], k[10];
	int i, sumw, sumk;
	
	for (i = 0; i < 10; i++){
		scanf("%d", &w[i]);
	}
	for (i = 0; i < 10; i++){
		scanf("%d", &k[i]);
	}
	sort(k, k + 10);
	sort(w, w + 10);
	sumk = 0;
	sumw = 0;
	
	for (i = 0; i < 3; i++){
		sumk += k[i + 7];
		sumw += w[i + 7];
	}
	printf("%d %d\n", sumw, sumk);
	
	return (0);
}

C++: #include <bits/stdc++.h>
using namespace std;
#define Rep(i,N) for(int i = 0;i < N;i++)
int main()
{
  int data[10];
  int sum[2];
  Rep(p,2) {
    Rep(i,10)cin >> data[i];
    sort(data, data + 10,greater<int> );
    sum[p] = accumulate(data, data + 3,0);
  }
  cout << sum[0] << " " << sum[1] << endl;
  return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <string>
#include <stack>
#include <queue>
#include <set>

using namespace std;

int main()
{
	int b = 0;
	int w = 0;
	int aa[3] = { 0, 0, 0 };
	int a[3] = { 0, 0, 0 };
	for (int i = 0; i < 10; i++)
	{
		cin >> b;
		if (b > a[2])
		{
			a[2] = b;
		}
		if (a[2] > a[1])
		{
			w = a[1];
			a[1] = a[2];
			a[2] = w;
		}
		if (a[1] > a[0])
		{
			w = a[0];
			a[0] = a[1];
			a[1] = w;
		}
	}
	for (int i = 0; i < 10; i++)
	{
		cin >> b;
		if (b > aa[2])
		{
			aa[2] = b;
		}
		if (aa[2] > aa[1])
		{
			w = aa[1];
			aa[1] = aa[2];
			aa[2] = w;
		}
		if (aa[1] > aa[0])
		{
			w = aa[0];
			aa[0] = aa[1];
			aa[1] = w;
		}
	}
	cout << a[0] + a[1] + a[2] << " " << aa[0] + aa[1] + aa[2] << endl;

	return 0;
}

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

int main(void)
{
	priority_queue <int> w, k;
	int tmp;
	
	for (int i = 0; i < 10; i++){
		scanf("%d", &tmp);
		w.push(tmp);
	}
	for (int i = 0; i < 10; i++){
		scanf("%d", &tmp);
		k.push(tmp);
	}
	
	int sumw = 0, sumk = 0;
	for (int i = 0; i < 3; i++){
		sumw += w.top();
		w.pop();
		sumk += k.top();
		k.pop();
	}
	
	printf("%d %d\n", sumw, sumk);
	
	return (0);
}

C++: #include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <string>
#include <cmath>
#include <ctime>
#include <vector>
#include <stack>

using namespace std;
////////////////*My library*////////////////////////
#define rep_to(a,i,n) for(int i=a;i<n;i++)
#define rep(i,n) for(int i=0;i<n;i++)
#define rep_r(i,n) for(int i=n-1;i>=0;i--)
#define debug(x) cout<<x<<endl
#define s_1(x) cin>>x
#define s_2(x,y) cin>>x>>y
////////////////////////////////////////////////////

////////////////////////
/*prime()*/
/*primecount()*/
/*sort()*/
/*imos???*/
/*????????¢?´¢*/
/*??±???????????¢?´¢*/
/*???????¨???????*/
///////////////////////
int main()
{
	int num[100][100]={};

	rep(i,2)rep(j,10)cin>>num[i][j];

	rep(i,2)
	{
		rep(j,10)
		{
			rep_to(j,k,10)
			{
				if(num[i][j]<num[i][k])
				{
					int key;
					key=num[i][j];
					num[i][j]=num[i][k];
					num[i][k]=key;
				}
			}
		}
	}
	cout<<num[0][0]+num[0][1]+num[0][2]<<" "<<num[1][0]+num[1][1]+num[1][2]<<endl;
	return 0;
}

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

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[8]+a[9]+a[7] << endl;
  cout << b[8]+b[9]+b[7] << endl;
  return 0;
}

C++: #include<iostream>
#include<string>
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];
    for(int i=0;i<9;i++){
        for(int j=9;j>i;j--){
            if(w[j]>w[j-1]){
                int tmp=w[j];
                w[j]=w[j-1];
                w[j-1]=tmp;
            }
        }
    }
    for(int i=0;i<9;i++){
        for(int j=9;j>i;j--){
            if(k[j]>k[j-1]){
                int tmp=k[j];
                k[j]=k[j-1];
                k[j-1]=tmp;
            }
        }
    }
    cout<<w[0]+w[1]+w[2]<<" "<<k[0]+k[1]+k[2]<<endl;
    return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <string>
#include<vector>
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());
	sort (k.begin(),k.end());
	int wc=0,kc=0;
	for (int i=9;i>6;i--){
		wc+=w[i];
		kc+=k[i];
		}
	cout << wc <<" " << kc;		  
		return 0;
}

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

using namespace std;

int main(){
  int i = 0,d[20];
  while(cin >> d[i++]);
  sort(d,d+10);
  sort(d+11,d+20);
  cout << d[7] + d[8] + d[9] << " " <<  d[17] + d[18] + d[19] << endl;
}

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

int main(void){
  int waseda[11],keiou[11],sumW=0,sumK=0;

  for( int i = 0 ; i < 10 ; i++ ) cin >> waseda[i];

  for( int i = 0 ; i < 10 ; i++ ) cin >> keiou[i]; 

  sort( waseda , waseda+10 );
  sort( keiou , keiou+10 );

    sumW = waseda[9]+waseda[8]+waseda[7];
    sumK = keiou[9]+keiou[8]+keiou[7];
  

    cout << sumW << " " << sumK << endl;

  return 0;
}

C++: // AOJ 0533
#include<algorithm>
#include<cstdio>

int a[10], b[10];

int main()
{
	for( int i = 0; i != 10; ++i )
		scanf( "%d", a+i );
	for( int i = 0; i != 10; ++i )
		scanf( "%d", b+i );

	std::sort( a, a+10 );
	std::sort( b, b+10 );

	printf( "%d %d\n", a[9]+a[8]+a[7], b[9]+b[8]+b[7] );

	return 0;
}

C++: #include <bits/stdc++.h>
#include <string>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <numeric>
using namespace std;


int main(){
  vector<int> W(10);
  vector<int> K(10);
  for(int i = 0;i<10;i++){
    cin >> W.at(i);
  }
  for(int j = 0;j<10;j++){
    cin >> K.at(j);
  }
  sort(W.begin(),W.end());
  reverse(W.begin(),W.end());

  sort(K.begin(),K.end());
  reverse(K.begin(),K.end());

  cout << W.at(0)+W.at(1)+W.at(2) << " " << K.at(0)+K.at(1)+K.at(2) << endl;
}

C++: #include <stdio.h>
#include <cctype>
#include <limits.h>
#include <math.h>
#include <complex>
#include <bitset>
#include <vector>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <cstring>
#include <string>
#include <sstream>
#include <algorithm>
#include <iomanip>
#include <iostream>

#define VARIABLE(x) cerr << #x << "=" << x << endl
#define BINARY(x) static_cast<bitset<16> >(x);
#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++)
#define if_range(x, y, w, h) if (0<=(int)(x) && (int)(x)<(int)(w) && 0<=(int)(y) && (int)(y)<(int)(h))

const int INF = 1000000000;
const double EPS = 1e-8;
const double PI = 3.14159;
int dx[4]={-1, 0, 1, 0}, dy[4]={0, -1, 0, 1};
using namespace std;

/** Problem0533 : Contest **/
int main()
{
	vector<int> W(10), K(10);
	rep(i, 10) cin>>W[i];
	rep(i, 10) cin>>K[i];
	sort(W.begin(), W.end(), greater<int>());
	sort(K.begin(), K.end(), greater<int>());
	int sw=0, sk=0;
	rep(i, 3) { sw+=W[i]; sk+=K[i]; }
	cout << sw << " " << sk << endl;
}

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



using namespace std;

int main(){
	int a[10];
	int b[10];
	cin>>a[1]>>a[2]>>a[3]>>a[4]>>a[5]>>a[6]>>a[7]>>a[8]>>a[9]>>a[10];
	cin>>b[1]>>b[2]>>b[3]>>b[4]>>b[5]>>b[6]>>b[7]>>b[8]>>b[9]>>b[10];
	sort(a,a+10);
	sort(b,b+10);
    int c=a[10]+a[9]+a[8];
	int d=b[10]+b[9]+b[8];
	cout<<max(c,d)<<endl;

	



	

	
	return 0;
}