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<stdio.h>
int main(void)
{
	int w[10],k[10];
	int i,j,temp;
	int wm,km;
	for(i=0;i<10;i++){
		scanf("%d",&w[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;
			}
		}
	}
	wm=w[0]+w[1]+w[2];
	
	for(i=0;i<10;i++){
		scanf("%d",&k[i]);
	}
	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;
			}
		}
	}
	km=k[0]+k[1]+k[2];
	
	printf("%d %d",wm,km);
	return 0;
}

C++: #include <iostream>
#include <algorithm>
using namespace std;
int main(){
	int a[10],b[10];
	for(int i=0;i<10;i++){
		cin>>a[i];
	   }
	for(int j=0;j<10;j++){
		cin>>b[j];
	   }
	sort(a,a+10);
	sort(b,b+10);
	cout<<a[7]+a[8]+a[9]<<" "<<b[7]+b[8]+b[9]<<endl;
	return 0;
	}

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

using namespace std;

int main(){
    vector<int> w(10);
    vector<int> k(10);
    for(int i = 0; i < 10; i++){
        cin >> w[i];
    }
    for(int i = 0; i < 10; i++){
        cin >> k[i];
    }
    sort(w.begin(), w.end(), greater<int>());
    sort(k.begin(), k.end(), greater<int>());
    cout << w[0] + w[1] + w[2] << " " << k[0] + k[1] + k[2] << endl;
    return 0;
}

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

#define times(n, i)      uptil(0, n, i)
#define upto(f, t, i)    for(decltype(t) _##i = (t), i = (f); i <= _##i; i++)
#define uptil(f, t, i)   for(decltype(t) _##i = (t), i = (f); i < _##i; i++)
#define downto(f, t, i)  for(decltype(t) _##i = (t), i = (f); i >= _##i; i--)
#define downtil(f, t, i) for(decltype(t) _##i = (t), i = (f); i > _##i; i--)
#define unless(c) if(!(c))
#define until(c) while(!(c))
#define loop while(true)

#define all(v) v.begin(), v.end()
#define ln << "\n"

struct line{};

template<class T> istream& operator>>(istream& in, vector<T>& v) {
    times(v.capacity(), i) in >> v[i];
    return in;
}

template<class T> const ostream& operator<<(ostream& out, const vector<T>& v) {
    times(v.size(), i) out << (i ? " " : "") << v[i];
    return out;
}

template<class T, class...U> typename enable_if<is_same<T, line>::value, string>::type next(istream& in, const U&... args) {
    string s;
    getline(in, s, args...);
    return move(s);
}

template<class T, class...U> typename enable_if<!is_same<T, line>::value, T>::type next(istream& in, const U&... args) {
    T t(args...);
    in >> t;
    return move(t);
}
template<class T, class...U> auto next(const U&... args) -> decltype(next<T>(cin)) {
    return next<T>(cin, args...);
}

template<class T> T sum(const vector<T>& v) {
    T ans = T();
    for(const T& t : v) ans += t;
    return ans;
}

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

    times(2, i) {
        auto a = next<vector<int>>(10);
        sort(all(a));
        cout << a[7] + a[8] + a[9] << (i ? '\n' : ' ');
    }

    return 0;
}

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

int main(){
	std::vector<int> waseda,keiou;
	int buffer;
	int waseda_point,keiou_point;
	for(int i=0;i<10;i++){
		std::cin >> buffer;
		waseda.push_back(buffer);
	}
	for(int j=0;j<10;j++){
		std::cin >> buffer;
		keiou.push_back(buffer);
	}
	
	std::sort(waseda.begin(),waseda.end(),std::greater<int>());
	waseda_point = waseda[0] + waseda[1] + waseda[2];
	std::sort(keiou.begin(), keiou.end() , std::greater<int>());
	keiou_point = keiou[0] + keiou[1] + keiou[2];
	std::cout << waseda_point << ' ' << keiou_point << std::endl;
	return 0;
}

C++: #include<algorithm>
#include<iostream>
#include<functional>
using namespace std;
int main(){
int i,t[20];
for(i=0;i<20;i++){
cin>>t[i];
}
sort(t,t+10,greater<int>());
sort(t+10,t+20,greater<int>());
cout<<t[0]+t[1]+t[2]<<" "<<t[10]+t[11]+t[12]<<endl;
return 0;
}

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

using namespace std;


int main(void){

	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<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\n",s,s1);
	return 0;
}

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

int main(){
    vector<int> w, k;
    int b;
    for (int i = 0; i < 10; i++){
	cin >> b;
	w.push_back(b);
    }
    for (int i = 0; i < 10; i++){
	cin >> b;
	k.push_back(b);
    }

    sort(w.begin(), w.end(), greater<int>());
    sort(k.begin(), k.end(), greater<int>());
    int ww = 0, kk = 0;
    for (int i = 0; i < 3; i++) ww += w[i];
    for (int i = 0; i < 3; i++) kk += k[i];

    cout << ww << " " << kk << endl;
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main()
{
	unsigned int inW[9] = {};
	unsigned int inK[9] = {};
	for (int i = 0; i < 9; i++){
		cin >> inW[i];
	}
	for (int i = 0; i < 9; i++){
		cin >> inK[i];
	}
	sort(inW, inW + 9);
	sort(inK, inK + 9);
	unsigned int sumw = inW[0] + inW[1] + inW[2];
	unsigned int sumk = inK[0] + inK[1] + inK[2];
	cout << sumw << sumk << endl;
	return 0;
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main(){
	int a[11],b[11];
	for(int i=0;i<10;i++){
		cin>>a[i];
	}
	sort(a,a+10);
	for(int i=0;i<10;i++){
		cin>>b[i];
	}
	sort(b,b+10);
	cout<<a[9]+a[8]+a[7]<<" "<<b[9]+b[8]+b[7]<<endl;
}

C++: #include <bits/stdc++.h>

using namespace std;

int main(void) {
    int w[10], k[10], W = 0, K = 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, greater<int>());
    sort(k, k + 10, greater<int>());
    
    for (int i = 0; i < 3; i++) {
        W += w[i];
        K += k[i];
    }
    cout << W << " " << K << endl;

    return 0;
}

C++: #include <bits/stdc++.h>

using namespace std;

#define FOR(i, j, k) for(int i = j; i < k; ++i)
#define rep(i, j) FOR(i, 0, j)
#define repr(i, j) for(int i = j; i >= 0; --i)
#define INF (1 << 30)
#define MOD 1e9 + 7

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

int main() {
	int point[10];
	rep(i, 10) scanf("%d", &point[i]);
	sort(point, point + 10);
	reverse(point, point + 10);
	int W = point[0] + point[1] + point[2];
	rep(i, 10) scanf("%d", &point[i]);
	sort(point, point + 10);
	reverse(point, point + 10);
	int K = point[0] + point[1] + point[2];
	printf("%d %d\n", W, K);
	return 0;
}

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

int main() {
	int pW[10], pK[10], W, K;
	for(int a=0; a<10; a++)
		cin >> pW[a];
	for(int b=0; b<10; b++)
		cin >> pK[b];
	for(int j=0; j<10; j++){
		int v0 = pW[j];
		int k = j-1;
		while(k>=0 && v0>pW[k]){
			pW[k+1] = pW[k];
			k--;
			pW[k+1] = v0;
		}
	}
	for(int l=0; l<10; l++){
		int v1 = pK[l];
		int m = l-1;
		while(m>=0 && v1>pK[m]){
			pK[m+1] = pK[m];
			m--;
			pK[m+1] = v1;
		}
	}
	W = pW[0]+pW[1]+pW[2];
	K = pK[0]+pK[1]+pK[2];
	cout << W << ' ' << K << endl;
	return 0;
}