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 <cstdio>
#include <iomanip>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <bitset>
#include <stack>
#include <utility>
#include <numeric>
#include <algorithm>
#include <functional>
#include <cctype>
#include <complex>
#include <string>
#include <sstream>
#include <cassert>
using namespace std;

//common
#define BR "\n"

#define ALL(c) (c).begin(),(c).end()
#define REP(i,n) for(int i=0;i<(int)(n);++i)
#define EACH(it,o) for(auto it = (o).begin(); it != (o).end(); ++it)
#define IN(l,v,r) ((l)<=(v) && (v)<(r))

typedef vector<int> vi; typedef pair<int,int> pii; typedef vector<pair<int,int> > vpii;
typedef long long ll; typedef vector<long long> vl; typedef pair<long long,long long> pll; typedef vector<pair<long long,long long> > vpll;
typedef vector<string> vs; typedef long double ld;

//config
#define MODE_DEBUG
//#define INF 1<<30
//#define EPS 1e-8
//const ll MOD =100000007;

//debug
#ifdef MODE_DEBUG
#define  DUMP(x)  cerr << #x << " = " << (x) <<endl
#define DEBUG(x) DUMP(x) << " (L" << __LINE__ << ")" << " " << __FILE__<<endl
#define CHECK(exp,act)  if(exp!=act){DUMP(exp);DEBUG(act);}
#define STOP(e)  CHECK(e,true);if(!(e)) exit(1);
#else
#define DUMP(x)
#define DEBUG(x)
#define CHECK(exp,act)
#define STOP(e)
#endif

template<class T> inline string toString(const vector<T>& x) {
	stringstream ss;
	REP(i,x.size()){
		if(i!=0)ss<<" ";
		ss<< x[i];
	}
	return ss.str();
}
template<class T> inline string toString(const vector<vector<T>>& map) {
	stringstream ss;
	REP(i,map.size()){
		if(i!=0)ss<<BR;
		ss<< toString(map[i]);
	}
	return ss.str();
}
template<class K,class V>  string toString(map<K,V>& x) {
	string res;stringstream ss;
	for(auto& p:x)ss<< p.first<<":" << p.second<<" ";
	return ss.str();
}

template<typename T,typename V> inline T mod(T v,V MOD){
	return (v%MOD+MOD)%MOD;
}

int encode(int h,int m,int s){
	return h*3600+m*60+s;
}
int getH(int t){
	return t/3600;
}
int getM(int t){
	return (t-getH(t)*3600)/60;
}
int getS(int t){
	return (t-getH(t)*3600-getM(t)*60)/1;
}

int main(){
	vector<int> w(10);
	REP(i,10)cin >> w[i];
	sort(ALL(w));
	vector<int> k(10);
	REP(i,10)cin >> k[i];
	sort(ALL(k));

	cout << w[7]+w[8]+w[9]<<" "<<k[7]+k[8]+k[9]<<endl;
	return 0;
}

C++: #include <bits/stdc++.h>
#define range(i, a, n) for(int (i) = (a); (i) < (n); (i)++)
#define rep(i, n) for(int (i) = 0; (i) < (n); (i)++)
using namespace std;
int main(void){
    vector<int> a(10), b(10);
    for(auto & e : a) cin >> e;
    for(auto & e : b) cin >> e;

    sort(begin(a), end(a), greater<int>());
    sort(begin(b), end(b), greater<int>());

    cout << a[0] + a[1] + a[2] << " " << b[0] + b[1] + b[2] << endl;

	return 0;
}

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

typedef long long ll;
typedef pair<int, int> P;
#define MOD 1000000007
#define INF (1 << 30)
#define REP(i, m, n) for(int i = (int)m; i < (int)n; ++i)
#define rep(i, n) REP(i, 0, n)


signed main() {
    ios::sync_with_stdio(false);
    cin.tie(0);

    vector<int> w(10);
    rep(i, 10) cin >> w[i];
    vector<int> k(10);
    rep(i, 10) cin >> k[i];
    sort(w.begin(), w.end());
    sort(k.begin(), k.end());

    cout << w[9]+w[8]+w[7] << " " << k[9]+k[8]+k[7] << '\n';
    return 0;
}

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

int main(){
  for(int j = 0; j < 2; j++){
    int t[10];

    for(int i = 0; i < 10; i++){
      cin >> t[i];
    }
    sort(t, t + 10, greater<int>());
    cout << t[0] + t[1] + t[2] << endl;
  }
}

C++: #include <stdio.h>
#include <iostream>
#include <math.h>

using namespace std;

int main() {
	int a1 = 0;
	int a2 = 0;
	int a3 = 0;
	int b1 = 0;
	int b2 = 0;
	int b3 = 0;
	int sum1 = 0;
	int sum2 = 0;
	int d;

	for (int i = 0; i < 10; i++) {
		cin >> d;
		a3 = max(a3,d);
		if (a2 < a3) {
			a3 = a2;
			a2 = d;
			if (a1 < a2) {
				a2 = a1;
				a1 = d;
			}
		}

	}

	sum1 = a1 + a2 + a3;

	for (int j = 0; j < 10; j++) {
		cin >> d;
		b3 = max(b3,d);
		if (b2 < b3) {
			b3 = b2;
			b2 = d;
			if (b1 < b2) {
				b2 = b1;
				b1 = d;
			}
		}
	}

	sum2 = b1 + b2 + b3;

	cout << sum1 << " " << sum2 << endl;

	return 0;
}

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

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

C++: #include <iostream>
#include <cstdio>
#include <string>
#include <algorithm>
 
//#define PI 3.141592653589
 
using namespace std;
 
 
 
int main()
{
    int w_score[10];
    int k_score[10];
    int w_sum, k_sum;
     
    for (int i=0; i<10; i++)
    {
        cin >> w_score[i];
    }
    for (int i=0; i<10; i++)
    {
        cin >> k_score[i];
    }
     
    sort(w_score, w_score+10);
    sort(k_score, k_score+10);
    w_sum = w_score[9] + w_score[8] + w_score[7];
    k_sum = k_score[9] + k_score[8] + k_score[7];
     
    cout << w_sum << " " << k_sum << endl;
     
    /*
    for (int i=0; i<10; i++)
    {
        cout << w_score[i] << endl;
    }
    */
     
     
    return 0;
}

C++: #include<iostream>
#include<algorithm>
#include<set>
#include<map>
#include<vector>
#include<queue>
#include<cstring>
#include<cmath>
#include<cstdio>
#include<cstdlib>
using namespace std;
#define REP(i,a,n) for(int i = a ; i < n ; i++)
#define rep(i,n) REP(i,0,n)

typedef long long ll;

void solve(){
}

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

C++: #include<iostream>
using namespace std;
int main(){
  int total[2],bell[10],hess[10],top1[3]={0},top2[3]={0};
  for(int i=0;i<10;i++){
    cin >> bell[i];
    if(bell[i]>=top1[0]){
      top1[2]=top1[1];
      top1[1]=top1[0];
      top1[0]=bell[i];
    }
    else if(bell[i]>=top1[1]){
     top1[2]=top1[1];
     top1[1]=bell[i];
    }
    else if(bell[i]>top1[2]){
      top1[2]=bell[i];
    }
  }
  for(int i=0;i<10;i++){
    cin >> hess[i];
    if(hess[i]>=top2[0]){
      top2[2]=top2[1];
      top2[1]=top2[0];
      top2[0]=hess[i];
    }
    else if(hess[i]>=top2[1]){
     top2[2]=top2[1];
     top2[1]=hess[i];
    }
    else if(hess[i]>top2[2]){
      top2[2]=hess[i];
    }
  }
  total[0]=top1[0]+top1[1]+top1[2];
  total[1]=top2[0]+top2[1]+top2[2];
  cout << total[0] << " " << total[1] << endl;
  return (0);
}

C++: #include <stdio.h>
#include <stdlib.h>

using namespace std;

int main() {
	int w[10],k[10];
	int i,j,p,q,t,s;
	int wsum=0,ksum=0,swap;
	for(i=0;i<10;i++) {
		scanf("%d\n",&w[i]);
	}
	for(t=0;t<10;t++){
		for(j=0;j<10;j++){
			if (w[j]>w[j+1]) {
				swap=w[j];
				w[j]=w[j+1];
				w[j+1]=swap;
			}
		}
	}
	wsum=w[9]+w[8]+w[7];
	for(p=0;p<10;p++){
		scanf("%d\n",&k[p]);
	}
	for(s=0;s<10;s++){
		for(q=0;q<10;q++){
			if (k[q]>k[q+1]) {
				swap=k[q];
				k[q]=k[q+1];
				k[q+1]=swap;
			}
		}
	}

		ksum=k[9]+k[8]+k[7];
		printf("%d %d\n",wsum,ksum);
		return 0;
	}