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<bits/stdc++.h>
using namespace std;

typedef long long ll;

int main(void){
    ll w[11], k[11];
    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);
    ll W, K;
    W=w[9]+w[8]+w[7];
    K=k[9]+k[8]+k[7];
    cout << W << " " << K << "\n";
     
     
    return 0;
}

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 <iostream>
#include<algorithm>
using namespace std;
int main() {
	int a[20],w1=0,w2=0,w3=0,k1=0,k2=0,k3=0;
	for (int i = 0; i < 20; i++) {
		cin >> a[i];
	}
	for (int i = 0; i < 10; i++) {
		if (w3 < a[i])w3 = a[i];
		if (w2 < w3)swap(w2, w3);
		if (w1 < w2)swap(w2, w1);
	}
	for (int i = 10; i < 20; i++) {
		if (k3 < a[i])k3 = a[i];
		if (k2 < k3)swap(k2, k3);
		if (k1 < k2)swap(k2, k1);
	}
	cout<<w3+w2+w1<<" "<<k1+k2+k3<<endl;
return 0;
}

C++: #include <bits/stdc++.h>
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define RFOR(i,a,b) for(int i=(b) - 1;i>=(a);i--)
#define REP(i,n) for(int i=0;i<(n);i++)
#define RREP(i,n) for(int i=n-1;i>=0;i--)

#define PB push_back
#define INF (1<<29)
#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(),(a).rend()
#define CLR(a) memset(a,0,sizeof(a))
const int dx[] = {-1,0,0,1},dy[] = {0,1,-1,0};

typedef long long int ll;

using namespace std;

int main(){
    vector<int> w(10);
    vector<int> k(10);
    REP(i,10){
	cin >> w[i];
    }
    REP(i,10){
	cin >> k[i];
    }
    sort(RALL(w));
    sort(RALL(k));
    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 W[10],K[10],score_sum1,score_sum2;
  
  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);
  
  score_sum1=W[9]+W[8]+W[7];
  score_sum2=K[9]+K[8]+K[7];
  
  cout <<score_sum1<<" "<<score_sum2<<endl;
  
  return 0;
}

C++: #include<stdio.h>
#include<algorithm>
#include<functional>
using namespace std;
int main(void)
{
	int a[11],b[11],i,s,z;
	for(i=1;i<=10;i++){
		scanf("%d",&a[i]);
	}
	sort(a+1,a+10,greater<int>());
	for(i=1;i<=10;i++){
		scanf("%d",&b[i]);
	}
	sort(b+1,b+10,greater<int>());
	s=a[1]+a[2]+a[3];
	z=b[1]+b[2]+b[3];
	printf("%d %d\n",s,z);
	return 0;
}

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

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

C++: #include <iostream>
#include <fstream>
#include <sstream>
#include <iomanip>
#include <complex>
#include <string>
#include <vector>
#include <list>
#include <deque>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <bitset>
#include <functional>
#include <utility>
#include <algorithm>
#include <numeric>
#include <typeinfo>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
#include <ctime>

using namespace std;

#define dump(n) cout<<"# "<<#n<<"="<<(n)<<endl
#define debug(n) cout<<__FILE__<<","<<__LINE__<<": #"<<#n<<"="<<(n)<<endl
#define repi(i,a,b) for(int i=int(a);i<int(b);i++)
#define rep(i,n) repi(i,0,n)
#define iter(c) __typeof((c).begin())
#define foreach(i,c) for(iter(c) i=(c).begin();i!=(c).end();i++)
#define allof(c) (c).begin(),(c).end()
#define mp make_pair

typedef unsigned int uint;
typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<string> vs;
typedef pair<int,int> pii;

int main()
{
	vi w(10),k(10);
	rep(i,10)
		cin>>w[i];
	rep(i,10)
		cin>>k[i];
	sort(allof(w),greater<int>());
	sort(allof(k),greater<int>());
	cout<<accumulate(allof(w)-7,0)<<" "<<accumulate(allof(k)-7,0)<<endl;
	
	return 0;
}

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

int main() {
  int wsum=0,ksum=0,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,greater<int>() );
  sort(k,k+10,greater<int>() );
  for(int i=0;i<3;i++) {
    wsum += w[i];
    ksum += k[i];
  }
  cout << wsum << " " << ksum << endl;
}

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

using namespace std;

int main() {
    int scores[2] = {0, 0};
    int points[2][10];
    for (int i = 0; i < 2; ++i) {
        for (int j = 0; j < 10; ++j) {
            cin >> points[i][j];
        }
        sort(points[i], points[i]+10);
        for (int j = 0; j < 3; ++j) {
            scores[i] += points[i][9 - j];
        }
    }
    cout << scores[0] << ' ' << scores[1] << 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[9]+a[8]+a[7] << " " << b[9]+b[8]+b[7] << endl;
 
	return 0;
}

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

#define fi first
#define se second
#define repl(i,a,b) for(int i=(int)(a);i<(int)(b);i++)
#define rep(i,n) repl(i,0,n)
#define each(itr,v) for(auto itr:v)
#define pb(s) push_back(s)
#define mp(a,b) make_pair(a,b)
#define all(x) (x).begin(),(x).end()
#define dbg(x) cout<<#x"="<<x<<endl
#define maxch(x,y) x=max(x,y)
#define minch(x,y) x=min(x,y)
#define uni(x) x.erase(unique(all(x)),x.end())
#define exist(x,y) (find(all(x),y)!=x.end())
#define bcnt(x) bitset<32>(x).count()

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> P;
typedef pair<P, int> PPI;
typedef pair<ll, ll> PL;
typedef pair<P, ll> PPL;

#define INF INT_MAX/3

#define MAX_N 1000

int w[10],k[10];

int main(){
	cin.sync_with_stdio(false);
	rep(i,10)cin>>w[i];
	rep(i,10)cin>>k[i];
	sort(w,w+10,greater<int>()); sort(k,k+10,greater<int>());
	int res=0,resb=0;
	rep(i,3)res+=w[i];
	rep(i,3)resb+=k[i];
	cout<<res<<" "<<resb<<endl;
	return 0;
}

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

int main(){
  int sum[2] = {0};

  for(int i = 0; i < 2; i++){
    int x[10];
    for(int j = 0; j < 10; j++){
      cin >> x[j];
    }
    sort(x, x + 10);
    sum[i] += x[9] + x[8] + x[7];
  }
  cout << sum[0] << " " << sum[1] << endl;
}

C++: #include <bits/stdc++.h>

using namespace std;

int getTotalScore(const multiset<int> &info) {
	int sum;
	multiset<int>::iterator curPos;
	
	sum = 0;
	curPos = info.begin();
	for (int i = 0; i < 3; ++i) {
		sum -= *curPos;
		++curPos;
	}

	return sum;
}

int main() {
	int score;
	multiset<int> scoreW, scoreK;
	
	for (int i = 0; i < 10; ++i) {
		cin >> score;
		scoreW.insert(-score);
	}
	for (int i = 0; i < 10; ++i) {
		cin >> score;
		scoreK.insert(-score);
	}	
	cout << getTotalScore(scoreW) << " " << getTotalScore(scoreK) << endl;

	return 0;
}