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,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(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;
}

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

C++: #include<cstdio>
#include<iostream>
int main(){
    int nowpoint,wran[3]={0},kran[3]={0},wsum=0,ksum=0;
    for(int i=0;i<10;i++){
        scanf("%d",&nowpoint);
        if(wran[0]<nowpoint)
            wran[2]=wran[1],wran[1]=wran[0],wran[0]=nowpoint;
        else if(wran[1]<nowpoint)
            wran[2]=wran[1],wran[1]=nowpoint;
        else if(wran[2]<nowpoint)
            wran[2]=nowpoint;
    }
    for(int i=0;i<10;i++){
        scanf("%d",&nowpoint);
        if(kran[0]<nowpoint)
            kran[2]=kran[1],kran[1]=kran[0],kran[0]=nowpoint;
        else if(kran[1]<nowpoint)
            kran[2]=kran[1],kran[1]=nowpoint;
        else if(kran[2]<nowpoint)
            kran[2]=nowpoint;
    }
    for(int i=0;i<3;i++)
        wsum+=wran[i],ksum+=kran[i];
    printf("%d\n%d\n",wsum,ksum);
    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);
    sum[p] = accumulate(data, data + 3,0);
  }
  cout << sum[0] << " " << sum[1] << endl;
  return 0;
}

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

int main(){
  int P[2];
  for(int i = 0; i < 2; i++){
    vector<int> point(10);
    for(int j = 0; j < 10; j++){
      cin >> point[j];
    }
    sort(point.begin(), point.end());
     point[0] + point[1] + point[2];
  }
  cout << p[0] << " " << P[1] << endl;
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main(){
    int W[3] = {0};
    int K[3] = {0};
    int Wsub = 0;
    int Ksub = 0;
    int ws,ks;
    for(int i = 0;i < 10;i++){
        cin >> ws;
        if(ws > W[0]){
            W[0] = ws;
            sort(W,W+3);
        }
    }
    for(int i = 0;i < 10;i++){
        cin >> ks;
        if(ks > K[0]){
            K[0] = ks;
            sort(K,K+3);
        }
    }
    for(int i = 0;i < 3;i++){
        Wsub+=W[i];
        Ksub+=K[i];
    }
    cout << Wsub << " " << Ksub << endl;
    return 0;
}

C++: #include <iostream>
#include <string>
#include <array>
#include <vector>
#include <list>
#include <deque>
#include <set>
#include <math.h>
#include <algorithm>

using namespace std;


int main(){

	int answer = 0;

	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[7] + W[8] + W[9] << endl
		<< K[7] + K[8] + K[9] << endl;

	return 0;
}

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

int main()
{
	set<int> a;
	int h = 0;
	int hh = 0;
	for (int b = 0; b < 10; b++)
	{
		int c;
		cin >> c;
		a.insert(-c);
	}
	set<int>::iterator it = a.begin();
	for (int g = 0; g < 3; g++)#include <iostream>
#include <set>
using namespace std;

int main()
{
	set<int> a;
	int h = 0;
	int hh = 0;
	for (int b = 0; b < 10; b++)
	{
		int c;
		cin >> c;
		a.insert(-c);
	}
	set<int>::iterator it = a.begin();
	for (int g = 0; g < 3; g++)
	{
		h -= *it;
		*it++;
	}
	set<int> aa;
	int h = 0;
	for (int bb = 0; bb < 10; bb++)
	{
		int cc;
		cin >> cc;
		a.insert(-cc);
	}
	set<int>::iterator itt = aa.begin();
	for (int g = 0; g < 3; g++)
	{
		hh -= *itt;
		*itt++;
	}
	cout << h << endl;
	cout << hh << endl;
	getchar();
	getchar();
	return 0;
}
	{
		h -= *it;
		*it++;
	}
	set<int> aa;
	int h = 0;
	for (int bb = 0; bb < 10; b++)
	{
		int cc;
		cin >> cc;
		a.insert(-cc);
	}
	set<int>::iterator itt = aa.begin();
	for (int g = 0; g < 3; g++)
	{
		hh -= *itt;
		*itt++;
	}
	cout << h << endl;
	cout << hh << endl;
	return 0;
}

C++: #include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
int main(){
  vector<int> W,K;
  for(int i=0,j; i<10; i++){
    cin >>j;
    W.push_back(j);
  }
  for(int i=0,j; i<10; i++){
    cin >>j;
    K.push_back(j);
  }
  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;
}