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;
#define all(x) (x).begin(),(x).end()
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define repr(i, n) for(int i = n; i >= 0; i++)
#define REP(i, m, n) for(int i = m; i < n; i++)
#define SORT(v) sort((v).begin(), (v).end())
#define REV(v) sort((v).begin(), (v).end(), greater<int>())
typedef long long ll;
int gcd(int a,int b){return b?gcd(b,a%b):a;};
int lcm(int a,int b){return a * b / gcd(a, b);};

int main() {
  int w[10], k[10];
  rep(i, 10) cin >> w[i];
  rep(i, 10) cin >> k[i];
  sort(w, w + 10, greater<int>());
  sort(k, k + 10, greater<int>());
  cout << w[0] + w[1] + w[2] << " " <<  k[0] + k[1] + k[2] << endl;
  return 0;
}

C++: #include <iostream>
#include <string>
#include <algorithm>
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 <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;

vi 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]<<endl<<a[17]+a[18]+a[19]<<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;
}

C++: #include <iostream>
#include <algorithm>
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);
	sort(k, k + 10);
	cout << w[7] + w[8] + w[9] << " " << k[7] + k[8] + k[9] << endl;
}

C++: #include <iostream>
#include <algorithm>
#include <vector>
#include <stack>
#include <queue>
#include <map>
#include <cmath>
#include <string>
#include <sstream>
#include <iomanip>
#include <complex>
using namespace std;

#define ll long long
#define vvi vector< vector<int> >
#define All(X) X.begin(),X.end()
#define FOR(i,a,b) for(int i=(int)(a);i<(int)(b);i++)
#define REP(i,n) for(int i=0;i<(int)(n);i++)
#define pb push_back 
ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
ll lcm(ll a,ll b){return a/gcd(a,b)*b;}

int main(){
	ll int d1,d2;
	int data[10];
	REP(i,10){
		cin >> data[i];
	}
	sort(data,data+10,greater<int>());
	d1 = data[0] + data[1] + data[2];
	REP(i,10){
		cin >> data[i];
	}
	sort(data,data+10,greater<int>());
	d2 = data[0] + data[1] + data[2];
	cout << d1 << " " << d2 << endl;
	return 0;
}

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

int main() {
	for (;;){
		int a[10];
		int b[10];
		for (int i = 0; i < 10; i++){
			cin >> a[i];
		}
		if (cin.eof()) break;
		sort(a, a + 10);
		cout << a[9] + a[8] + a[7] << " ";
		for (int i = 0; i < 10; i++){
			cin >> b[i];
		}
		sort(b, b + 10);
		cout << b[9] + b[8] + b[7] << endl;
	}
}

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



using namespace std;

int main(){
	int a[10];
	int b[10];
	cin>>a[1]>>a[2]>>a[3]>>a[4]>>a[5]>>a[6]>>a[7]>>a[8]>>a[9]>>a[10];
	cin>>b[1]>>b[2]>>b[3]>>b[4]>>b[5]>>b[6]>>b[7]>>b[8]>>b[9]>>b[10];
	sort(a,a+10);
	sort(b,b+10);
    int c=a[10]+a[9]+a[8];
	int d=b[10]+b[9]+b[8];
	cout<<max(c,d)<<endl;


	return 0;

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

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

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

C++: #include<iostream>
using namespace std;
int x[10][2],sum[2],c,d;
int main(){
for(int i=0;i<20;i++){cin>>x[i%10][i/10];}
for(int i=9999;i>=0;i--){if(c>=3){break;}
for(int j=0;j<10;j++){if(x[j][0]==i){c++;sum[0]+=x[j][0];}}}
for(int i=9999;i>=0;i--){if(d>=3){break;}
for(int j=0;j<10;j++){if(x[j][1]==i){d++;sum[1]+=x[j][1];}}}
cout<<sum[0]<<' '<<sum[1]<<endl;}

C++: #include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<iomanip>
#include<math.h>
#include<complex>
#include<queue>
#include<deque>
#include<stack>
#include<map>
#include<set>
#include<bitset>
#include<functional>
#include<assert.h>
#include<numeric>
#include<stdio.h>
#include <cstdint>
using namespace std;
#define REP(i,m,n) for(int i=(int)(m) ; i < (int) (n) ; ++i )
#define rep(i,n) REP(i,0,n)
using ll = long long;
const int inf = 1e9 + 7;
const ll longinf = 1LL << 60;
const ll mod = 1e9 + 7;

int w[10], k[10];

int main(){

	rep(i, 10)cin >> w[i];
	rep(i, 10)cin >> k[i];

	sort(w, w + 10);
	sort(k, k + 10);

	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(){
    for(int i=0; i<2; i++){
        int a[10];
        for(int j=0; j<10; j++){
            cin >> a[j];
        }
        sort(a, a+10);
        cout << a[9]+a[8]+a[7];
        if(i==0){
        	cout << " ";
        }else{
        	cout << endl;
        }
    }
    return 0;
}

C++: #include <iostream>
#include <algorithm>
using namespace std;
int main(){int n[20];for(int i=0;i<20;i++)cin>>n[i];sort(n,n+10);reverse(n,n+10);sort(n+11,n+20);reverse(n+11,n+20);cout<<(n[0]+n[1]+n[2])<<" "<<(n[10]+n[11]+n[12])<<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>
using namespace std;
int main() {
	int n, ans[3],m, dai[5];
	for (int x = 1; x <= 2; x++) {
		for (int i = 1; i <= 4; i++) {
			dai[i] = 0;
		}
		for (int i = 1; i <= 10; i++) {
			cin >> m;
			if (dai[1] <= m) {
				dai[3] = dai[2];
				dai[2] = dai[1];
				dai[1] = m;
				m = 0;
			}
			if (dai[2] <= m) {
				dai[3] = dai[2];
				dai[2] = m;
				m = 0;
			}
			if (dai[3] <= m) {
				dai[3] = m;
				m = 0;
			}
		}
		ans[x] = dai[1] + dai[2] + dai[3];
	}
	cout << ans[1] << " " << ans[2] << endl;
}