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 <vector>
#include <algorithm>
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 <iostream>
#include <algorithm>
using namespace std;
 
int main() {
 int a[20];
 for (int i = 0;i <= 19;i++){
 	cin >> a[i];
 }
 int w = 0;int k = 0;
 for(int i = 3;i <= 9;i++){
 int p = a[i];
 for(int ii =0;ii <= 2;ii++){
 	if(p > a[ii]){
 		swap(a[ii],p);
 	}
 }
 }
w = a[0] + a[1] + a[2];
for(int i = 13;i <= 19;i++){
 int p = a[i];
 for(int ii =10;ii <= 12;ii++){
 	if(p > a[ii]){
 		swap(a[ii],p);
 	}
 }
 }
 k = a[10] + a[11] + a[12];
 cout >> w >>" " >> k >> endl;
	return 0;
}

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

int main(void) {
	int w[10],k[10];
	int i,j,p,q,t,s;
	int wsum=0,ksum=0,swap;
	for(i=0;i<10;i++) {
		scanf("%d\n",&w[i]);
	}
	for(t=0;t<10;t++){
		for(j=0;j<10;j++){
			if (w[j]>w[j+1]) {
				swap=w[j];
				w[j]=w[j+1];
				w[j+1]=swap;
			}
		}
	}
	wsum=w[9]+w[8]+w[7];
	for(p=0;p<10;p++){
		scanf("%d\n",&k[p]);
	}
	for(s=0;s<10;s++){
		for(q=0;q<10;q++){
			if (k[q]>k[q+1]) {
				swap=k[q];
				k[q]=k[q+1];
				k[q+1]=swap;
			}
		}
	}

		ksum=k[9]+k[8]+k[7];
		printf("%d %d\n",wsum,ksum);
		return EXIT_SUCCESS;
	}

C++: // 2011/11/14 Tazoe

#include <iostream>
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];

	for(int i=0; i<9; i++)
		for(int j=i+1; j<10; j++)
			if(W[i]<W[j]){
				int tmp = W[i];
				W[i] = W[j];
				W[j] = tmp;
			}

	for(int i=0; i<9; i++)
		for(int j=i+1; j<10; j++)
			if(K[i]<K[j]){
				int tmp = K[i];
				K[i] = K[j];
				K[j] = tmp;
			}

	cout << W[0]+W[1]+W[2] << ' ' << K[0]+K[1]+K[2] << endl;

	return 0;
}

C++: #include <iostream>
#include <algorithm>
using namespace std;
int main(){
int a[10];
int b[10];
int c;
c=0;
while(c<10){
cin >>a[c];
c=c+1;}
c=0;
while(c<10){
cin >>b[c];
c=c+1;}
sort(a,a+10);
sort(b,b+10);
int d;
d=a[9]+a[8]+a[7];
int e;
e=b[9]+b[8]+b[7];
cout <<d <<" "<<e<<endl;}

C++: #include<iostream>
using namespace std;
int main(){
    int big[3];
    for(int i=0;i<3;i++)big[i]=0;
    for(int i=0;i<10;i++){
        int a;
        cin>>a;
        if(a>big[0]){
            big[2]=big[1];
            big[1]=big[0];
            big[0]=a;
        }
        else if(a>big[1]){
            big[2]=big[1];
            big[1]=a;
        }
        else if(a>big[2])big[2]=a;
    }
    int W=big[0]+big[1]+big[2];

    for(int i=0;i<3;i++)big[i]=0;
    for(int i=0;i<10;i++){
        int a;
        cin>>a;
        if(a>big[0]){
            big[2]=big[1];
            big[1]=big[0];
            big[0]=a;
        }
        else if(a>big[1]){
            big[2]=big[1];
            big[1]=a;
        }
        else if(a>big[2])big[2]=a;
    }
    int K=big[0]+big[1]+big[2];
    cout<<W<<" "<<K<<endl;
    return 0;
}

C++: #include <iostream>
#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, greater<int>());
	sort(k, k+10, greater<int>());
	
	int p=0, q=0;
	for(int i=0; i<3; ++i) p+=w[i];
	for(int i=0; i<3; ++i) q+=k[i];
	
	printf("%d %d\n", p, q);
	return 0;
}

C++: #include<iostream>
#include<algorithm>
#include<functional>
using namespace std;
int main(){
  int W[10],K[10],wsum,ksum,a=10,b=10;
  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+a , greater<int>() );
  sort( K , K+b , 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(){
  int n;
  vector<int> A, B;
  int sumA=0, sumB=0;
  for(int i=0; i<10; i++){
    cin >> n;
    A.push_back(n);
  }
  sort(A.begin(), A.end(), greater<int>());
  sumA += A[0]+A[1]+A[2];
  for(int i=0; i<10; i++){
    cin >> n;
    B.push_back(n);
  }
  sort(B.begin(), B.end(), greater<int>());
  sumB += B[0]+B[1]+B[2];
  
  cout << sumA << " " << sumB << endl;
  return 0;
}

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

int main(){
	int A = 0, B = 0;
	int buf;
	for (int a = 0; a < 10, a++){
		scanf("%d", &buf);
		A += buf;
	}
	for (int a = 0; a < 10, a++){
		scanf("%d", &buf);
		B += buf;
	}
	printf("%d %d\n", A, B);
	return 0;
}

C++: #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
typedef vector <int> VI;
int main( void )
{
	VI 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.rbegin(), a.rend() );
	sort( b.rbegin(), b.rend() );
	int sa = 0, sb = 0;
	for ( int i = 0; i < 3; i++ )
	{
		sa += a[i];
		sb += b[i];
	}
	cout << sa << " " << sb << endl;
	return 0;
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main(void){
  int ans1=0,ans2=0,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);
  for(int i=7;i<=9;i++){
    ans1 +=a[i];
    ans2 +=b[i];
  }cout << ans1<< " " << ans2<< endl;
}

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

using namespace std;
int main(void)
{
	int a[11],b[11];
	int i,wa,wb;
	for(i=0;i<10;i++) scanf("%d",&a[i]);
	for(i=0;i<10;i++) scanf("%d",&b[i]);
	sort(a,a+10,greater<int>());
	sort(b,b+10,greater<int>());
	wa=0; wb=0;
	for(i=0;i<3;i++){
		wa+=a[i]; wb+=b[i];
	}
	printf("%d %d\n",wa,wb);
	return 0;
}

C++: /*
	0533:Contest
*/
#include	<iostream>
#include	<queue>

using namespace std;

int main(void) {
	priority_queue<int> W;
	priority_queue<int> K;
	int WP, KP, tops[2][3];
	
	for(int i = 0; i < 10; i++) {
		int p;
		cin >> p;
		W.push( p );
	}
	for(int j = 0; j < 3; j++) {
		tops[0][j] = W.top();
		W.pop();
	}
	WP = tops[0][0] + tops[0][1] + tops[0][2];
	
	for(int i = 0; i < 10; i++) {
		int p;
		cin >> p;
		K.push( p );
	}
	for(int j = 0; j < 3; j++) {
		tops[1][j] = K.top();
		K.pop();
	}
	KP = tops[1][0] + tops[1][1] + tops[1][2];
	
	cout << WP << endl << KP << endl;
	
	return 0;
}

C++: #include<stdio.h>
int main(void)
{
	int a[10],b[10],i,j,w,k,box;
	for(i=0;i<10;i++){
		scanf("%d",&a[i]);
	}
	for(i=0;i<10;i++){
		scanf("%d",&b[i]);
	}
	for(i=0;i<9;i++){
		for(j=i+1;j<10;j++){
			if(a[i]<a[j]){
			box=a[i];
			a[i]=a[j];
			a[j]=box;
			}
		}
	}
	for(i=0;i<9;i++){
		for(j=i+1;j<10;j++){
			if(b[i]<b[j]){
			box=b[i];
			b[i]=b[j];
			b[j]=box;
			}
		}
	}
	w=a[0]+a[1]+a[2];
	k=b[0]+b[1]+b[2];
	printf("%d %d\n",w,k);
	return 0;
}

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

C++: #include<iostream>
#include<algorithm>
#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 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>() );
	int wpoint=0,kpoint=0;
	rep(i,3){
		wpoint+=w[i];
		kpoint+=k[i];
	}
	cout<<wpoint<<" "<<kpoint<<endl;
	return 0;
}