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>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <string>
#include <cstring>
#include <vector>
#include <queue>
#include <stack>
#include <deque>
#include <map>
#include <set>
#include <bitset>
#include <limits>
typedef long long ll;
#define REP(i,n)   for(int i=0; i<(int)(n); ++i)
#define FOR(i,b,e) for(int i=(b); i<=(int)(e); ++i)

#define in cin
#define out cout
#define pb push_back
using namespace std;

int main(){
	int a[10], b[10];
	REP(i, 10)in >> a[i];
	REP(i, 10)in >> b[i];
	sort(a, a + 10);
	sort(b, b + 10);
	int w = a[7] + a[8] + a[9];
	int k = b[7] + b[8] + b[9];
	out << w << " " << k << endl;
	return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
	int a[10];
	int b[10];
	int s[2];
	int i=0;
	int j=0;
	int n=10;
	int k=0;
	
	s[1]=0;
	s[0]=0;
	for(i=0;i<10;i++){
		cin>>a[i];
	}
	for(i=0;i<10;i++){
		cin>>b[i];
	}
	for(i=0;i<3;i++){
		for(j=0;j<n;j++){
			if(a[k]<a[j]){
				k=j;
			}
		}
		s[0]=s[0]+a[k];
		n=n-1;
		for(j=k;j<n;j++){
			a[j]=a[j+1];
		}
		k=0;
	}
	n=10;
	for(i=0;i<3;i++){
		for(j=0;j<n;j++){
			if(b[k]<b[j]){
				k=j;
			}
		}
		s[1]=s[1]+b[k];
		n=n-1;
		for(j=k;j<n;j++){
			b[j]=b[j+1];
		}
		k=0;
	}
	cout<<s[0]<<" "<<s[1]<<endl;
}

C++: #include<stdio.h>
int main(void)
{
	int w[10],k[10];
	int i,j;
	int s,s1;
	int temp;
	for(i=0;i<10;i++){
		scanf("%d",&w[i]);
	}
	for(i=0;i<10;i++){
		scanf("%d",&k[i]);
	}
		for(i=0;i<9;i++){
			for(j=i+1;j<10;j++){
				if(w[i]<w[j]){
				temp=w[i];
				w[i]=w[j];
				w[j]=temp;
				}
			}
		}
			s=w[0]+w[1]+w[2];
		for(i=0;i<9;i++){
			for(j=i+1;j<10;j++){
				if(k[i]<k[j]){
				temp=k[i];
				k[i]=k[j];
				k[j]=temp;
				}
			}
		}
			s1=k[0]+k[1]+k[2];
	printf("%d %d",s,s1);
	return 0;
}

C++: #include <iostream>
#include <algorithm>
using namespace std;
 
int main() {
 int a[20];
 for (int i = 0;i <= 19;i++){
 	cin >> a[i];
 }
 int w = 0;int k = 0;
 for(int i = 3;i <= 9;i++){
 int p = a[i];
 for(int ii =0;ii <= 2;ii++){
 	if(p > a[ii]){
 		swap(a[ii],p);
 	}
 }
 }
w = a[0] + a[1] + a[2];
for(int i = 13;i <= 19;i++){
 int p = a[i];
 for(int ii =10;ii <= 12;ii++){
 	if(p > a[ii]){
 		swap(a[ii],p);
 	}
 }
 }
 k = a[10] + a[11] + a[12];
 cout << w <<" " << k << endl;
	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]<<" "<<K[9]+K[8]+K[7]<<std::endl;
}

C++: #include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cctype>
#include <vector>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <cstring>
#include <string>
#include <sstream>
#include <algorithm>
#include <iomanip>
using namespace std;

typedef vector<int> VI;
typedef vector<VI> VII;
typedef pair<int, int> PII;
typedef long long ll;

#define ALL(a) (a).begin(), (a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back;
#define MP make_pair
#define SIZE(a) int((a).size())
#define SORT(c) sort((c).begin(), (c).end())

const double EPS = 1e-10;
const double PI = acos(-1.0);
const int INF = INT_MAX / 3;

int dx[4] = {-1, 0, 1, 0}, dy[4] = {0, -1, 0, 1};

#define dump(x)  cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;

int main(void){
  int w[10], k[10], ws, ks;
  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>());
  ws = w[0] + w[1] + w[2];
  ks = k[0] + k[1] + k[2];
  cout << ws << " " << ks << endl;
  return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <array>
#include <functional>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stdlib.h>
#include <string>
#include <vector>

#define INF 1000000000
#define MOD 1000000007
#define ll long long
#define rep(i,a,b) for(int i = (a); i < (b); i++)
#define bitget(a,b) (((a) >> (b)) & 1)
#define vint vector<int>
#define vvint vector<vector<int>>
#define vsort(x) sort(x.begin(),x.end())

using int64 = ll;

using namespace std;
int amin(int* array, int length) {
	int ret = INF;
	rep(i, 0, length)
		ret = min(ret, array[i]);
	return ret;
}
template<typename T>
void acin(T* array, int length){
	rep(i, 0, length){
		cin >> array[i];
	}
}
int main() {
	vint w(10), k(10);
	rep(i, 0, 10)
		cin >> w[i];
	rep(i, 0, 10)
		cin >> k[i];
	vsort(w);
	vsort(k);
	cout << w[9] + w[8] + w[7] << " " << k[9] + k[8] + k[7] << endl;

	return 0;
}

C++: #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main(){
  int n = 10;
  vector<int> a(n,0);
  vector<int> b(n,0);
  for(int i = 0;i < n;i++){
    cin >> a[i];
  }
  for(int i = 0;i < n;i++){
    cin >> b[i];
  }
  sort(a.begin(),a.end());
  sort(b.begin(),b.end());
  int sum_a = 0;
  int sum_b = 0;
  for(int i = n-1;i > n-4;i--){
    sum_a += a[i];
    sum_b += b[i];
  }
  cout << sum_a << " " << sum_b << 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);
  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 <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>
using namespace std;

int main(){
int a[10];
int b[10];
int c;
int d;
int e;
int f;
int g;
int h;
int i;
c=0;
d=0;
e=0;
f=0;
g=0;
h=0;
i=0;
while(i<10){
cin >> a[i];
i=i+1;}
i=0;
while(i<10){
cin >> b[i];
i=i+1;}
i=0; 
while(i<10){
if(c<a[i]){e=d;d=c;c=a[i];}
else if(d<a[i]){e=d;d=a[i];}
else if(e<a[i]){e=a[i];}
if(f<b[i]){h=g;g=f;f=b[i];}
else if(g<b[i]){h=g;g=b[i];}
else if(h<b[i]){h=b[i];}
i=i+1;}
cout << c+d+e;
cout << " ";
cout << f+g+h;}

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

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

C++: #include<stdio.h>
#include<algorithm>
int main()
{
	int a[10],i=2,j,x;
	while(i--){for(j=0;j<10;++j)scanf("%d",&a[j]);std::sort(a,a+j);x=a[9]+a[8]+a[7];printf("%d%c",x,i?' ':'\n');}
	return 0;
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main(){
  int W[10],K[10];
  int score1=0,score2=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);

  for(int i=9;i>6;i--){
    score1+=W[i];}
  cout <<score1<<" ";
  for(int i=9;i>6;i--){
   score2+=K[i];}
  cout <<score2<<endl;
  return 0;
}