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<stdio.h>
#include<algorithm>
using namespace std;
int main(void)
{
    int n,m,i,a[10],b[10];
	for(i=0;i<10;i++) scanf("%d",&a[i]);
	for(i=0;i<10;i++) scanf("%d",&b[i]);
	sort(a,a+10);
	sort(b,b+10);
	n=a[9]+a[8]+a[7];
	m=b[9]+b[8]+b[7];
	printf("%d %d\n",n,m);
	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, greater<int>());
	sort(K, K + 10, greater<int>());
	int tW = 0, tK = 0;
	for (int i = 0; i < 3; i++) tW += W[i];
	for (int i = 0; i < 3; i++) tK += K[i];
	cout << tW << ' ' << tK << endl;
	return 0;
}

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 suma=a[9]+a[8]+a[7];
	int sumb=b[9]+b[8]+b[7];
	cout << suma << ' ' << sumb << endl;
}

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

int sum(int v[]) {
	int temp = 0;

	for (int i = 0; i < 3; i++) {
		temp += v[i];
	}

	return temp;
}

int main() {
	int a[10], b[10];

	for (int i = 0; i < 10; i++) {
		scanf("%d", &a[i]);
	}
	for (int i = 0; i < 10; i++) {
		scanf("%d", &b[i]);
	}

	sort(a, a + 10, greater<int>());
	sort(b, b + 10, greater<int>());

	printf("%d %d\n", sum(a), sum(b));

	return 0;
}

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

using namespace std;

int main() {
  set<int> w,k;
  int n,i;

  for(i=0;i<10;i++){
    cin >> n;
    w.insert(n);
  }
  for(;i<20;i++){
    cin >> n;
    k.insert(n);
  }
  
  int total_w,total_k;
  set<int>::iterator it;
  for(it=w.begin(),i=0;i<3;i++){
    total_w += *it;
  }
  
  for(it=k.begin(),i=0;i<3;i++){
    total_k += *it;
  }
  cout << total_w << " " << total_k << endl;
  
  return 0;
}