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<bits/stdc++.h>
using namespace std;
int main(){
    int x,y[100],z[100],a=0,b=0;
    for(int i=0;i<10;i++){
        scanf("%d",&z[i]);
    }
    for(int i=0;i<10;i++){
            scanf("%d",&y[i]);
    }
    sort(z,z+9);
    reverse(z,z+9);
    sort(y,y+9);
    reverse(y,y+9);
        for(int i=0;i<3;i++){
        a=a+z[i+1];
        b=b+y[i+1];
    }
    a=a+8;
    b=b+8;
    cout<<a<<' '<<b<<endl;
}

C++: #include <iostream>
#include <stdio.h>
#include <string.h>
#include <functional>
#include <algorithm>
#include <string>
#include <vector>
#include <algorithm>
#include <time.h>
#include <stdlib.h>

using namespace std;

int main (void)
{
	int a[10],b[10],w1,w2,w3,k1,k2,k3;

	w1 = 0;
	w2 = 0;
	w3 = 0;
	k1 = 0;
	k2 = 0;
	k3 = 0;

	for (int i = 0; i < 10; i++)
	{
		cin >> a[i];
	}
	for (int j = 0; j < 10; j++)
	{
		cin >> b[j];
	}

	for (int i = 0; i < 10; i++)
	{
		if (a[i] > w1 && a[i] > w2)
		{
			w1 = 0;
			w1 = a[i];
		}
		else if (a[i] <= w1 && a[i] > w2)
		{
			w2 = 0;
			w2 = a[i];
		}
		else if (a[i] <= w2 && a[i] > w3)
		{
			w3 = 0;
			w3 = a[i];
		}
		else
		{
		}
	}

	for (int j = 0; j < 10; j++)
	{
		if (b[j] > k1 && b[j] > k2)
				{
					k1 = 0;
					k1 = b[j];
				}
				else if (b[j] <= k1 && b[j] > k2)
				{
					k2 = 0;
					k2 = b[j];
				}
				else if (b[j] <= k2 && b[j] > k3)
				{
					k3 = 0;
					k3 = b[j];
				}
				else
				{
				}
	}

	cout << w1 + w2 + w3 << " "  << k1 + k2 + k3 << endl;
}

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

C++: #include <iostream>
using namespace std;
int main(void){
    // Your code here!
    
    int W[10]={0};
    int K[10]={0};
    int c=0;
    int total_W=0;
    int total_K=0;
    
    for(int i=0;i<10;i++){
        cin>>W[i];
    }
    for(int i=0;i<10;i++){
        cin>>K[i];
    }
    
    for(int i=0;i<10;i++){
        for(int j=0;j<10;j++){
            if(W[j]<W[j+1]&&j!=9){
            c=W[j];
            W[j]=W[j+1];
            W[j+1]=c;
            }
        }
    }
    total_W=W[0]+W[1]+W[2];
    
     for(int i=0;i<10;i++){
        for(int j=0;j<10;j++){
            if(K[j]<K[j+1]&&j!=9){
            c=K[j];
            K[j]=K[j+1];
            K[j+1]=c;
            }
        }
    }
    total_K=K[0]+K[1]+K[2];
    
    cout<<total_W<<" "<<total_K<<endl;
    return 0;

}

C++: #include <iostream>
#include <cstdio>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <string>
#include <algorithm>

using namespace std;

int main (int argc, char *argv[]) {
    vector<int> v1(10, 0);
    vector<int> v2(10, 0);
    for (int i = 0; i < 10; ++i) {
        cin>>v1[i];
    }
    for (int i = 0; i < 10; ++i) {
        cin>>v2[i];
    }
    sort(v1.begin(), v1.end(), greater<int>());
    sort(v2.begin(), v2.end(), greater<int>());
    cout<<v1[0]+v1[1]+v1[2]<<" "<<v2[0]+v2[1]+v2[2]<<endl;
    return 0;
}

C++: #include <stdio.h>
#include <algorithm>
using namespace std;

int main()
{
	int w[10], k[10], ans1, ans2;
	
	for (int i = 0; i < 10; i++){
		scanf("%d", &w[i]);
	}
	for (int i = 0; i < 10; i++){
		scanf("%d", &k[i]);
	}
	
	sort(w, w+10);
	sort(k, k+10);
	
	ans1 =  w[9] + w[8] + w[7];
	ans2 =  k[9] + k[8] + k[7];
	
	
	printf("%d %d\n", ans1, ans2);
	
	return (0);
}

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

#define f first
#define s second
#define mp make_pair

#define REP(i,n) for(int i=0; i<(int)(n); i++)
#define rep(i,s,n) for(int i=(s); i<(int)(n); i++)
#define FOR(i,c) for(__typeof((c).begin()) i=(c).begin(); i!=(c).end(); i++)
#define ALL(c) (c).begin(), (c).end()
#define IN(x,s,g) ((x) >= (s) && (x) < (g))
#define ISIN(x,y,w,h) (IN((x),0,(w)) && IN((y),0,(h)))
#define print(x) printf("%d\n",x)

using namespace std;

typedef unsigned int uint;
typedef long long ll;

const int _dx[] = {0,1,0,-1};
const int _dy[] = {-1,0,1,0};

int getInt(){
  int ret = 0,c;
  c = getchar();
  while(!isdigit(c)) c = getchar();
  while(isdigit(c)){
    ret *= 10;
    ret += c - '0';
    c = getchar();
  }
  return ret;
}

int a[10], b[10];

int main(){
  REP(i,10) a[i] = getInt();
  REP(i,10) b[i] = getInt();
  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<iostream>
#include<cstdio>
#include<algorithm>
#include<string>
using namespace std;
int main()
{
	int w[10],k[10];
	int sum_w = 0,sum_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);
	reverse(w,w+10);
	sort(k,k+10);
	reverse(k,k+10);
	for(int i = 0; i < 3; i++){
        sum_w += w[i];
        sum_k += k[i];
	}
	cout << sum_w << " " << sum_k << endl;
	return 0;
}

C++: #include <iostream>
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++) {
		for (int j = 0; j < 9; j++) {
			if (w[j] < w[j + 1]) {
				int c = w[j];
				w[j] = w[j + 1];
				w[j + 1] = c;
			}
		}
	}
	for (int i = 0; i < 10; i++) {
		std::cin >> k[i];
	}
	for (int i = 0; i < 10; i++) {
		for (int j = 0; j < 9; j++) {
			if (k[j] < k[j + 1]) {
				int c = k[j];
				k[j] = k[j + 1];
				k[j + 1] = c;
			}
		}
	}
	std::cout << w[0] + w[1] + w[2] << " " << k[0] + k[1] + k[2] << std::endl;
}

C++: #include <stdio.h>

void swap(int *i, int *j)
{
	*i += *j;
	*j = *i - *j;
	*i -= *j;
}

int main(void)
{
	int score[2][10];
	int ans[2];
	int i, j;
	int k, l;
	
	for (i = 0; i < 2; i++){
		for (j = 0; j < 10; j++){
			scanf("%d", &score[i][j]);
		}
		for (k = 0; k < 9; k++){
			for (l = 0; l < 9 - k; l++){
				if (score[i][l] < score[i][l + 1]){
					swap(&score[i][l], &score[i][l + 1]);
				}
			}
		}
		
		ans[i] = score[i][0] + score[i][1] + score[i][2];
	}
	
	printf("%d %d\n", ans[0], ans[1]);
	
	return (0);
}

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

C++: #include <iostream>
#include <stdio.h>
#include <vector>
#include <algorithm>

using namespace std;

int main(void){

	vector<int> w( 10, 0 );
	vector<int> k( 10, 0 );
	
	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() );

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

    return 0;
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main(){
	int x[10],i,j,y[10],ans1=0,ans2=0;
	for(i=0;i<10;i++){
		cin>>x[i];
	}
	sort(x,x+10);
	for(i=9;i>6;i--){
		ans1+=x[i];
	}
	for(j=0;j<10;j++){
		cin>>y[j];
	}
	sort(y,y+10);
	for(j=9;j>6;j--){
		ans2+=y[j];
	}
	cout<<ans1<<" "<<ans2<<endl;
	return 0;
}