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 <vector>
#include <queue>
#include <stack>
#include <map>
#include <algorithm>
#include <sstream>
#include <cmath>
#include <set>
#include <cstdio>
#include <iomanip>

using namespace std;

#define REP(i,n) for(int (i)=0;(i)<(int)(n);(i)++)
#define RREP(i,n) for(int (i)=(int)(n)-1;(i)>=0;(i)--)
#define REMOVE(Itr,n) (Itr).erase(remove((Itr).begin(),(Itr).end(),n),(Itr).end())
#define PB_VEC(Itr1,Itr2) (Itr1).insert((Itr1).end(),(Itr2).begin(),(Itr2).end())
#define UNIQUE(Itr) sort((Itr).begin(),(Itr).end()); (Itr).erase(unique((Itr).begin(),(Itr).end()),(Itr).end())

typedef long long ll;

int main(){
    
    int a[20];
    REP(i,20)cin>>a[i];
    
    sort(a,a+10);
    sort(a+10,a+20);
    
    cout<<a[7]+a[8]+a[9]<<" "<<a[17]+a[18]+a[19]<<endl;
    
    return 0;
}

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

using namespace std;

int main(){
  int i = 0,d[20];
  while(cin >> d[i++]);
  sort(d,d+10);
  sort(d+11,d+20);
  cout << max(d[7] + d[8] + d[9] , d[17] + d[18] + d[19]) << endl;
}

C++: #include<iostream>
#include<cstdio>
#include<algorithm>
using namespace std;
int main(void)
{
	int n[10],k[10],a,b;
	for(int i=0;i<10;i++)
	{
		cin>>n[i];
	}
	sort(n,n+10);
	a=n[9]+n[8]+n[7];
	for(int i=0;i<10;i++)
	{
		cin>>k[i];
	}
	sort(k,k+10);
	b=k[9]+k[8]+k[7];
	cout<<a<<" "<<b<<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);
	cout<<a[7]+a[8]+a[9]<<" "<<b[7]+b[8]+b[9]<<endl;
	return 0;
}

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

int main(void){
  int x[10];
  int sum[2];

  for(int i=0;i<2;i++){
    for(int j=0;j<10;j++){
      cin>>x[j];
    }
    sort(x,x+10);
    sum[i] = x[9]+x[8]+x[7];
  }
  cout<<sum[0]<<" "<<sum[1]<<endl;

  return 0;
}

C++: #include<iostream>
#include<cmath>
#include<map>
#include<set>
#include<vector>
#include<algorithm>
#include<string.h>
#include<queue>
#include<stack>
#include<climits>
#include<cmath>
#include<stdio.h>

using namespace std;
int main(){
    priority_queue<int> se1,se2;
    for(int i=0;i<10;i++){
        int j;
        cin>>j;
        se1.push(j);
    }
    for(int i=0;i<10;i++){
        int j;
        cin>>j;
        se2.push(j);
    }
    int a=0,b=0;
    for(int i=0;i<3;i++){
        a+=se1.top();
        se1.pop();
    }
    for(int i=0;i<3;i++){
        b+=se2.top();
        se2.pop();
    }
    cout<<a<<" "<<b<<endl;
    return 0;
}

C++: #include<iostream>
#include<cstdio>
#include<algorithm>
#include<functional>
using namespace std;
#define INF (1<<29)
#define rep(i,n) for(int i=0;i<(n);i++)

int main(){
	int w[10],k[10];
	rep(i,10)cin>>w[i];
	rep(i,10)cin>>k[i];
	sort(w,w+10,greater<int>());
	sort(k,k+10,greater<int>());
	cout<<*w+w[1]+w[2]<<' '<<*k+k[1]+k[2]<<endl;
	return 0;
}

C++: #include <bits/stdc++.h>
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]);
    cout << w[7] + w[8] + w[9] << " " << k[7] + k[8] + k[9] << endl;
}

C++: #include <bits/stdc++.h>
using namespace std;
#define p for(int i = 0;i < 10;i++)
int main(void)
{
	int n[10]={0},m[10]={0},w=0,k=0;
	
	p{
		cin >> n[i] ;
	}
	p{
		cin >> m[i] ;
	}
	sort(n,n+10);
	w = n[9] + n[8] + n[7] ;
	sort(m,m+10);
	k = m[9] + m[8] + m[7] ;
	cout << w << " " << k << endl ;
	
	return 0;
}

C++: #include "iostream"
#include "climits"
#include "list"
#include "queue"
#include "stack"
#include "set"
#include "functional"
#include "algorithm"
#include "string"
#include "map"
#include "unordered_map"
#include "iomanip"
#include "cmath"

using namespace std;

const long long int MOD = 1000000007;

long long int N, M, K, H, W, L, R;

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

	vector<int>v(10);
	vector<int>w(10);
	for (int i = 0; i < 10; i++) {
		cin >> v[i];
	}
	for (int i = 0; i < 10; i++) {
		cin >> w[i];
	}
	sort(v.begin(), v.end());
	sort(w.begin(), w.end());
	cout << v[7] + v[8] + v[9] << " " << w[7] + w[8] + w[9] << endl;
	return 0;
}

C++: #include <cstdio>
#include <cstdlib>
#include <cstring>
using namespace std;
char h[3]={" \n"};
int main()
{
int w[3],x;
for(int j=0;j<2;j++){
 memset(w,0,sizeof(w));
 for(int i=0;i<10;i++){
 scanf("%d",&x);
 if(x>w[0]){w[2]=w[1]; w[1]=w[0]; w[0]=x;}
 else if(x>w[1]) {w[2]=w[1]; w[1]=x;}
 else if(x>w[2]) w[2]=x;
 }
 printf("%d%c",w[0]+w[1]+w[2],h[j]);
}
}

C++: #include<iostream>
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);
  cout << a[8]+a[9]+a[7] << endl;
  cout << b[8]+b[9]+b[7] << endl;
  return 0;
}

C++: // 2012/12/13 Tazoe

#include <iostream>
#include <algorithm>
using namespace std;

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

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

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

	cout << W[9]+W[8]+W[7] << ' ' << K[9]+K[8]+K[7] << '\n';

	return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main()
{
  int in1[10];
  int in2[10];
  int n = 2;
  for(int i = 0;i < 10;i++){
    cin >> in1[i];
  }
  for(int i = 0;i < 10;i++){
    cin >> in2[i];
  }

  sort(in1,in1+10);
  sort(in2,in2+10);
  int ans1 = in1[9] + in1[8] + in1[7];
  int ans2 = in2[9] + in2[8] + in2[7];

  cout << ans1 << ' ' << ans2 << endl;
}

C++: #include<bits/stdc++.h>

using namespace std;

int main(){

  vector<int> w(10);
  vector<int> k(10);
  int w1=0;
  int w2=0;
  int w3=0;
  
  for(int i=0;i<10;++i)
	cin>>w[i];

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

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

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

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

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

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

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

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

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

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

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

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

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

  return 0;
  
}

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

int main(){
  int w[10],k[10];
  int sum1 = 0, sum2 = 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);
  sort(k, k+10);

  for(int i = 0; i < 3; i++){
    sum1 += w[9-i];
    sum2 += k[9-i];
  }

  cout << sum1 << " " << sum2 << endl;

}

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

int main() {
	int sum = 0, num[10] = { 0 };
	for (int j = 0; j < 2; j++) {
		sum = 0;
		for (int i = 0; i < 10; i++) {
			cin >> num[i];
		}
		sort(num, num + 10);
		sum = num[7] + num[8] + num[9];
		cout << sum << endl;
	}
	return 0;
}