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 <vector>
#include <cstdio>
#include <string>
#include <cmath>
#include <cfloat>
#include <map>
using namespace std;
int main(){

	int w[10],k[10];
	int W,K;
	
	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);
	
	W=w[7]+w[8]+w[9];
	K=k[7]+k[8]+k[9];
	
	cout<<W<<" "<<K<<endl;
	
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
	for(int i=0;i<2;i++){
		int arr[10]={};
		for(int j=0;j<10;j++)
			cin>>arr[j];
		sort(arr,arr+10);
		cout<<arr[7]+arr[8]+arr[9]<<(i==0?' ':'\n');
	}
}

C++: #include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <map>
#include <sstream>
#include <functional>
#include <numeric>
#include <cmath>
#include <cstring>
#include <cstdio>
#include <queue>
#include <stack>
#include <set>

using namespace std;

#define ALL(co) co.begin(), co.end()
#define tpl(...) make_tuple(__VA_ARGS__)

typedef long long LL;
typedef pair<int, int> P; typedef pair<int, P> IP; typedef pair<P, P> PP;
typedef vector<int> Array; typedef vector<vector<int> > Array2;
typedef vector<LL> LArray; typedef vector<P> PArray; typedef vector<string> SArray;

const int INF = 1 << 29;
const LL LINF = 1LL << 60;

inline int getInt() { int itiv; return (cin >> itiv, itiv); }
template <typename T> void readAll(vector<T>& vec) { for (int i = 0, size = vec.size(); i < size; i++) cin >> vec[i]; }
template <typename T, typename U> void readAll(vector<pair<T, U> >& vec) { for (int i = 0, size = vec.size(); i < size; i++) cin >> vec[i].first >> vec[i].second; }
template < typename T > inline string toString( const T &a ){ ostringstream oss; oss << a; return oss.str(); };
inline bool between(int min, int max, int n) { return min <= n && n <= max; }
inline bool inRange(int begin, int end, int n) { return begin <= n && n < end; }
inline bool inRange(int size, int n) { return 0 <= n && n < size; }

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

int m, n;

int main(void)
{
	Array w(10), k(10);
	readAll(w); readAll(k);
	sort(ALL(w)); sort(ALL(k));
	int ws = 0, ks = 0;
	for (int i = 0; i < 3; i++)
	{
		ws += w[9 - i];
		ks += k[9 - i];
	}
	cout << ws << ' ' << ks;
	return 0;
}

C++: #include <iostream>
#include<algorithm>
using namespace std;
int main() {
	int w1=0,w2=0,w3=0,k1=0,k2=0,k3=0,a[20];
	for(int i=0;i<20;i++){
		cin>>a[i];
	}
	for(int i=0;i<10;i++){
		if(w3<a[i]) swap(w3,a[i]);
		if(w2<w3) swap(w2,w3);
		if(w1<w2) swap(w1,w2);
	}
	for(int i=11;i<20;i++){
		if(k3<a[i]) swap(k3,a[i]);
		if(k2<k3) swap(k2,k3);
		if(k1<k2) swap(k1,k2);
	}	cout<<w1+w2+w3<<" "<<k1+k2+k3<<endl;
	return 0;
}

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

#include <stdlib.h>

using namespace std;

#define rep(i,a,b) for(int i=(int)(a); i<(int)(b); ++i)
#define SORT(x) sort((x).begin(),(x).end())

#define INF 2000000000000

int compare_int(const void *a, const void *b)
{
    return *(int*)a - *(int*)b;
}

int main()
{
	int W[10] = {0};
	int K[10] = {0};
	
	vector<int> Wv = {90,11,52,23};
	vector<int> Kv = {90,11,52,23};
	
	rep(i,0,10){
		cin >> W[i];
	}
	
	rep(i,0,10){
		cin >> K[i];
	}
	
	qsort(W, 10, sizeof(int), compare_int);
	qsort(K, 10, sizeof(int), compare_int);
	
	cout << W[7] + W[8] + W[9] << " ";
	cout << K[7] + K[8] + K[9] << endl;
	
	/*
	for(auto a : W){
		cout << a << endl;
	}
	*/
	
}

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

using namespace std;

int main()
{
  vector<int> W;
  vector<int> K;

  for(int i = 0;i < 20;++i){
    int a;
    cin>>a;
    
    if(i < 10){
      W.push_back(a);
    }
    else{
      K.push_back(a);
    }
  }

  sort(W.begin(),W.end());
  reverse(W.begin(),W.end());
  sort(K.begin(),K.end());
  reverse(K.begin(),K.end());

  int a = 0;
  int W_p = 0;
  int K_p = 0;
  for(int e : W){
    W_p += e;
    ++a;

    if(a == 3){
      a = 0;
      break;
    }
  }

  for(int e : K){
    K_p += e;
    ++a;

    if(a == 3){
      break;
    }
  }

  cout<<W_p<<" "<<K_p<<endl;
  return 0;
}

C++: #include<stdio.h>
#include<algorithm>
#include<functional>
using namespace std;
int main(void)
{
	int i,s=0,z=0,a[10],aa[10];
	for(i=0;i<10;i++){
		scanf("%d",&a[i]);
	}
	sort(a,a+10,greater<int>());
	for(i=0;i<10;i++){
		scanf("%d",&aa[i]);
	}
	sort(aa,aa+10,greater<int>());
	s=a[0]+a[1]+a[2];
	z=aa[0]+aa[1]+aa[2];
	printf("%d %d\n",s,z);
	return 0;
}

C++: #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main(){
	int n=2;
	vector<int> p[2];
	int ans[2];
	for(int i=0;i<n;++i){
		for(int j=0,point;j<10;++j){
			cin>>point;
			p[i].push_back(point);
		}
		sort(p[i].begin(),p[i].end(),greater<int>());
		ans[i]=p[i][0]+p[i][1]+p[i][2];
	}
	for(int i=0;i<n;++i)cout<<ans[i]<<((i==n-1)?"\n":" ");
	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[7] + W[8] + W[9] << " " << K[7] + K[8] + K[9] << std::endl;
	return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <numeric>
#define REP(i, a, n) for(int i = a; i < n; i++)
using namespace std;


int w[10], k[10];

int main(void) {
  REP(i, 0, 10) cin >> w[i];
  REP(i, 0, 10) cin >> k[i];

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

  cout
    << accumulate(w + 7, w + 10, 0) << " "
    << accumulate(k + 7, k + 10, 0) << endl;

  return 0;
}

C++: #include<bits/stdc++.h>
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[8]+a[9]+a[7] << " ";
  cout << b[8]+b[9]+b[7] << endl;
  return 0;
}

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

using namespace std;

#define N 10


int main(void){
	
	int W[N];
	int K[N];
	
	int w_total, k_total;
	
	
	w_total = k_total = 0; 
	
	for(int i = 0;i < N;i++){
		
		cin >> W[i];
		
	}
	
	for(int i = 0;i < N;i++){
		
		cin >> K[i];
		
	}
	
	sort(W,W+N,greater<int>());
	
	sort(K,K+N,greater<int>());
	
	for(int i = 0;i < 3;i++){
	
	w_total += W[i];
	k_total += K[i];
	
	}
	
	cout << w_total << " " << k_total << endl;
	
	return 0;
	
}

C++: // JOI2.cpp : ??????????????? ??¢????????±????????§????????¨????????? ?????????????????????????????????
//
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>

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]);
	}

	int sum_w = 0, sum_k = 0, max, suffix;
	for (int i = 0; i < 3; i++) {
		max = 0;
		for (int j = 0; j < 10; j++) {
			if (max <= w[j]) {
				max = w[j];
				suffix = j;
			}
		}
		sum_w += max;
		w[suffix] = 0;
	}

	for (int i = 0; i < 3; i++) {
		max = 0;
		for (int j = 0; j < 10; j++) {
			if (max <= k[j]) {
				max = k[j];
				suffix = j;
			}
		}
		sum_k += max;
		k[suffix] = 0;
	}

	printf("%d %d\n", sum_w, sum_k);

	return 0;
}

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

int main(){
  for(int i = 0; i < 2; ++i){
    vector<int> S(10);
    for(int j = 0; j < 10; ++j){
      cin >> S[j];
    }
    sort(S.rbegin(), S.rend());
    int s = 0;
    for(int j = 0; j < 3; ++j)
      s += S[j];
    cout << s << (i+1 < 2 ? " " : "\n");
  }
}