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<algorithm>
using namespace std;

bool f(int x,int y){if(x>=y)return true; return false;}

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,f); sort(K,K+10,f);
	printf("%d %d\n",W[0]+W[1]+W[2],K[0]+K[1]+K[2]);
}

C++: #define _USE_MATH_DEFINES
#define INF 100000000
#include <iostream>
#include <sstream>
#include <cmath>
#include <cstdlib>
#include <algorithm>
#include <queue>
#include <stack>
#include <limits>
#include <map>
#include <string>
#include <cstring>
#include <set>
#include <deque>
#include <bitset>
#include <list>

using namespace std;

typedef long long ll;
typedef pair <int,int> P;

static const double EPS = 1e-8;

int main(){
	int p1[10],p2[10];
	for(int i=0;i<2;i++){
		for(int j=0;j<10;j++){
			if(i==0) scanf("%d",p1+j);
			else scanf("%d",p2+j);
		}
	}

	sort(p1,p1+10,greater<int>());
	sort(p2,p2+10,greater<int>());
	printf("%d %d\n",p1[0]+p1[1]+p1[2],p2[0]+p2[1]+p2[2]);
}

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

int main(){
	int a[20],max=0,sum1=0,sum2=0,k;
	
	for(int i=0;i<20;i++){
		cin >> a[i];
	}
	for(int j=0;j<3;j++){
		for(int i=0;i<10;i++){
			if(max<a[i]){
				max=a[i];
				k=i;
			}
		}
		sum1+=max;
		max=0;
		a[k]=0;
	}
	for(int j=0;j<3;j++){
		for(int i=10;i<20;i++){
			if(max<a[i]){
				max=a[i];
				k=i;
			}
		}
		sum2+=max;
		max=0;
		a[k]=0;
	}
	cout << sum1 << ' ' << sum2 << endl;
}

C++: #include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <fstream>
#include <complex>
#include <stack>
#include <queue>

using namespace std;
typedef long long LL;
typedef pair<int, int> P;
static const double EPS = 1e-5;

#define FOR(i,k,n) for (int i=(k); i<(int)(n); ++i)
#define REP(i,n) FOR(i,0,n)

int main(void){
  int ten[10];
  int a1,a2;
  REP(i,10){
    cin>>ten[i];
  }
  sort(ten,ten+10);
  a1=ten[9]+ten[8]+ten[7];
  REP(i,10){
    cin>>ten[i];
  }
  sort(ten,ten+10);
  a2=ten[9]+ten[8]+ten[7];
  printf("%d %d\n",a1,a2);
  return 0;
}

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

using namespace std;

int main()
{
	int w[10], k[10];
	int w_sum, k_sum;
	
	w_sum = k_sum = 0;
	
	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);
	reverse(w, w + 10);
	reverse(k, k + 10);
	
	for (int i = 0; i < 3; i++){
		w_sum += w[i];
		k_sum += k[i];
	}
	
	cout << w_sum << ' ' << k_sum << endl;
	
	return (0);
}

C++: #include <iostream>
using namespace std;
int main(void)
{
	int a,b,c[101]={0},d,e,f;
	for (a=0;a<10;a++)
	{
		cin>>b;
		c[b]=1;
	}
	d=0;
	e=0;
	for (a=100;a>=0;a--)
	{
		if (c[a]==1&&d!=3)
		{
			e=e+a;
			d++;
		}
	}
	c[101]={0};
	for (a=0;a<10;a++)
	{
		cin>>b;
		c[b]=1;
	}
	d=0;
	f=0;
	for (a=100;a>=0;a--)
	{
		if (c[a]==1&&d!=3)
		{
			f=f+a;
			d++;
		}
	}
	cout<<e<<" "<<f<<endl;
	return 0;
}

C++: #include <iostream>
#include <algorithm>
using namespace std;
int main(void)
{
  int wc[10], wsum=0, kc[10], ksum=0;
  
  for(int i = 0 ; i < 10 ; i++) {
    cin >> wc[i];
  }
  for(int i = 0 ; i < 10 ; i++) {
    cin >> kc[i];
  }
  sort(wc, wc+10);
  sort(kc, kc+10);
  
  for(int i = 9 ; i > 6 ; i--) {
    wsum += wc[i];
    ksum += kc[i];
  }
  cout << wsum << ' ' << ksum << endl;
  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 << " ";
    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 w[10];
	int k[10];
	int w_point = 0;
	int k_point = 0;

	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);

	w_point = w[9]+w[8]+w[7];
	k_point = k[9]+k[8]+k[7];

	cout << w_point << " ";
	cout << k_point << endl;

	return 0;
}

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

int main() {
	array<array<int,10>,2> ar;
	for(int i = 0; 2 > i; i++){
		for(int j = 0; 10 > j; j++){
			scanf("%d\n", &ar[i][j]);
		}
		sort(ar[i].begin(), ar[i].end(), [](int a, int b){return a > b;});
	}
	printf("%d %d\n", accumulate(ar[0].begin(), ar[0].begin()+3, 0), accumulate(ar[1].begin(), ar[1].begin()+3, 0));
	return 0;
}

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

using namespace std;

int main() {
    for(int i = 0; i < 2; ++i) {
        vector<int> v;
        for(int j = 0; j < 10; ++j) {
            int n;
            cin >> n;
            v.push_back(n);
        }
        sort(v.begin(), v.end());
        reverse(v.begin(), v.end());
        cout << v[0]+v[1]+v[2] << (i==0?' ':'\n');
    }
    return 0;
}

C++: #include<cstdio>
#include<iostream>
using namespace std;
int s[21],w[11],k[11];
int main()
{
	int i,j,n,m,l;
	for(i=1;i<=20;i++)cin>>s[i];
	for(i=1;i<=10;i++)
	{
		for(j=1;j<=10-i;j++)
		{
			if(s[j]<s[j+1])
			{
				l=s[j];
				s[j]=s[j+1];
				s[j+1]=l;
			}
		}
		for(j=11;j<=20-i;j++)
		{
			if(s[j]<s[j+1])
			{
				l=s[j];
				s[j]=s[j+1];
				s[j+1]=l;
			}
		}
	}
	n=s[1]+s[2]+s[3];
	m=s[11]+s[12]+s[13];
	cout<<n<<" "<<m<<endl;
	return 0;
}

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

int main() {
  int w[3]={0}, k[3]={0};
  for(int i=0; i<10; i++) {
    int data;
    cin >> data;
    if( w[0] <= data ) {
      w[2] = w[1];
      w[1] = w[0];
      w[0] = data;
    }
    else if( w[1] <= data ) {
      w[2] = w[1];
      w[1] = data;
    }
    else if( w[2] <= data ) {
      w[2] = data;
    }
  }

  for(int i=0; i<10; i++) {
    int data;
    cin >> data;
    if( k[0] <= data ) {
      k[1] = k[0];
      k[2] = k[1];
      k[0] = data;
    }
    else if( k[1] <= data ) {
      k[2] = k[1];
      k[1] = data;
    }
    else if( k[2] <= data ) {
      k[2] = data;
    }
  }

  cout << w[0]+w[1]+w[2] << " " << k[0]+k[1]+k[2] << endl;
}

C++: #include<iostream>
#include<string>
#include<algorithm>
#include<functional>
#include<cstring>
#include<set>
#include<map>
#include<vector>
#include<cmath>
#include<queue>
#include<cstdio>
#include<cstdlib>
#define reep(n1,n2,n3) for(int n1=n3;n1<n2;n1++)
#define rep(n1,n2) reep(n1,n2,0)
#define pb push_back
#define mp make_pair
#define fr first
#define sc second
#define INF 1e9
using namespace std;
typedef long long int lint;
typedef long double ld;
typedef vector<int> vi;
typedef vector<vector<int> > vvi;
typedef vector<pair<int,int> > vp;
typedef pair<int,int> pi;
typedef pair<int,pair<int,int> > pii;
typedef vector<string> vs;
const double PI  = acos(-1.0);
int main(){
    int w[10],k[10];
    rep(i,10)cin>>w[i];
    rep(i,10)cin>>k[i];
    sort(w,w+10);
    sort(k,k+10);
    cout<<w[7]+w[8]+w[9]<<" "<<k[7]+k[8]+k[9]<<endl;
}