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<string>
#include<cstring>
using namespace std;
int main()
{	
	int num1=0,num2=0,num3=0,num4=0,num5=0,num6=0,num7=0,num8=0,num9=0,num10=0,num11=0,num12=0,num13=0,num14=0,num15=0,num16=0,num17=0,num18=0,num19=0,num20=0,num21=0,num22=0,r=0;
	
	cin>>num1>>num2>>num3>>num4>>num5>>num6>>num7>>num8>>num9>>num10>>num11>>num12>>num13>>num14>>num15>>num16>>num17>>num18>>num19>>num20;
	if(num1<num2){
		r=num1;
		num1=num2;
		num2=r;
	}
	if(num1<num3){
		r=num1;
		num1=num3;
		num3=r;
	}
	if(num1<num4){
		r=num1;
		num1=num4;
		num4=r;
	}
	if(num1<num5){
		r=num1;
		num1=num5;
		num5=r;
	}
	if(num1<num6){
		r=num1;
		num1=num6;
		num6=r;
	}
	if(num1<num7){
		r=num1;
		num1=num7;
		num7=r;
	}
	if(num1<num8){
		r=num1;
		num1=num8;
		num8=r;
	}
	if(num1<num9){
		r=num1;
		num1=num9;
		num9=r;
	}
	if(num1<num10){
		r=num1;
		num1=num10;
		num10=r;
	}
	if(num2<num3){
		num2=r;
		r=num3;
		num3=num2;
	}
	if(num2<num4){
		num2=r;
		r=num4;
		num4=num2;
	}
	if(num2<num5){
		num2=r;
		r=num5;
		num5=num2;
	}
	if(num2<num6){
		num2=r;
		r=num6;
		num6=num2;
	}
	if(num2<num7){
		num2=r;
		r=num7;
		num7=num2;
	}
	if(num2<num8){
		num2=r;
		r=num8;
		num8=num2;
	}
	if(num2<num9){
		num2=r;
		r=num9;;
		num9=num2;
	}
	if(num2<num10){
		num2=r;
		r=num10;
		num10=num2;
	}
	if(num3<num4){
		num3=r;
		r=num4;
		num4=num3;
	}
	if(num3<num5){
		num3=r;
		r=num5;
		num5=num3;
	}
	if(num3<num6){
		num3=r;
		r=num6;
		num6=num3;
	}
	if(num3<num7){
		num3=r;
		r=num7;
		num7=num3;
	}
	if(num3<num8){
		num3=r;
		r=num8;
		num8=num3;
	}
	if(num3<num9){
		num3=r;
		r=num9;
		num9=num3;
	}
	if(num3<num10){
		num3=r;
		r=num10;
		num10=num3;
	}
	if(num11<num12){
		num11=r;
		r=num12;
		num12=num11;
	}
	if(num11<num13){
		num11=r;
		r=num13;
		num13=num11;
	}
	if(num11<num14){
		num11=r;
		r=num14;
		num14=num11;
	}
	if(num11<num15){
		num11=r;
		r=num15;
		num15=num11;
	}
	if(num11<num16){
		num11=r;
		r=num16;
		num16=num11;
	}
	if(num11<num17){
		num11=r;
		r=num17;
		num17=num11;
	}
	if(num11<num18){
		num11=r;
		r=num18;
		num18=num11;
	}
	if(num11<num19){
		num11=r;
		r=num19;
		num19=num11;
	}
	if(num11<num20){
		num11=r;
		r=num20;
		num20=num11;
	}
	if(num12<num13){
		num12=r;
		r=num13;
		num13=num12;
	}
	if(num12<num14){
		num12=r;
		r=num14;
		num14=num12;
	}
	if(num12<num15){
		num12=r;
		r=num15;
		num15=num12;
	}
	if(num12<num16){
		num12=r;
		r=num16;
		num16=num12;
	}
	if(num12<num17){
		num12=r;
		r=num17;
		num17=num12;
	}
	if(num12<num18){
		num12=r;
		r=num18;
		num18=num12;
	}
	if(num12<num19){
		num12=r;
		r=num19;
		num19=num12;
	}
	if(num12<num20){
		num12=r;
		r=num20;
		num20=num12;
	}
	if(num13<num14){
		num13=r;
		r=num14;
		num14=num13;
	}
	if(num13<num15){
		num13=r;
		r=num15;
		num15=num13;
	}
	if(num13<num16){
		num13=r;
		r=num16;
		num16=num13;
	}
	if(num13<num17){
		num13=r;
		r=num17;
		num17=num13;
	}
	if(num13<num18){
		num13=r;
		r=num18;
		num18=num13;
	}
	if(num13<num19){
		num13=r;
		r=num19;
		num19=num13;
	}
	if(num13<num20){
		num13=r;
		r=num20;
		num20=num13;
	}
	num21=num1+num2+num3;
	num22=num11+num12+num13;
	cout<<num21<<" "<<num22<<"\n";
	return 0;
}

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

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

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

C++: #include<iostream>
#include<string>
#include<cstring>
using namespace std;
int main()
{	
	int num1=0,num2=0,num3=0,num4=0,num5=0,num6=0,num7=0,num8=0,num9=0,num10=0,num11=0,num12=0,num13=0,num14=0,num15=0,num16=0,num17=0,num18=0,num19=0,num20=0,num21=0,num22=0,a=0;
	
	cin>>num1>>num2>>num3>>num4>>num5>>num6>>num7>>num8>>num9>>num10>>num11>>num12>>num13>>num14>>num15>>num16>>num17>>num18>>num19>>num20;
	if(num1<num2){
		num1=a;
		a=num2;
		num2=num1;
	}
	if(num1<num3){
		num1=a;
		a=num3;
		num3=num1;
	}
	if(num1<num4){
		num1=a;
		a=num4;
		num4=num1;
	}
	if(num1<num5){
		num1=a;
		a=num5;
		num5=num1;
	}
	if(num1<num6){
		num1=a;
		a=num6;
		num6=num1;
	}
	if(num1<num7){
		num1=a;
		a=num7;
		num7=num1;
	}
	if(num1<num8){
		num1=a;
		a=num8;
		num8=num1;
	}
	if(num1<num9){
		num1=a;
		a=num9;
		num9=num1;
	}
	if(num1<num10){
		num1=a;
		a=num10;
		num10=num1;
	}
	if(num2<num3){
		num2=a;
		a=num3;
		num3=num2;
	}
	if(num2<num4){
		num2=a;
		a=num4;
		num4=num2;
	}
	if(num2<num5){
		num2=a;
		a=num5;
		num5=num2;
	}
	if(num2<num6){
		num2=a;
		a=num6;
		num6=num2;
	}
	if(num2<num7){
		num2=a;
		a=num7;
		num7=num2;
	}
	if(num2<num8){
		num2=a;
		a=num8;
		num8=num2;
	}
	if(num2<num9){
		num2=a;
		a=num9;
		num9=num2;
	}
	if(num2<num10){
		num2=a;
		a=num10;
		num10=num2;
	}
	if(num3<num4){
		num3=a;
		a=num4;
		num4=num3;
	}
	if(num3<num5){
		num3=a;
		a=num5;
		num5=num3;
	}
	if(num3<num6){
		num3=a;
		a=num6;
		num6=num3;
	}
	if(num3<num7){
		num3=a;
		a=num7;
		num7=num3;
	}
	if(num3<num8){
		num3=a;
		a=num8;
		num8=num3;
	}
	if(num3<num9){
		num3=a;
		a=num9;
		num9=num3;
	}
	if(num3<num10){
		num3=a;
		a=num10;
		num10=num3;
	}
	if(num4<num5){
		num4=a;
		a=num5;
		num5=num4;
	}
	if(num4<num6){
		num4=a;
		a=num6;
		num6=num4;
	}
	if(num4<num7){
		num4=a;
		a=num7;
		num7=num4;
	}
	if(num4<num8){
		num4=a;
		a=num8;
		num8=num4;
	}
	if(num4<num9){
		num4=a;
		a=num9;
		num9=num4;
	}
	if(num4<num10){
		num4=a;
		a=num10;
		num10=num4;
	}
	if(num5<num6){
		num5=a;
		a=num6;
		num6=num5;
	}
	if(num11<num12){
		num11=a;
		a=num12;
		num12=num11;
	}
	if(num11<num13){
		num11=a;
		a=num13;
		num13=num11;
	}
	if(num11<num14){
		num11=a;
		a=num14;
		num14=num11;
	}
	if(num11<num15){
		num11=a;
		a=num15;
		num15=num11;
	}
	if(num11<num16){
		num11=a;
		a=num16;
		num16=num11;
	}
	if(num11<num17){
		num11=a;
		a=num17;
		num17=num11;
	}
	if(num11<num18){
		num11=a;
		a=num18;
		num18=num11;
	}
	if(num11<num19){
		num11=a;
		a=num19;
		num19=num11;
	}
	if(num11<num20){
		num11=a;
		a=num20;
		num20=num11;
	}
	if(num12<num13){
		num12=a;
		a=num13;
		num13=num12;
	}
	if(num12<num14){
		num12=a;
		a=num14;
		num14=num12;
	}
	if(num12<num15){
		num12=a;
		a=num15;
		num15=num12;
	}
	if(num12<num16){
		num12=a;
		a=num16;
		num16=num12;
	}
	if(num12<num17){
		num12=a;
		a=num17;
		num17=num12;
	}
	if(num12<num18){
		num12=a;
		a=num18;
		num18=num12;
	}
	if(num12<num19){
		num12=a;
		a=num19;
		num19=num12;
	}
	if(num12<num20){
		num12=a;
		a=num20;
		num20=num12;
	}
	if(num13<num14){
		num13=a;
		a=num14;
		num14=num13;
	}
	if(num13<num15){
		num13=a;
		a=num15;
		num15=num13;
	}
	if(num13<num16){
		num13=a;
		a=num16;
		num16=num13;
	}
	if(num13<num17){
		num13=a;
		a=num17;
		num17=num13;
	}
	if(num13<num18){
		num13=a;
		a=num18;
		num18=num13;
	}
	if(num13<num19){
		num13=a;
		a=num19;
		num19=num13;
	}
	if(num13<num20){
		num13=a;
		a=num20;
		num20=num13;
	}
	num21=num1+num2+num3;
	num22=num11+num12+num13;
	cout<< num21 <<" "<< num22 <<"\n";
	return 0;
}