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

void sort(int n, int* array) {
    for (int i = 0; i < n - 1; i++) {
        for (int j = 0; j < n - 1 - i; j++) {
            if (array[j] < array[j + 1]) {
                int temp = array[j];
                array[j] = array[j + 1];
                array[j + 1] = temp;
            }
        }
    }
}

int main() {
    int scoreW[10];
    for (int i = 0; i < 10; i++) {
        cin >> scoreW[i];
    }
    int scoreK[10];
    for (int i = 0; i < 10; i++) {
        cin >> scoreK[i];
    }
    sort(10, scoreW);
    sort(10, scoreK);
    cout << scoreW[0] + scoreW[1] + scoreW[2] << " "
         << scoreK[0] + scoreK[1] + scoreK[2] << endl;
}

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

C++: #include <iostream>
#include <algorithm>
#include <functional>
using namespace std;
int main()
{
	int w[10], k[10], i, p = 0, q = 0;
	for (i = 0; i < 10; i++)
		cin >> w[i];
	for (i = 0; i < 10; i++)
		cin >> k[i];
	sort(w, w+10, greater<int>());
	sort(k, k+10, greater<int>());
	for (i = 0; i < 3; i++)
	{
		p += w[i];
		q += k[i];
	}
	cout << p << " " << q << endl;
}

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

C++: #include <stdio.h>
void swap(int *a,int *b){
   int tmp;
   tmp = *a;
   *a=*b;
   *b=tmp;
   return;
}
int main(){
  int i,n,k[10],w[10],K,W;
  K=W=0;
  for(i=0;i<10;i++){
    scanf("%d",&n);
    w[i]=n;
  }
  for(i=0;i<10;i++){
    scanf("%d",&n);
    k[i]=n;
  }
  for(i=0;i<3;i++){
    for(int j=i+1;j<10;j++) if(k[i]<k[j]) swap(&k[i],k[j]);
  }
  for(i=0;i<3;i++){
    for(int j=i+1;j<10;j++) if(w[i]<w[j]) swap(&w[i],w[j]);
  }
  for(i=0;i<3;i++){
    K+=k[i];W+=w[i];
  }
  printf("%d %d\n",W,K);
  return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
#define Rep(i,N) for(int i = 0;i < N;i++)
int main()
{
  int data[10];
  int sum[2];
  Rep(p,2) {
    Rep(i,10)cin >> data[i];
    sort(data, data + 10,greater<int>());
    sum[p] = accumulate(data, data + 3,0);
  }
  cout << sum[0] << " " << sum[1] << endl;
  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 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 <iostream>
#include <vector>
#include <algorithm>
using namespace std;

int main(void){
	vector<int>k,w;
	int t;
	for(int i=0;i<10;i++){
		cin >> t;
		w.push_back(t);
	}
	for(int i=0;i<10;i++){
		cin >> t;
		k.push_back(t);
	}
	sort(w.begin(),w.end());
	sort(k.begin(),k.end());
	cout << w[9]+w[8]+w[7] << " " << k[9]+k[8]+k[7] << endl;
}