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 <algorithm>
#include <functional>
#include <vector>
#include <utility>
#include <cstring>
#include <iomanip>
#include <numeric>
#include <cmath>
#include <queue>
#include <map>
using namespace std;
typedef long long ll;
const int INF = 1<<30; 
const int MOD = 1e9 + 7;
const int dy[] = {1, 0, -1, 0};
const int dx[] = {0, 1, 0, -1};
int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    vector<int> v, w;
    for(int i = 0; i < 10; i++)
    {
        int x;
        cin >> x;
        v.push_back(x);
    }
    for(int i = 0; i < 10; i++)
    {
        int x;
        cin >> x;
        w.push_back(x);
    }
    sort(v.begin(), v.end());
    sort(w.begin(), w.end());
    int sum1 = v[9] + v[8] + v[7];
    int sum2 = w[9] + w[8] + w[7];
    cout << sum1 << " " << sum2 << 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());
  sort(k.begin(),k.end());
  reverse(w.begin(),w.end());
  reverse(k.begin(),k.end());

  cout << w[0]+w[1]+w[2] << " " << k[0]+k[1]+k[2] << endl;

  return 0;
}

C++: #include <iostream>
#include <string>
#include <array>
#include <vector>
#include <list>
#include <deque>
#include <set>
#include <math.h>
#include <algorithm>

using namespace std;


int main(){

	int answer = 0;

	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;

	return 0;
}

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

C++: #include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
#include <cfloat>
#include <ctime>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <complex>
#include <stack>
#include <queue>
#include <numeric>

using namespace std;

#ifdef _MSC_VER
#define __typeof__ decltype

template <class T>
int __builtin_popcount(T n) { return n ? 1 + __builtin_popcount(n & (n - 1)) : 0; }
#endif

#define foreach(it, c) for (__typeof__((c).begin()) it=(c).begin(); it != (c).end(); ++it)
#define all(c) (c).begin(), (c).end()
#define rall(c) (c).rbegin(), (c).rend()
#define popcount __builtin_popcount

template <class T> void max_swap(T& a, const T b) { a = max(a, b); }
template <class T> void min_swap(T& a, const T b) { a = min(a, b); }

const double EPS = 1e-10;
typedef long long ll;
typedef pair<int, int> pint;


int main()
{
	for (int t = 0; t < 2; ++t)
	{
		int a[10];
		for (int i = 0; i < 10; ++i)
			scanf("%d", a + i);
		sort(a, a + 10);
		printf("%d%c", accumulate(a + 7, a + 10, 0), t ? '\n' : ' ');
	}
}

C++: #include <bits/stdc++.h>
using namespace std;
int calc(vector<int> &a) {
  for (int i=0; i<10; i++) {
    cin >> a.at(i);
  }
  sort(a.begin(),a.end());
  return 0;
}
int main() {
  vector<int> w(10);
  vector<int> k(10);
  calc(w);
  calc(k);
  int x,y;
  x = w.at(7)+w.at(8)+w.at(9);
  y = k.at(7)+k.at(8)+k.at(9);
  cout << x << " " << y << endl;
}

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 i=0;i<10;i++)cin>>b[i];
    sort(a,a+10);
    sort(b,b+10);
    int pa,pb;
    pa=pb=0;
    for(int i=7;i<10;i++){
        pa+=a[i];
        pb+=b[i];
    }
    cout<<pa<<" "<<pb<<endl;
    return 0;

}

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

	return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(void){
	int w[10],k[10],wsum=0,ksum=0,i;
	for(i=0;i<10;i++) cin>>w[i];
	for(i=0;i<10;i++) cin>>k[i];
	sort(w,w+10); sort(k,k+10);
	for(i=9;i>=7;i--) {
		wsum+=w[i]; ksum+=k[i];
	}
	cout<<wsum<<' '<<ksum<<endl;
	return 0;
}

C++: #include <bits/stdc++.h>
#define rep(i,n)for(long long i=0;i<(n);i++)
using namespace std;
typedef unsigned long long ull;
typedef long long ll;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
const ll INF=1e18;
const ll MOD=1e9+7;
const double pi=acos(-1);
int dx[4]={1,0,-1,0};
int dy[4]={0,1,0,-1};

int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);  
  
  vector<int>k(10),w(10);
  rep(i,10) cin >> w[i];
  rep(i,10) 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;
}

C++: #include <iostream>
using namespace std;
int main(void)
{
	int a,b,c[101]={0},d,e,f;
	for (a=0;a<10;a++)
	{
		cin>>b;
		c[b]=1;
	}
	d=0;
	e=0;
	for (a=100;a>=0;a--)
	{
		if (c[a]==1&&d!=3)
		{
			e=e+a;
			d++;
		}
	}
	c[101]={0};
	for (a=0;a<10;a++)
	{
		cin>>b;
		c[b]=1;
	}
	d=0;
	f=0;
	for (a=100;a>=0;a--)
	{
		if (c[a]==1;d!=3)
		{
			f=f+a;
			d++;
		}
	}
	cout<<e<<" "<<d<<endl;
	return 0;
}

C++: #include<iostream>
#include<algorithm>
#include<vector>
int main() {
	std::vector<int>w;
	std::vector<int>k;
	for (int i = 0; i < 10; ++i) {
		int num;
		std::cin >> num;
		w.push_back(num);
	}
	for (int i = 0; i < 10; ++i) {
		int num;
		std::cin >> num;
		k.push_back(num);
	}
	std::cout << w[0] + w[1] + w[2] << " " << k[0] + k[1] + k[2] << std::endl;
	return 0;
}

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

using namespace std;

int main(){
	int n = 2;
	while(n--){
		int m = 10, s[10];
		while(m--){
			cin >> s[m];
		}
		sort(s, s + 10);
		cout << (s[9] + s[8] + s[7]) << endl;
	}
	return 0;
}

C++: #include <iostream>
#include <algorithm>
int main(void){
    int w[10],k[10],a;
    for(int i=0;i<10;++i){
        std::cin>>w[i];
    }
    for(int i=0;i<10;++i){
        std::cin>>k[i];
    }
    for(int i=0;i<9;++i){
        for(int j=i+1;j<10;++j){
            if(w[j]>w[i]){
                a=w[i];
                w[i]=w[j];
                w[j]=a;
            }
        }
    }
    for(int i=0;i<9;++i){
        for(int j=i+1;j<10;++j){
            if(k[j]>k[i]){
                a=k[i];
                k[i]=k[j];
                k[j]=a;
            }
        }
    }
    std::cout<<w[0]+w[1]+w[2]<<" "<<k[0]+k[1]+k[2]<<std::endl;
    return 0;
}

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

int main(void){
	int i;
	int w[10];
	int k[10];
	for(i = 0;i < 10;++i){
		cin >> w[i];
	}

	for(i = 0;i < 10;++i){
		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;
}

C++: #include<algorithm>
#include<cstdio>
#define s(A) std::sort(A,A+10);
main(){
int W[10],K[10],p;
for(int i=0;i<20;i++)
scanf("%d",&p),(i<10)?W[i]=p:K[i-10]=p;
s(W);
s(K);
printf("%d %d\n",W[7]+W[8]+W[9],K[7]+K[8]+K[9]);
return 0;
}