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 <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 << endl;

	return 0;
}

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

using namespace std;

int main(){
	vector<int> a;
	vector<int> b;
	int s;
	for(int i=0;i<20;i++){
		scanf("%d",&s);
		(i < 10?a:b).push_back(s);
	}
	sort(a.begin(),a.end());
	sort(b.begin(),b.end());
	printf("%d %d\n",a[7] + a[8] + a[9],b[7] + b[8] + b[9]);
}

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

int main(){
	vector<int> w, k;
	for (int i = 0; i < 10; i++){
		int x;
		scanf("%d", &x);
		w.push_back(x);
	}
	for (int i = 0; i < 10; i++){
		int x;
		scanf("%d", &x);
		k.push_back(x);
	}
	
	sort(w.begin(), w.end());
	sort(k.begin(), k.end());

	printf("%d %d\n", w[7] + w[8] + w[9], k[7] + k[8] + k[9]);

	return 0;
}

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

int main(){

	int d[11];
	for(int i = 0;i < 10;i++)cin >> d[i];
	sort(d,d+10);
	cout << d[7]+d[8]+d[9] << " ";
	for(int i = 0;i < 10;i++)cin >> d[i];
	sort(d,d+10);
	cout << d[7]+d[8]+d[9] << endl;

	return 0;
}

C++: #include<stdio.h>
#include<algorithm>
#include<functional>
using namespace std;
int main(void)
{
	int i,s=0,z=0,a[11],aa[11];
	for(i=1;i<=10;i++){
		scanf("%d",&a[i]);
	}
	sort(a,a+10,greater<int>());
	for(i=1;i<=10;i++){
		scanf("%d",&aa[i]);
	}
	sort(aa,aa+10,greater<int>());
	s=a[0]+a[1]+a[2];
	z=aa[0]+aa[1]+aa[2];
	printf("%d %d\n",s,z);
	return 0;
}

C++: #include <iostream>
#include<vector>
#include<algorithm>
int main(){
    int a;
    std::vector<int> data;
    std::vector<int> d;
    for(int i=0;i<10;i++){
        std::cin>>a;
    data.push_back(a);
    }
    for(int i=0;i<10;i++){
        std::cin>>a;
    d.push_back(a);
    }
    std::sort(data.begin(),data.end(),std::greater<int>());
    std::sort(d.begin(),d.end(),std::greater<int>());
    std::cout<<data[0]+data[1]+data[2]<<" "<<d[0]+d[1]+d[2]<<std::endl;
    return 0;
}

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

using namespace std;
using ll = long long;

int main() {
    int w=0,k=0;
    vector<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.begin(),a.end());
    sort(b.begin(),b.end());
    w+=a[9]+a[8]+a[7];
    k+=b[9]+b[8]+b[7];
    cout<<w<<" "<<k<<endl;
    return 0;
}

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

int main(){
  int sum[2] = {0};

  for(int i = 0; i < 2; i++){
    int x[10];
    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;
}

C++: #include<iostream>
#include<algorithm>
#include<string>
#include<vector>
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[10];
	}
	sort(W, W + 10);
	reverse(W, W + 10);
	sort(K, K + 10);
	reverse(K, K + 10);
	cout << W[0] + W[1] + W[2] << " " << K[0] + K[1] + K[2] << endl;

	//ポイントカード
	/*
	int N, M;
	cin >> N >> M;
	int a;
	int A[5000];
	int b = 0;
	int x = 0;
	for (int i = 0; i <  M; i++) {
		cin >> a;
		if (a < N) {
			A[x]=a;
			x++;
		}
		else
		{
			b++;
		} 
		cin >> a;
	}
	int sum = 0;
	if (b < M - 1) {
		sort(A, A+x);
		reverse(A, A+x);
		for (int i = 0; i < M - 1 - b; i++) {
			sum += N - A[i];
		}
	}
	cout << sum << endl;
	*/

	//合計時間
	/*
	int sum=0, n;
	for (int i = 0; i < 4; i++) {
	cin >> n;
	sum += n;
	}
	cout << sum / 60 << endl;
	cout << sum % 60 << endl;
	//平均点
	/*
	int P[5];
	int sum=0;
	for (int i = 0; i < 5; i++) {
	cin >> P[i];
	if (P[i] < 40) P[i] = 40;
	sum += P[i];
	}
	cout << sum / 5 << endl;
	*/
	//投票
	/*
	int N, M;
	cin >> N >> M;
	int A[1000], vote[1000];
	for (int i = 0; i < N; i++) {
	cin >> A[i];
	vote[i] = 0;
	}
	int b;
	for (int i = 0; i < M; i++) {
	cin >> b;
	for (int j = 0; j < N; j++) {
	if (A[j] <= b) {
	vote[j]++;
	break;
	}
	}
	}
	int temps = 0, ans;
	for (int i = 0; i < N; i++) {
	if (vote[i] > temps) {
	temps = vote[i];
	ans = i;
	}
	}
	cout << ans + 1 << endl;
	*/

	//2.すごろく	
	/*
	int n;
	cin >> n;
	int A, _A = 1;
	int k = 0;
	int A_count[100];
	A_count[0] = 1;
	for (int i = 0; i < n; i++)
	{
	cin >> A;
	if (A == 1)
	{
	if (A == _A)
	{
	A_count[k]++;
	}
	else
	{
	k++;
	A_count[k] = 2;
	}
	}
	_A = A;
	}
	sort(A_count, A_count + k + 1);
	cout << A_count[k] << endl;
	*/

	//タイムカード
	/*
	int t[2][3];
	int x[3][3];
	for (int n=0; n < 3; n++)
	{
	for (int i=0; i < 2; i++)
	for (int k=0; k < 3; k++)
	cin >> t[i][k];

	for (int m = 2; m >= 0; m--)
	{
	x[n][m] = t[1][m] - t[0][m];
	if (t[0][m] > t[1][m])
	{
	x[n][m] += 60;
	t[1][m - 1]--;
	}
	}
	}
	for (int n= 0; n < 3; n++)
	{
	cout << x[n][0] << ' ' << x[n][1] <<' '<< x[n][2] << endl;
	}
	*/



	return 0;
}

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

int main(void){
    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 <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])<<endl;
}

C++: #include<stdio.h>


int main(){
	int W[10],K[10],i,j,c;
	
	for(i=0;i<10;i++){
		scanf("%d",&W[i]);
	}
	for(i=0;i<10;i++){
		scanf("%d",&K[i]);
	}
	for(i=0;i<10;i++){
		for(j=i;j<10;j++){
			if(W[i]<W[j]){
				c=W[i];
				W[i]=W[j];
				W[j]=c;
			}
			if(K[i]<K[j]){
				c=K[i];
				K[i]=K[j];
				K[j]=c;
			}
		}
	}
	printf("%d %d\n",W[0]+W[1]+W[2],K[0]+K[1]+K[2]);
	return 0;
}

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

int main(){
int a[10];
int b[10];
int c;
int d;
int e;
int f;
int g;
int h;
int i;
c=0;
d=0;
e=0;
f=0;
g=0;
h=0;
i=0;
while(i<10){
cin >> a[i];
i=i+1;}
i=0;
while(i<10){
cin >> b[i];
i=i+1;}
i=0; 
while(i<10){
if(c<a[i]){e=d;d=c;c=a[i];}
else if(d<a[i]){e=d;d=a[i];}
else if(e<a[i]){e=a[i];}
if(f<b[i]){h=g;g=f;f=b[i];}
else if(g<b[i]){h=g;g=b[i];}
else if(h<b[i]){h=b[i];}
i=i+1;}
cout << c+d+e;
cout << " ";
cout << f+g+h;}

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