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 <fstream>
#include <typeinfo>
#include <vector>
#include <cmath>
#include <set>
#include <map>
#include <string>
#include <algorithm>
#include <cstdio>
#include <queue>
#include <iomanip>
#include <cctype>
#define syosu(x) fixed<<setprecision(x)
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
typedef pair<double,double> pdd;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<char> vc;
typedef vector<vc> vvc;
typedef vector<bool> vb;
typedef vector<vb> vvb;
typedef vector<P> vp;
typedef vector<vp> vvp;
typedef pair<int,P> pip;
typedef vector<pip> vip;
const int inf=1<<25;
const double pi=acos(-1);
const double eps=1e-10;
const vi emp;

vector<ll> a(20);

int main(){
	for(auto i=a.begin();i!=a.end();i++) cin>>*i;
	sort(a.begin(),a.begin()+10);
	sort(a.begin()+10,a.end());
	cout<<a[7]+a[8]+a[9]<<' '<<a[17]+a[18]+a[19]<<endl;
}

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

using namespace std;

int main()
{
	int a;
//	int w[10] = {0};
//	int k[10] = {0};
	
	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());
	
	printf("%d %d",w[9]+w[8]+w[7],k[9]+k[8]+k[7] );
	
	return 0;
}

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

int main() {
	int m = 0, W[10], T[10], i;
	for (i = 0; i<10; i++) {
		cin >> W[i];
	}
	sort(W, W + 10);
	for (i = 7; i<10; i++)
		m += W[i];
	cout << m << " ";
	m = 0;
	for (i = 0; i<10; i++) {
		cin >> T[i];
	}
	sort(T, T + 10);
	for (i = 7; i<10; i++)
		m += T[i];
	cout << m << endl;
}

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

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

C++: #include <cstdio>
#include <cstdlib>
#include <iostream>
#include <string>
#include <cmath>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <set>

typedef long long ll;

using namespace std;


int main(){
    int a[10],b[10];
    
    for(int i=0;i<10;i++)
        scanf("%d",&a[i]);
    sort(a,a+10);
    
    for(int i=0;i<10;i++)
        scanf("%d",&b[i]);
    sort(b,b+10);
    
    printf("%d %d\n",a[7]+a[8]+a[9],b[7]+b[8]+b[9]);
    
    return 0;
}

C++: #include <iostream>
#include <vector>
#include <string>
#include <algorithm>
int main(){
	int W[10],K[10];
	for(int i=0;i<10;i++){
		std::cin>>W[i];
	}
	for(int i=0;i<10;i++){
		std::cin>>K[i];
	}
	std::sort(W,W+10);
	std::sort(K,K+10);
	std::cout<<W[9]+W[8]+W[7]<<std::endl;
	std::cout<<K[9]+K[8]+K[7]<<std::endl;
}

C++: #include<iostream>
#include<algorithm>
#include<functional>
using namespace std;
int main(){
  int W[10],K[10],wsum,ksum,a=10,b=10;
  wsum=0,ksum=0;
  for(int i=0;i<10;i++){
    cin>>W[i];
  }for(int i=0;i<10;i++){
    cin>>K[i];
  }
  sort( W , W+a , greater<int>() );
  sort( K , K+b , greater<int>() );
  for(int i=0;i<10;i++){
    cout<<W[i]<<" "<<K[i]<<endl;
  }
  for(int i=0;i<3;i++){
    wsum+=W[i];
    ksum+=K[i];
  }
  cout<<wsum<<" "<<ksum<<endl;
  return 0;
}

C++: #include<iostream>
#include<algorithm>
#include<vector>
int main() {
	std::vector<int>w;
	std::vector<int>k;
	for (int i = 0; i < 10; ++i) {
		int num;
		std::cin >> num;
		w.push_back(num);
	}
	for (int i = 0; i < 10; ++i) {
		int num;
		std::cin >> num;
		k.push_back(num);
	}
	std::sort(w.begin(), w.end());
	std::sort(k.begin(), k.end());
	std::cout << w[9] + w[8] + w[7] << " " << k[9] + k[8] + k[7] << std::endl;
	return 0;
}

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

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

int main(void)
{
	vector<int> w, k;
	vector<int> max_w, max_k;
	
	w.resize(10);
	k.resize(10);
	max_w.resize(3);
	max_k.resize(3);
	
	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 < 3; i++){
		max_w[i] = *max_element(w.begin(), w.end());
		w.erase(find(w.begin(), w.end(), max_w[i]));
	}
	
	for (int i = 0; i < 3; i++){
		max_k[i] = *max_element(k.begin(), k.end());
		k.erase(find(k.begin(), k.end(), max_k[i]));
	}
	
	cout << max_w[0] + max_w[1] + max_w[2] << " " << max_k[0] + max_k[1] + max_k[2] << endl;
}

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

using namespace std;

int main(){
	vector<int> a(10);
	vector<int> b(10);
	for(int i=0;i<10;i++){
		cin >> a[i];
	}
	for(int i=0;i<10;i++){
		cin >> b[i];
	}
	sort(a.rbegin(),a.rend());
	cout << a[0] + a[1] + a[2] << " ";
	sort(b.rbegin(),b.rend());
	cout << b[0] + b[1] + b[2] << endl;
	
	return 0;
}

C++: #include<stdio.h>

int main(void)
{   
	int W_t[3];
	int K_t[3];
	int i,p,l,n,m;
    int K_p=0,W_p=0;

	for(i=0;i<3;i++){
		scanf("%d",&p);
		W_t[i]=p;		
	}
	for(i=3;i<10;i++){
		for(l=0;l<2;l++)
			for(m=l+1;m<3;m++){
				if(W_t[l]<W_t[m]){
					n=W_t[l];
					W_t[l]=W_t[m];
					W_t[m]=n;
				}
			}
			scanf("%d",&p);
			if(W_t[2]<p)
				W_t[2]=p;
	}
	for(i=0;i<3;i++){
		scanf("%d",&p);
		K_t[i]=p;		
	}
	for(i=3;i<10;i++){
		for(l=0;l<2;l++)
			for(m=l+1;m<3;m++){
				if(K_t[l]<K_t[m]){
					n=K_t[l];
					K_t[l]=K_t[m];
					K_t[m]=n;
				}
			}
			scanf("%d",&p);
			if(K_t[2]<p)
				K_t[2]=p;
	}
	for(i=0;i<3;i++){
		K_p+=K_t[i];
		W_p+=W_t[i];
	}
	printf("%d %d\n",W_p,K_p);
	return 0;
}

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

int main(){
	int W[10],K[10],p;
	for(int i = 0;i < 20;i++){
		std::cin>>p;
		if(i<10)W[i] = p;
		else{K[i-10] = p;}
	}
	std::sort(W,W+10,std::greater<int>());
	std::sort(K,K+10,std::greater<int>());
	int Wp = W[0] + W[1] + W[2],
		Kp = K[0] + K[1] + K[2];
	std::cout<<Wp<<" "<<Kp<<std::endl;
	return 0;
}

C++: #include<cstdio>
#include<algorithm>
using namespace std;
int main(){
    int w[10],k[10];
    for(int i = 0;i < 10; i++)scanf("%d",&w[i]);
    for(int i = 0;i < 10; i++)scanf("%d",&k[i]);
    
    sort(w,w+10);
    w[9] += w[8]+w[7];
    
    sort(k,k+10);
    k[9] += k[8]+k[7];
    
    printf("%d %d\n",w[9],k[9]);
    return 0;
}

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

int main(){
	int w[10], k[10], ansk =0, answ = 0;
	for(int i=0; i < 20; i++){
		if(i < 10) cin >> w[i];
		else cin >> k[i-10];
	}
	sort(w, w+10);
	sort(k, k+10);

	answ = w[7] + w[8] + w[9];
	ansk = k[7] + k[8] + k[9];

	cout << answ << ' ' << ansk << endl;
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main() {
	int a = 0, b = 0, a_sum[11] = { 0 }, b_sum[11] = { 0 };
	for (int i = 0; i < 10; i++) {
		cin >> a;
		a_sum[i] = a;
	}
	for (int j = 0; j < 10; j++) {
		cin >> a;
		b_sum[j] = a;
	}
	a = 0;
	sort(a_sum, a_sum + 10);
	sort(b_sum, b_sum + 10);
	/*for (int i = 0; i < 10; i++) {
		cout << a_sum[i] << "," << b_sum[i] << endl;
	}*/
	for (int i = 9; i >6; i--) {
		a += a_sum[i];
		b += b_sum[i];
	}
	cout << a << " " << b << endl;
}