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 <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
#include <cfloat>
#include <ctime>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <complex>
#include <stack>
#include <queue>
#include <numeric>

using namespace std;

#ifdef _MSC_VER
#define __typeof__ decltype

template <class T>
int __builtin_popcount(T n) { return n ? 1 + __builtin_popcount(n & (n - 1)) : 0; }
#endif

#define foreach(it, c) for (__typeof__((c).begin()) it=(c).begin(); it != (c).end(); ++it)
#define all(c) (c).begin(), (c).end()
#define rall(c) (c).rbegin(), (c).rend()
#define popcount __builtin_popcount

template <class T> void max_swap(T& a, const T b) { a = max(a, b); }
template <class T> void min_swap(T& a, const T b) { a = min(a, b); }

const double EPS = 1e-10;
typedef long long ll;
typedef pair<int, int> pint;


int main()
{
	for (int t = 0; t < 2; ++t)
	{
		int a[10];
		for (int i = 0; i < 10; ++i)
			scanf("%d", a + i);
		sort(a, a + 10);
		printf("%d%c", accumulate(a + 7, a + 10, 0), t ? ' ' : '\n');
	}
}

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

using namespace std;

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

	cout << W[9] + W[8] + W[7] << ' ' << K[9] + K[8] + K[7] << '\n';

	return 0;
}

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

int main () {
    int m, W[10], T[10], i;
    for(i=0;i<10;i++) {
        cin >> W[i];
        m = max(m,W[i]);
    }
    cout << m << " ";
    for(i=0;i<10;i++) {
        cin >> T[i];
        m=max(m,T[i]);
    }
    cout << m << 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<<c<<" "<<d<<endl;

	




	return 0;
}

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

#define pb(n) push_back(n)
#define fi first
#define se second
#define all(r) (r).begin(),(r).end()
#define gsort(st,en) sort((st),(en),greater<int>())
#define vmax(ary) *max_element(all(ary))
#define vmin(ary) *min_element(all(ary))
#define debug(x) cout<<#x<<": "<<x<<endl
#define fcout(n) cout<<fixed<<setprecision((n))
#define scout(n) cout<<setw(n)
#define vary(type,name,size,init) vector< type> name(size,init)

#define rep(i,n) for(int i = 0; i < (int)(n);++i)
#define REP(i,a,b) for(int i = (a);i < (int)(b);++i)
#define repi(it,array) for(auto it = array.begin(),end = array.end(); it != end;++it)
#define repa(n,array) for(auto &n :(array))

using ll = long long;
using vi = vector<int>;
using vl = vector<ll>;
using dict = map<string,int>;
using pii = pair<int,int> ;
using pll = pair<ll,ll> ;

const int mod = 1000000007;
constexpr int imax = ((1<<30)-1)*2+1 ;
constexpr int inf = 100000000;
constexpr double PI = acos(-1.0) ;
double eps = 1e-10 ;
const int dy[] = {-1,0,1,0};
const int dx[] = {0,-1,0,1};

inline bool value(int x,int y,int w,int h){
  return (x >= 0 && x < w && y >= 0 && y < h);
}

template<typename T>
void Unique(vector<T> &v){
  sort(all(v));
  v.erase(unique(all(v)),v.end());
}

template<typename T>
T ston(string& str, T n){
  istringstream sin(str) ;
  T num ;
  sin >> num ;
  return num ;
}

void Ans(bool f){
  if(f) cout << "YES"<<endl;
  else cout << "NO"<<endl;
}

int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  vary(ll,w,10,0);
  vary(ll,k,10,0);
  rep(i,10){
    cin >> w[i];
  }
  sort(all(w));
  reverse(all(w));
  rep(i,10){
    cin >> k[i];
  }
  sort(all(k));
  reverse(all(k));
  ll a = 0, b = 0;
  rep(i,3){
    a += w[i];
  }
  rep(i,3){
    b += k[i];
  }
  cout << a << " " << b << endl;
  return 0;
}

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

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

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

int main(){
  int a[N],b[N],ansa,ansb;
  for(int i=0;i<N;i++)cin>>a[i];
  for(int i=0;i<N;i++)cin>>b[i];
  sort(a,a+N,greater<int>());
  sort(b,b+N,greater<int>());
  ansa=ansb=0;
  for(int i=0;i<3;i++)ansa+=a[i];
  for(int i=0;i<3;i++)ansb+=b[i];
  cout<<ansa<<' '<<ansb<<endl;
  return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <queue>
#include <vector>
#include <limits>
#include <cstring>

#define FOR(i,b,n) for(int i=b;i<n; i++)
#define CLR(mat) memset(mat, 0, sizeof(mat))

using namespace std;

int a[10], b[10];
int asum = 0, bsum = 0;
void solve()
{
	FOR(i, 0 ,20)
	{
		int t;
		cin >> t;
		
		if( i >= 10 )
			b[i-10] = t;
		else
			a[i] = t;
	}
	
	sort(a, a+10, greater<int>());
	sort(b, b+10, greater<int>());
	
	FOR(i, 0, 3)
	{
		asum += a[i];
		bsum += b[i];
	}
	
	cout << asum << " " << bsum << endl;
	return;
}

int main()
{
	solve();
	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;
}

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

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    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,greater<int>());
    sort(b,b+10,greater<int>());
    cout << a[0]+a[1]+a[2] << " " << b[0]+b[1]+b[2] << endl;

    return 0;
}

C++: #include<stdio.h>
int main(void)
{
	int data[10];
	int dai1,dai2,wk;
	int i,j;
	
	for(i=0;i<10;i++){
		scanf("%d",&data[i]);
	}
	for(i=0;i<9;j++){
		for(j=i+1;j<10;data[j]){
			if(data[i]<data[j]){
				wk=data[i];
				data[i]=data[j];
				data[j]=wk;
			}
		}
	}
	dai1=data[0]+data[1]+data[2];
	
	for(i=0;i<10;j++){
		scanf("%d",&data[j]);
	}
	for(i=0;i<9;i++){
		for(j=i+1;j<10;j++){
			if(data[i]<data[j]){
				wk=data[i];
				data[i]=data[j];
				data[j]=wk;
			}
		}
	}
	dai2=data[0]+data[1]+data[2];
	
	printf("%d %d\n",dai1,dai2);
	return 0;
}

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

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main(){
	int wscore[11],kscore[11],a;
	for(int i=0;i<10;i++){
		cin>>wscore[i];
	}
	for(int i=0;i<10;i++){
		cin>>kscore[i];
	}
	sort(wscore,wscore+10);
	sort(kscore,kscore+10);
	cout<<wscore[9]+wscore[8]+wscore[7]<<" "<<kscore[9]+kscore[8]+kscore[7]<<endl;
   return 0;
}