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 <cstdio>
#include <cstdlib>

using namespace std;

int main() {
	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 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[9]+w[8]+w[7]<<" "<<k[9]+k[8]+k[7]<<endl;

  return 0;
}

C++: // 2011/11/21 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 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] << "\n";
	return 0;

}

C++: #include <fstream>
#include <iostream>
#include <cmath>
#include <vector>
#include <queue>
#include <utility>
#include <algorithm>
using namespace std;

int main() {
  ifstream cin("../test.txt");
  int w[10];
  int 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 sum_w = w[7] + w[8] + w[9];
  int sum_k = k[7] + k[8] + k[9];

  cout << sum_w << " " << sum_k << endl;;
}

C++: #include <bits/stdc++.h>
#define rep(i,l,n) for(int i=l;i<n;i++)
#define rer(i,l,n) for(int i=l;i<=n;i++)
#define all(a) a.begin(),a.end()
#define o(a) cout<<a<<endl
#define fi first
#define se second
using namespace std;
typedef long long ll;
typedef vector<int> vint;
typedef pair<int,int> pii;

int main(){
	vint w(10),k(10);
	int sw=0,sk=0;
	rep(i,0,10) cin>>w[i];
	rep(i,0,10) cin>>k[i];
	sort(all(w));
	sort(all(k));
	rep(i,7,10) sw+=w[i];
	rep(i,7,10) sk+=k[i];
	o(sw<<" "<<sk);
}

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

using namespace std;

void inputData(int* data) {
	for (int i = 0; i < 10; i++) {
		cin >> data[i];
	}
}

int comp(const void *c1, const void *c2) {
	int tmp1 = *(int *)c1;
	int tmp2 = *(int *)c2;

	if( tmp1 > tmp2 )  return -1;
	if( tmp1 == tmp2 ) return  0;
	if( tmp1 < tmp2 )  return  1;
}

int calcUnivScore(const int* data) {
	int score = 0;
	for (int i = 0; i < 3; i++) {
		score += data[i];
	}
	return score;
}

int main()
{
	int univW[10], univK[10];
	inputData(univW);
	inputData(univK);

	qsort(univW, 10, sizeof(int), comp);
	qsort(univK, 10, sizeof(int), comp);

	int scoreW = calcUnivScore(univW);
	int scoreK = calcUnivScore(univK);

	cout << scoreW << " " << scoreK;

	return 0;
}

C++: #include<iostream>
#include<algorithm>
int main() {
	int W[10];
	int K[10];
	for (int i = 0; i < 20; ++i) {
		if (i <= 9) {
			std::cin >> W[i];
		}
		else if (i >= 10) {
			std::cin >> K[i - 10];
		}
	}
	std::sort(W, W + 10);
	std::sort(K, K + 10);
	std::cout << W[7] + W[8] + W[9] << " " << K[7] + K[8] + K[9] << std::endl;
	return 0;
}

C++: //32
#include<iostream>
#include<algorithm>
#include<numeric>
#include<functional>

using namespace std;

int main(){
  int p[2][10];
  for(int i=0;i<2;i++){
    for(int j=0;j<10;j++){
      cin>>p[i][j];
    }
  }
  for(int i=0;i<2;i++){
    sort(p[i],p[i+1],greater<int>());
    cout<<accumulate(p[i],p[i]+3,0)<<((i==0)?' ':'\n');
  }
  return 0;
}

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

int main()
{
    int a[20];
     for(int i=0;i<20;i++){
    cin>>a[i];
   }
  sort(a,a+10,greater<int>());
  sort(a+10,a+20,greater<int>());
  cout<<a[0]+a[1]+a[2]<<" "<<a[10]+a[11]+a[12]<<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.rbegin(), point.rend(), );
     P[i] = point[0] + point[1] + point[2];
  }
  cout << P[0] << " " << P[1] << endl;
}

C++: #include<algorithm>
#include<cstdio>
#define s(A)std::sort(A,A+10);
main(){
int Z[20],i=0;
for(;i<20;)
scanf("%d",Z+i++);
s(Z);
s(Z+10);
printf("%d %d\n",Z[7]+Z[8]+Z[9],Z[17]+Z[18]+Z[19]);
}

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

int main()
{

	int W_college[10], K_college[10];

	for(int i = 0; i < 20; i++) {
		i <= 9 ? cin >> W_college[i] : cin >> K_college[i - 10];
	}

	sort(W_college, W_college + 10);
	sort(K_college, K_college + 10);

	cout << W_college[7] + W_college[8] + W_college[9] << " " << K_college[7] + K_college[8] + K_college[9] << endl;

	return 0;

}

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

int main()
{
	int W[10 + 5] = { 0 };
	int K[10 + 5] = { 0 };

	int wp, kp;

	int tmp;

	int i,j;

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


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

	cout << wp << " " << kp << endl;
	return 0;
}

C++: #include <iostream>
#include <vector>
#include <algorithm>
#include <stack>
#include <string>
#include <functional>
#include <cmath>
#include <cstdio>
using namespace std;

#define PI 4*atan(1);

int main(){
  vector<int> W, K;
  int tmp, sumW = 0, sumK = 0;
  for(int i = 0; i < 10; i++){
    cin >> tmp;
    W.push_back(tmp);
  }
  for(int i = 0; i < 10; i++){
    cin >> tmp;
    K.push_back(tmp);
  }
  sort(W.begin(), W.end(), greater<int>());
  sort(K.begin(), K.end(), greater<int>());
  for(int i = 0; i < 3; i++){
    sumW += W[i];
    sumK += K[i];
  }
  cout << sumW << " " << sumK << endl;
}

C++: #include<iostream>
#include<algorithm>
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);
	sort(inK, inK + 9);
	cout << inW[7] + inW[8] + inW[9] << " " << inK[7] + inK[8] + inK[9] << endl;
	return 0;
}