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* a )
{
    for( int i = 0; i < 9; i++ )
        for( int j = i + 1; j < 10; j++ )
            if( a[i] < a[j] )
            {
                int x = a[i];
                a[i] = a[j];
                a[j] = x;
            }    
}

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);
    sort(b);

    cout << a[0] + a[1] + a[2] << " " << b[0] + b[1] + b[2] << endl;
    return 0;
}

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

int main(void)
{
	int d[2][10];

	for(int i = 0; i < 2; i++)
		for(int j = 0; j < 10; j++)
			cin >> d[i][j];

	int o[2] = {};

	for(int i = 0; i < 2; i++){
		sort(d[i],d[i]+10);
		for(int j = 9; j >= 7; j--)
			o[i] += d[i][j];
	}

	cout << o[0] << ' ' << o[1] << endl;

	return 0;
}

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

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

int main()
{
	for (int w = 0; w < 2; w++)
	{
		int a[10];
		for (int i = 0; i < 10; i++)
		{
			cin >> a[i];
		}
		sort(a, a + 10);
		int an = a[7] + a[9] + a[8];
		cout << an;
		if (w == 0)cout << " ";
	}
	cout << endl;
}

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

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

int main(){
  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());
    cout << point[0] + point[1] + point[2];
  }
}

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

int main(){
	int W[10], K[10];
	
	for(int i = 0; i < 10; i++) scanf("%d", &W[i]);
	for(int i = 0; i < 10; i++) scanf("%d", &K[i]);
	
	sort(W, W + 10);
	sort(K, K + 10);
	
	printf("%d %d\n", W[9] + W[8] + W[7], K[9] + K[8] + K[7]);
	
	return 0;
}

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

using namespace std;

main(){

  int w[10],k[10],temp;

  for(int i=0;i<10;i++){
    cin >> w[i];
  }

  for(int i=0;i<10;i++){
    cin >> k[i];
  }

  for(int i=0;i<9;i++){
    for(int j=9;j>i;j--){
      if(w[j]>w[j-1]){
	temp=w[j];
	w[j]=w[j-1];
	w[j-1]=temp;
      }
      if(k[j]>k[j-1]){
	temp=k[j];
	k[j]=k[j-1];
	k[j-1]=temp;
      }
    }
  }

  cout << w[0]+w[1]+w[2] << " " << k[0]+k[1]+k[2] << endl;

  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];
    }
    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;
    return 0;
}

C++: #include<iostream>
#define loop(i,a,b) for(int i=a;i<b;i++)
#define rep(i,a) loop(i,0,a)
using namespace std;

int main(){
	int ws=0,ks=0;
	int data;
	rep(i,10){cin>>data;ws+=data};
	rep(i,10){cin>>data;ks+=data);
	cout<< ws << " " <<ks << endl;
}

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

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

using namespace std;

int main(){

  int waseda[10];
  int keo[10];

  for( int i = 0 ; i < 10 ; i++ ){
    cin >> waseda[i];
  }
  for( int i = 0 ; i < 10 ; i++ ){
    cin >> keo[i];
  }

  sort( waseda , waseda + 10 );
  sort( keo , keo + 10);

  cout << waseda[9] + waseda[8] + waseda[7] << " " << keo[9] + keo[8] + keo[7] << endl;
}

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

int main() {
	int w[11]={},k[11]={},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 <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;
	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;
	return 0;
}

C++: #include <iostream>
#include <math.h>
#include <string>
#include <stdio.h>
#include <string.h>
#include <algorithm>

using namespace std;

int main(void)
{
    int w[10], k[20],W,K,w1,w2,w3,k1,k2,k3;

    for (int i = 0; i < 10; i++)
    {
        cin >> w[i];
    }

    for (int i = 0; i < 10; i++)
    {
        cin >> k[i];
    }

    k1 = 0; k2 = 0; k3 = 0;
    w1 = 0; w2 = 0; w3 = 0;

    for (int i = 0; i < 10; i++)
    {
        if (w[i] >= w1)
        {
            w3 = 0; 
            w3 = w2;
            w2 = 0;
            w2 = w1;
            w1 = 0;
            w1 = w[i];
        }
        else if (w[i] >= w2)
        {
            w3 = 0;
            w3 = w2;
            w2 = 0;
            w2 = w[i];
        }
        else if (w[i] >= w3)
        {
            w3 = 0;
            w3 = w[i];
        }
        if (k[i] >= k1)
        {
            k3 = 0; 
            k3 = k2;
            k2 = 0; 
            k2 = k1;
            k1 = 0;
            k1 = k[i];
        }
        else if (k[i] >= k2)
        {
            k3 = 0;
            k3 = k2;
            k2 = 0;
            k2 = k[i];
        }
        else if (k[i] >= k3)
        {
            k3 = 0;
            k3 = k[i];
        }

    }
        cout << w1 + w2 + w3 << " " << k1 + k2 + k3 << endl;
}

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

inline int calc() {
	priority_queue<int> que;
	for(int i = 0; i < 10; ++i) {
		int in;
		cin >> in;
		que.push(in);
	}

	int res = 0;
	for(int i = 0; i < 3; ++i, que.pop())
		res += que.top();

	return res;
}

int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);

	int score_w = calc(), score_k = calc();
	cout << score_w << " " << score_k << endl;

	return EXIT_SUCCESS;
}

C++: #include<cstdio>
#include<iostream>
#include<ctype.h>
#include<algorithm>
#include<string>
#include<cmath>
using namespace std;

int main(){
	int people[21], Total, Total2;
	for (int i = 0; i < 20; i++){
		cin >> people[i];
	}
	sort(people, people + 10,greater<int>());
	sort(people + 10, people + 20,greater<int>());
	Total = people[0] + people[1] + people[2];
	Total2 = people[10] + people[11] + people[12];
	cout << Total <<" "<< Total2 << endl;
	return 0;
}