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() {
    vector<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.rbegin(), w.rend());
    sort(k.rbegin(), k.rend());
    cout << w[0]+w[1]+w[2] << " " << k[0]+k[1]+k[2] << endl;
    return 0;
}

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

int main() {
	int p;
	int maxw, maxk;
	int max1 = 0, max2 = 0, max3 = 0;
	for (int i = 0; i < 10; ++i) {
		scanf("%d", &p);
		if (max3 < p) {
			max3 = p;
			if (max2 < max3) {
				std::swap(max2, max3);
				if (max1 < max2) {
					std::swap(max1, max2);
				}
			}
		}
	}
	maxw = max1 + max2 + max3;

	max1 = 0; max2 = 0; max3 = 0;
	for (int i = 0; i < 10; ++i) {
		scanf("%d", &p);
		if(max3 < p){
			max3 = p;
			if (max2 < max3) {
				std::swap(max2, max3);
				if (max1 < max2) {
					std::swap(max1, max2);
				}
			}
		}
	}
	maxk = max1 + max2 + max3;

	printf("%d %d\n", maxw, maxk);

	return 0;
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main(){
  int a[11],b[11];
  for(int i=0;i<10;i++){
    cin >> a[i];
  }
  for(int i=0;i<10;i++){
    cin >> b[i];
  }
  sort( a , a + 10 ,greater<int>());
  sort( b , b + 10 ,greater<int>());
  cout << a[0]+a[1]+a[2] << ' ' << b[0]+b[1]+b[2] << endl;
}

C++: #include<bits/stdc++.h>
using namespace std;
vector <int> s1,s2;
int a;

int main(){

    for(int i=0;i<10;i++){
        cin >> a;
        s1.push_back(a);
    }
    sort(s1.begin(),s1.end());
    for(int i=0;i<10;i++){
        cin >> a;
        s2.push_back(a);
    }
    sort(s2.begin(),s2.end());

    cout << s1[9]+s1[8]+s1[7] << " " << s2[9]+s2[8]+s2[7] << endl;

return 0;
}

C++: #include<iostream>
#include<algorithm>
#include<functional>
using namespace std;
int main(){
  int W[10],K[10],wsum,ksum;
  wsum=0,ksum=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 , greater<int>() );
  sort( K , K+10 , greater<int>() );
  for(int i=0;i<3;i++){
    wsum+=W[i];
    ksum+=K[i];
  }
  cout << wsum << " " << ksum << endl;
  return 0;
}

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

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

C++: #include <iostream>
#include <cstdio>
#include <string>
#include <algorithm>

//#define PI 3.141592653589

using namespace std;



int main()
{
	int w_score[10];
	int k_score[10];
	int w_sum, k_sum;
	
	for (int i=0; i<10; i++)
	{
		cin >> w_score[i];
	}
	for (int i=0; i<10; i++)
	{
		cin >> k_score[i];
	}
	
	sort(w_score, w_score+10);
	sort(k_score, k_score+10);
	w_sum = w_score[9] + w_score[8] + w_score[7];
	k_sum = k_score[9] + k_score[8] + k_score[7];
	
	cout << w_sum << " " << k_sum << endl;
	
	/*
	for (int i=0; i<10; i++)
	{
		cout << w_score[i] << endl;
	}
	*/
	
	
	return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <iterator>
#include <list>
#include <map>
#include <queue>
#include <bitset>
#include <fstream>
#include <cmath>
#include <ctime>
using namespace std;
typedef long long ll;

int main()
{
	for(int i = 0; i < 2; i++){
		priority_queue<int> point;
		for(int j = 0; j < 10; j++){
			int buf;
			cin>>buf;
			point.push(buf);
		}
		int res = 0;
		for(int j = 0; j < 3; j++){
			res += point.top();
			point.pop();
		}
		cout<<res<<" ";
	}
	cout<<endl;
}

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);
  sort(K,K+10);

  int max1,max2;
  max1=max2=0;

  max1=W[9]+W[8]+W[7];
  max2=K[9]+K[8]+K[7];

  cout<<max1<<" "<<max2<<endl;
  return 0;
}

C++: #include<cstdio>
#include<algorithm>

using namespace std;

int main(void)
{
  int W[10];
  int K[10];
  int Wpon, Kpon;
  int i;

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

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

  sort(W, W+10);
  sort(K, K+10);

  Wpon = W[9] + W[8] + W[7];
  Kpon = K[9] + K[8] + K[7];

  printf("%d %d\n", Wpon, Kpon);

  return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main() {
  priority_queue<int> q[2];
  int a, sum[2] = {0};
  for(int i=0; i<2; i++) {
    for(int j=0; j<10; j++) {
      cin >> a;
      q[i].push(a);
    }
  }
  for(int i=0; i<2; i++) {
    for(int j=0; j<3; j++) sum[i] += q[i].top(); q[i].pop();
  }
  cout << sum[0] << " " << sum[1] << endl;
}

C++: #include<iostream>
#include<string>
#include<algorithm>
using namespace std;
int main(void){

	int w[10],k[10];
	int W,K;

	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);
    W=w[9]+w[8]+w[7];
    K=k[9]+k[8]+k[7];
    cout <<W<<" "<<K<<endl;

	return 0;
}

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

	int A_best[3];
	int B_best[3];

int main(){
	int buf;
	for (int a = 0; a < 10; a++){
		scanf("%d", &buf);
		if (A_best[0] < buf){
			A_best[2] = A_best[1];
			A_best[1] = A_best[0];
			A_best[0] = buf;
			continue;
		}
		if (A_best[1] < buf){
			A_best[2] = A_best[1];
			A_best[1] = buf;
			continue;
		}
		if (A_best[2] < buf){
			A_best[2] = buf;
			continue;
		}
	}
	for (int a = 0; a < 10; a++){
		scanf("%d", &buf);
		if (B_best[0] < buf){
			B_best[2] = B_best[1];
			B_best[1] = B_best[0];
			B_best[0] = buf;
			continue;
		}
		if (B_best[1] < buf){
			B_best[2] = B_best[1];
			B_best[1] = buf;
			continue;
		}
		if (B_best[2] < buf){
			B_best[2] = buf;
			continue;
		}
	}
	printf("%d %d\n", A_best[0] + A_best[1] + A_best[2],
		B_best[0] + B_best[1] + B_best[2]);
	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;

int main()
{
	int a[10], b[10];
	for (int i = 0; i < 10; i++) {
		cin >> a[i];
	}
	sort(a, a + 10);
	for (int i = 0; i < 10; i++) {
		cin >> b[i];
	}
	sort(b, b + 10);
	int x = 0, y = 0;
	for (int i = 0; i < 3; i++) {
		x += a[9 - i];
	}
	for (int i = 0; i < 3; i++) {
		y += b[9 - i];
	}
	cout << x << ' ' << y << endl;
	return 0;
}

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

int main(){
	int w[3] = {0};
	int k[3] = {0};
	int w_sum = 0, k_sum = 0;
	int input;
	int i,j;
	for(i=0;i<10;i++){
		cin>>input;
		for(j=0;j<3;j++){
			if(w[j] < input){
				w[0] = input;
				sort(w, w+3);
				break;
			}
		}
	}
	
	for(i=0;i<10;i++){
		cin>>input;
		for(j=0;j<3;j++){
			if(k[j] < input){
				k[0] = input;
				sort(k, k+3);
				break;
			}
		}
	}
	for(i=0;i<3;i++){
		w_sum += w[i];
		k_sum += k[i];
	}
	cout<<w_sum<<" "<<k_sum<<endl;
	return 0;
}