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 <vector>
#include <algorithm>
#include <functional>

using namespace std;

void solve()
{
	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 sumW = 0;
	int sumK = 0;
	for(int i = 0; i < 3; ++i)
	{
		sumW += W[i];
		sumK += K[i];
	}
	cout << sumW << " " << sumK << endl;
}

int main()
{
	solve();
	return(0);
}

C++: #include <stdio.h>
void swap(int *a,int *b){
   int tmp;
   tmp = *a;
   *a=*b;
   *b=tmp;
   return;
}
int main(){
  int i,n,k[10],w[10],K,W;
  K=W=0;
  for(i=0;i<10;i++){
    scanf("%d",&n);
    w[i]=n;
  }
  for(i=0;i<10;i++){
    scanf("%d",&n);
    k[i]=n;
  }
  for(i=0;i<3;i++){
    for(int j=i+1;j<10;j++) if(k[i]<k[j]) swap(&k[i],&k[j]);
  }
  for(i=0;i<3;i++){
    for(int j=i+1;j<10;j++) if(w[i]<w[j]) swap(&w[i],&w[j]);
  }
  for(i=0;i<3;i++){
    K+=k[i];W+=w[i];
  }
  printf("%d %d\n",W,K);
  return 0;
}

C++: //include
//------------------------------------------
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>

using namespace std;

//conversion
//------------------------------------------
inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}

//math
//-------------------------------------------
template<class T> inline T sqr(T x) {return x*x;}

//typedef
//------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;
typedef unsigned long long ULL;

//container util
//------------------------------------------
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())

//repetition
//------------------------------------------
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)

//constant
//--------------------------------------------
const double EPS = 1e-10;
const double PI  = acos(-1.0);

//clear memory
#define CLR(a) memset((a), 0 ,sizeof(a))

//debug
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;

int main() {
  int w[10];
  int k[10];
  int aw = 0, ak = 0;

  REP(i, 2) {
    REP(j, 10) {
      if(!i) cin >> w[j];
      else cin >> k[j];
    }
  }

  stable_sort(w, w+10, greater<int>());
  stable_sort(k, k+10, greater<int>());
    
  REP(i, 3) {
    aw += w[i];
    ak += k[i];
  }
  cout << aw << ' ' << ak << endl;
}

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

int main() {
	int w[10], k[10];
	int i, j;
	i = 0;
	j = 0;
	while (i < 10) {
		cin >> w[i];
		i++;
	}
	while (j < 10) {
		cin >> k[j];
		j++;
	}
	sort(w,w+10,greater<int>());
	sort(k,k+10,greater<int>());
	printf("%d %d\n", w[0]+w[1]+w[2], k[0]+k[1]+k[2]);
	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;
}

C++: #include<iostream>
#include<string>
#include<vector>
#include<algorithm>
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[9]+a[8]+a[7]<<" "<<b[9]+b[8]+b[7]<<endl;


	return 0;
}

C++: #include <iostream>
int main(){
	int w[10],k[10],ww=0,kk=0;
	for(int i=0;i<10;i++){
		std::cin>>w[i];
	}
	for(int i=0;i<10;i++){
		std::cin>>k[i];
	}
	for(int j=0;j<10;j++){
		int max=j;
		for(int i=j+1;i<10;i++){
			if(w[max]<w[i])max=i;
		}
		int a=w[max];
		w[max]=w[j];
		w[j]=a;
	}
	for(int j=0;j<10;j++){
		int max=j;
		for(int i=j+1;i<10;i++){
			if(k[max]<k[i])max=i;
		}
		int a=k[max];
		k[max]=k[j];
		k[j]=a;
	}
	for(int l=0;l<3;l++){
		ww+=w[l];
	}
	for(int l=0;l<3;l++){
		kk+=k[l];
	}
	std::cout<<ww<<" "<<kk<<std::endl;
	return 0;
}

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

int main(){
	int w[3] = {0};
	int k[3] = {0};
	int w_sum = 0, k_sum = 0;
	int input;
	int i,j;
	for(i=0;i<10;i++){
		cin>>input;
		for(j=0;j<3;j++){
			if(w[j] < input){
				w[j] = input;
				break;
			}
		}
	}
	
	for(i=0;i<10;i++){
		cin>>input;
		for(j=0;j<3;j++){
			if(k[j] < input){
				k[j] = input;
				break;
			}
		}
	}
	for(i=0;i<3;i++){
		w_sum += w[i];
		k_sum += k[i];
	}
	cout<<w_sum<<" "<<k_sum<<endl;
	return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
    int x,y[100],z[100],a=0,b=0;
    for(int i=0;i<10;i++){
            scanf("%d",&z[i]);
    }
    for(int i=0;i<10;i++){
            scanf("%d",&y[i]);
    }
    sort(z,z+10);
    reverse(z,z+10);
    sort(y,y+9);
    reverse(y,y+9);

    for(int i=0;i<3;i++){
        a=a+z[i];
        b=b+y[i];
    }

    cout<<a<<' '<<b<<endl;
}

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

using namespace std;

int main(){
	int n = 2;
	while(n--){
		int m = 10, s[10];
		while(m--){
			cin >> s[m];
		}
		sort(s, s + 10);
		cout << (s[9] + s[8] + s[7]) << (n == 0 ? "\n" : " ");
	}
	return 0;
}

C++: #include<cstdio>
#include<iostream>
#include<ctype.h>
#include<algorithm>
#include<string>
#include<cmath>
using namespace std;

int main(){
	int people[21], Total, Total2;
	for (int i = 0; i < 20; i++){
		cin >> people[i];
	}
	sort(people, people + 10,greater<int>());
	sort(people + 11, people + 20,greater<int>());
	Total = people[0] + people[1] + people[2];
	Total2 = people[10] + people[11] + people[12];
	cout << Total <<" "<< Total2 << endl;
	return 0;
}

C++: #define _USE_MATH_DEFINES
#include "bits/stdc++.h"
#define EPS 1e-10
using namespace std;
typedef long long llong;
int main() {
	vector<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.begin(), a.end(), greater<int>());
	sort(b.begin(), b.end(), greater<int>());
	cout << a[0] + a[1] + a[2] << " " << b[0] + b[1] + b[2] << endl;


	return 0;
}

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

int main(){
int N[11]={},W[11]={},x;
int Ns=0;Ws=0;
for(int i=0;i<9;i++)
{cin>>x;N[i]=x;}
for(int i=0;i<9;i++)
{cin>>x;W[i]=x;}
for(int i=0;i<9;i++)
{for(int j=9;j>j;j--)
{if(N[j]>N[j-1]){int t=N[j];N[j]=N[j-1];N[j-1]=t;}
 if(W[j]>W[j-1]){int t=W[j];W[j]=W[j-1];W[j-1]=t;}
}
}
for(int i=0;i<3;i++)
{Ns+=N[i];Ws+=W[i];}
cout<<Ns<<" "<<Ws<<endl;
return 0;
}