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<string>
#include<cstring>
using namespace std;
int main()
{	
	int num1=0,num2=0,num3=0,num4=0,num5=0,num6=0,num7=0,num8=0,num9=0,num10=0,num11=0,num12=0,num13=0,num14=0,num15=0,num16=0,num17=0,num18=0,num19=0,num20=0,num21=0,num22=0,r=0;
	
	cin>>num1>>num2>>num3>>num4>>num5>>num6>>num7>>num8>>num9>>num10>>num11>>num12>>num13>>num14>>num15>>num16>>num17>>num18>>num19>>num20;
	if(num1<num2){
		r=num1;
		num1=num2;
		num2=r;
	}
	if(num1<num3){
		r=num1;
		num1=num3;
		num3=r;
	}
	if(num1<num4){
		r=num1;
		num1=num4;
		num4=r;
	}
	if(num1<num5){
		r=num1;
		num1=num5;
		num5=r;
	}
	if(num1<num6){
		r=num1;
		num1=num6;
		num6=r;
	}
	if(num1<num7){
		r=num1;
		num1=num7;
		num7=r;
	}
	if(num1<num8){
		r=num1;
		num1=num8;
		num8=r;
	}
	if(num1<num9){
		r=num1;
		num1=num9;
		num9=r;
	}
	if(num1<num10){
		r=num1;
		num1=num10;
		num10=r;
	}
	if(num2<num3){
		r=num2;
		num2=num3;
		num3=r;
	}
	if(num2<num4){
		r=num2;
		num2=num4;
		num4=r;
	}
	if(num2<num5){
		r=num2;
		num2=num5;
		num5=r;
	}
	if(num2<num6){
		r=num2;
		num2=num6;
		num6=r;
	}
	if(num2<num7){
		r=num2;
		num2=num7;
		num7=r;
	}
	if(num2<num8){
		r=num2;
		num2=num8;
		num8=r;
	}
	if(num2<num9){
		r=num2;
		num2=num9;
		num9=r;
	}
	if(num2<num10){
		r=num2;
		num2=num10;
		num10=r;
	}
	if(num3<num4){
		r=num3;
		num3=num4;
		num4=r;
	}
	if(num3<num5){
		r=num3;
		num3=num5;
		num5=r;
	}
	if(num3<num6){
		r=num3;
		num3=num6;
		num6=r;
	}
	if(num3<num7){
		r=num3;
		num3=num7;
		num7=r;
	}
	if(num3<num8){
		r=num3;
		num3=num8;
		num8=r;
	}
	if(num3<num9){
		r=num3;
		num3=num9;
		num9=r;
	}
	if(num3<num10){
		r=num3;
		num3=num10;
		num10=r;
	}
	if(num11<num12){
		r=num11;
		num11=num12;
		num12=r;
	}
	if(num11<num13){
		r=num11;
		num11=num13;
		num13=r;
	}
	if(num11<num14){
		r=num11;
		num11=num14;
		num14=r;
	}
	if(num11<num15){
		r=num11;
		num11=num15;
		num15=r;
	}
	if(num11<num16){
		r=num11;
		num11=num16;
		num16=r;
	}
	if(num11<num17){
		r=num11;
		num11=num17;
		num17=r;
	}
	if(num11<num18){
		r=num11;
		num11=num18;
		num18=r;
	}
	if(num11<num19){
		r=num11;
		num11=num19;
		num19=r;
	}
	if(num11<num20){
		r=num11;
		num11=num20;
		num20=r;
	}
	if(num12<num13){
		r=num12;
		num12=num13;
		num13=r;
	}
	if(num12<num14){
		r=num12;
		num12=num14;
		num14=r;
	}
	if(num12<num15){
		r=num12;
		num12=num1;;
		num15=r;
	}
	if(num12<num16){
		r=num12;
		num12=num16;
		num16=r;
	}
	if(num12<num17){
		r=num12;
		num12=num17;
		num17=r;
	}
	if(num12<num18){
		r=num12;
		num12=num18;
		num18=r;
	}
	if(num12<num19){
		r=num12;
		num12=num19;
		num19=r;
	}
	if(num12<num20){
		r=num12;
		num12=num20;
		num20=r;
	}
	if(num13<num14){
		r=num13;
		num13=num14;
		num14=r;
	}
	if(num13<num15){
		r=num13;
		num13=num15;
		num15=r;
	}
	if(num13<num16){
		r=num13;
		num13=num16;
		num16=r;
	}
	if(num13<num17){
		r=num13;
		num13=num17;
		num17=r;
	}
	if(num13<num18){
		r=num13;
		num13=num18;
		num18=r;
	}
	if(num13<num19){
		r=num13;
		num13=num19;
		num19=r;
	}
	if(num13<num20){
		r=num13;
		num13=num20;
		num20=r;
	}
	num21=num1+num2+num3;
	num22=num11+num12+num13;
	cout<< num21 <<" "<< num22 <<"\n";
	return 0;
}

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

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, greater<int>());
    sort(K, K+10, greater<int>());
    cout << W[0] + W[1] + W[2] << ' ';
    cout << K[0] + K[1] + K[2] << endl;
    return 0;
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
bool mp(const int &x,const int &y){
	return x>y;
}
int main(){
	int x[10],y[10];
	for(int i=0;i<10;i++)
	cin>>x[i];
	for(int i=0;i<10;i++)
	cin>>y[i];
	sort(x,x+10,mp);
	sort(y,y+10,mp);
	cout<<x[0]+x[1]+x[2]<<' '<<y[0]+y[1]+y[2]<<endl;
	return 0;
}

C++: #include<stdio.h>
#include<algorithm>
#define rep(i,j) for(int i=0;i<(j);i++)
#define reps(i,j,k) for(int i=j;i<=k;i++)

using namespace std;

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

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

int w[10],k[10];

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

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

using namespace std;

int main(){
	int waseda[10];
	int keo[10];
	for(int i = 0; i < 10; i++){
		cin >> waseda[i];
	}
	for(int i = 0; i < 10; i++){
		cin >> keo[i];
	}
	sort(waseda,waseda+10,greater<int>());
	sort(keo,keo+10,greater<int>());

	int sumW=0;
	int sumK=0;
	for(int i = 0; i < 3; i++){
		sumW += waseda[i];
		sumK += keo[i];
	}
	cout << sumW << " " << sumK << endl;

	return 0;
}

C++: #include<cstdio>
#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
    int a[20],b[20],aa,bb;
    for(int i=0;i<10;i++)cin>>a[i];
    for(int i=0;i<10;i++)cin>>b[i];
    sort(a,a+10);
    reverse(a,a+10);
    sort(b,b+10);
    reverse(b,b+10);
    cout<<a[0]+a[1]+a[2]<<" ";
    cout<<b[0]+b[1]+b[2]<<endl;
    return 0;
}

C++: #include <stdio.h>
#include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <list>
#include <map>
#include <string>
#include <functional>
#include <math.h>
#include <utility>
#define INF 100000000
using namespace std;
typedef pair<int,int> P;
int W[10],K[10];
int main()
{
	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>());
	int aW=W[0]+W[1]+W[2];
	int aK=K[0]+K[1]+K[2];
	printf("%d %d\n",aW,aK);
	return 0;
}

C++: #include<iostream>
#include<cstdio>
#include<algorithm>
using namespace std;
int main(){
    int W[11]={0},K[11]={0},wall=0,kall=0;
    for(int i=0;i<10;i++){
        cin>>W[i];
    }
    sort(W,W+10);
    reverse(W,W+10);
    for(int i=0;i<10;i++){
            cin>>K[i];
        }
        sort(K,K+10);
        reverse(K,K+10);
    for(int i=0;i<3;i++){
        wall+=W[i];
        kall+=K[i];
    }
    cout<<wall<<" "<<kall<<endl;
}

C++: #include <algorithm>
#include <iostream>
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 <algorithm>
#include <cstdio>
#include <iostream>
#include <map>
#include <cmath>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#include <stdlib.h>
#include <stdio.h>
#include <bitset>
using namespace std;
#define FOR(I,A,B) for(int I = (A); I < (B); ++I)
typedef long long ll;

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