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>
using namespace std;

int main() {

	int W[10];
	int K[10];

	int i = 0;
	while (i<10) {
		cin >> W[i];
		i++;
	}

	while (i<20) {
		cin >> K[i-10];
		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 <iostream>
#include <iomanip>
#include <sstream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cstring>
#include <climits>
#include <cfloat>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <algorithm>
#include <functional>
#include <utility>
#include <numeric>

using namespace std;

typedef unsigned int UI;
typedef long long LL;
typedef unsigned long long ULL;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int,int> PII;
typedef istringstream ISS;
typedef ostringstream OSS;

#define REP( i, m, n ) for ( int i = (int)( m ); i < (int)( n ); ++i )
#define FOR( v, c ) for ( auto &v : c )

#define ITER( c ) __typeof( (c).begin() )
#define EACH( it, c ) for ( ITER(c) it = c.begin(); it != c.end(); ++it )
#define ALL( c ) (c).begin(), (c).end()

#define PB( n ) push_back( n )
#define MP( a, b ) make_pair( ( a ), ( b ) )
#define EXIST( c, e ) ( (c).find( e ) != (c).end() )

#define fst first
#define snd second

#define DUMP( x ) cerr << #x << " = " << ( x ) << endl
#define DEBUG( x ) cerr << __FILE__ << ":" << __LINE__ << ": " << #x << " = " << ( x ) << endl

int solve()
{
	VI pts( 10 );
	FOR( p, pts )
	{
		cin >> p;
	}
	sort( ALL( pts ), greater<int>() );
	return accumulate( pts.begin(), pts.begin() + 3, 0 );
}		

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

	cout << solve() << ' ';
	cout << solve() << endl;

	return 0;
}

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<<c<<d<<endl;

	




	return 0;
}

C++: #include <stdio.h>

void up_sort(int ary[10]){
  int tmp;
  for(int i = 0; i < 10; i++){
    for(int j = 9; j > i; j--){
      if(ary[j] > ary[j - 1]){
        tmp = ary[j];
        ary[j] = ary[j-1];
        ary[j - 1] = tmp; 
      }
    }
  } 
}

int main(){
  int i1[10];
  int w,k;
  for(int i = 0; i < 10; i++)
    scanf("%d",&i1[i]);
  
  up_sort(i1);
  w = i1[0] + i1[1] + i1[2];

  for(int i = 0; i < 10; i++)
    scanf("%d",&i1[i]);

  up_sort(i1);
  k = i1[0] + i1[1] + i1[2];  

  printf("%d %d\n",w,k);
}

C++: #include<stdio.h>
int main()
{
	int i,a,w1=0,w2=0,w3=0,k1=0,k2=0,k3=0;
	for(i=0;i<10;i++){
		scanf("%d",&a);
		if(w3<a){
			w3=a;
			if(w2<a){
				w3=w2;
				w2=a;
				if(w1<a){
					w2=w1;
					w1=a;
				}
			}
		}
	}
	for(i=0;i<10;i++){
		scanf("%d",&a);
		if(k3<a){
			k3=a;
			if(k2<a){
				k3=k2;
				k2=a;
				if(k1<a){
					k2=k1;
					k1=a;
				}
			}
		}
	}
	printf("%d %d\n",w1+w2+w3,k1+k2+k3);
	return 0;
}

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

int main() {
    int w[10],k[10];
    for(int i = 0; i < 10; i++){
    	cin >> w[i];
    }
    for(int j = 0; j < 10; j++){
    	cin >> k[j];
    }
    sort(w,w + 10);
    sort(k,k + 10);
    cout << w[7]+w[8]+w[9] << endl;
    cout << k[7]+k[8]+k[9] << endl;

    return 0;
}

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

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

int main() {
  vector<int> w, k;
  int w_max = 0;
  int k_max = 0;

  for(int i = 0; i < 10; i++) {
    int W;
    cin >> W;
    w.push_back(W);
  }

  for(int i = 0; i < 10; i++) {
    int K;
    cin >> K;
    k.push_back(K);
  }

  sort(w.begin(), w.end(), greater<int>());
  sort(k.begin(), k.end(), greater<int>());

  for(int i = 0; i < 3; i++) {
    w_max += w[i];
    k_max += k[i];
  }

  cout << w_max	<< ' ' << k_max << endl;

  return 0;
}

C++: #include <stdio.h>

void up_sort(int ary[10]){
  int tmp;
  for(int i = 0; i < 10; i++){
    for(int j = 9; j > i; j--){
      if(ary[j] > ary[j - 1]){
        tmp = ary[j];
        ary[j] = ary[j-1];
        ary[j - 1] = tmp; 
      }
    }
  } 
}

int main(){
  int i1[10];
  int w,k;
  for(int i = 0; i < 10; i++)
    scanf("%d",&i1[i]);
  
  up_sort(i1);
  w = i1[0] + i1[1] + i1[2];
  printf("%d + %d + %d\n",i1[0],i1[1],i1[2]);

  for(int i = 0; i < 10; i++)
    scanf("%d",&i1[i]);

  up_sort(i1);
  k = i1[0] + i1[1] + i1[2];  
  printf("%d + %d + %d\n",i1[0],i1[1],i1[2]); 

  printf("%d %d\n",w,k);
}

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[9]+a[8]+a[7]<<" "<<b[9]+b[8]+b[7]<<endl;
  return 0;
}

C++: #include<stdio.h>
int main()
{
	int i,a,w1=0,w2=0,w3=0,k1=0,k2=0,k3=0;
	for(i=0;i<10;i++){
		scanf("%d",&a);
		if(w3<a){
			w3=a;
			if(w2<a){
				w3=w2;
				w2=a;
				if(w1<a){
					w2=w1;
					w1=a;
				}
			}
		}
	}
	for(i=0;i<10;i++){
		scanf("%d",&a);
		if(k3<a){
			k3=a;
			if(k2<a){
				k3=k2;
				k2=a;
				if(k1<a){
					k2=k1;
					k1=a;
				}
			}
		}
	}
	printf("%d %d\n",w1+w2+w3,k1+k2+k3);
	return 0;
}

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[9]+w[8]+w[7]) << " " << (k[9]+k[8]+k[7]) << endl;
    
	return 0;
}

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

using namespace std;

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

    for (i=0;i<10;i++) {
        int k;

        scanf("%d", &k);
        W.push_back(k);
    }

    
    for (i=0;i<10;i++) {
        int k;

        scanf("%d", &k);
        K.push_back(k);
    }

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

    printf("%d %d\n", W[9] + W[8] + W[7], K[9] + K[8] + K[7]);
}

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;
	}
	*/
	
}