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 <algorithm>
using namespace std;

int main() {

	int W[10];
	int K[10];

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

	while (i<20) {
		cin >> K[i-10];
		i++;
	}

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

	cout << W[7] + W[8] + W[9] << K[7] + K[8] + K[9] << endl;

	return 0;
}

C++: #include<stdio.h>
int main(void){
	int w[10],k[10],x=0,y=0,z,za=0,wa=0,n,s;
	for(z=0;z<10;z++){
		scanf("%d",&w[z]);
	}
	for(s=0;s<3;s++){
		for(z=0;z<10;z++){
			if(za < w[z]){
				za = w[z];
				n = z;
			}
		}
		x += za;
		w[n] = 0;
		za = 0;
		n = 0;
	}
	for(z=0;z<10;z++){
		scanf("%d",&k[z]);
	}
	for(s=0;s<3;s++){
		for(z=0;z<10;z++){
			if(wa < k[z]){
				wa = k[z];
				n = z;
			}
		}
		y += wa;
		k[n] = 0;
		wa = 0;
		n = 0;
	}
	printf("%d  %d\n",x,y);
	return 0;
}

C++: #include <stdio.h>
#include <stack>
#include <math.h>

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]);

	for(int i = 1; i <= 9; i++){
		for(int p = 9; p >= i; p--){
			if(w[p] > w[p-1])swap(w[p],w[p-1]);
			if(k[p] > k[p-1])swap(k[p],k[p-1]);
		}
	}

	printf("%d %d\n",w[0]+w[1]+w[2],k[0]+k[1]+k[2]);

    return 0;
}

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

int main(){
    vector<int> w(10);
    vector<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.begin(), w.end(), greater<int>());
    sort(k.begin(), k.end(), greater<int>());

    int w_sum = 0;
    int k_sum = 0;

    for(int i=0; i<3; i++){
        w_sum += w[i];
        k_sum += k[i];
    }

    printf("%d %d\n", w_sum, k_sum);

    return 0;
}

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

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

C++: #include<iostream>
#include<algorithm>
#include<cstdio>
#include<cmath>
#include<math.h>
#include<string>
#include<string.h>
#include<stack>
#include<queue>
#include<vector>
#include<utility>
#include<set>
#include<map>
#include<stdlib.h>
#include<iomanip>

using namespace std;

#define ll long long
#define ld long double
#define EPS 0.0000000001
#define INF 1e9
#define rep(i,n) for(i=0;i<n;i++)
#define loop(i,a,n) for(i=a;i<n;i++)
#define all(in) in.begin(),in.end()
#define shosu(x) fixed<<setprecision(x)

typedef vector<int> vi;
typedef pair<int,int> pii;

int main(void) {
  int i,j;
  vi w(10);
  vi k(10);
  rep(i,10)
    cin>>w[i];
  rep(i,10)
    cin>>k[i];
  sort(all(w));
  sort(all(k));
  cout<<w[7]+w[8]+w[9]<<" "<<k[7]+k[8]+k[9]<<endl;
}

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

int main()
{
	int test[20],num1,num2,num3,num4;

	for(int i=0;i<20;i++){
		cin>>test[i];
	}
	for(int u=0;u<9;u++){
		for(int k=u+1;k<10;k++){
		if(test[u]<test[k]){
			num1=test[u];
			test[u]=test[k];
			test[k]=num1;
		}
		}
	}
	for(int o=10;o<19;o++){
		for(int l=o+1;l<20;l++){
		if(test[o]<test[l]){
			num2=test[o];
			test[o]=test[l];
			test[l]=num2;
		}
		}
	}
	num3=test[0]+test[1]+test[2];
	num4=test[10]+test[11]+test[12];
	cout<<num3<<" "<<num4;
	cout<<"\n";

	return 0;
}

C++: #include<cstdio>
#include<iostream>
int main(){
    int nowpoint,wran[3]={0},kran[3]={0},wsum=0,ksum=0;
    for(int i=0;i<10;i++){
        scanf("%d",&nowpoint);
        if(wran[0]<nowpoint)
            wran[2]=wran[1],wran[1]=wran[0],wran[0]=nowpoint;
        else if(wran[1]<nowpoint)
            wran[2]=wran[1],wran[1]=nowpoint;
        else if(wran[2]<nowpoint)
            wran[2]=nowpoint;
    }
    for(int i=0;i<10;i++){
        scanf("%d",&nowpoint);
        if(kran[0]<nowpoint)
            kran[2]=kran[1],kran[1]=kran[0],kran[0]=nowpoint;
        else if(kran[1]<nowpoint)
            kran[2]=kran[1],kran[1]=nowpoint;
        else if(kran[2]<nowpoint)
            kran[2]=nowpoint;
    }
    for(int i=0;i<3;i++)
        wsum+=wran[i],ksum+=kran[i];
    printf("%d %d\n",wsum,ksum);
    return 0;
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main(){
  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,greater<int>());
  sort(k,k+10,greater<int>());
  cout<<w[0]+w[1]+w[2]<<' '<<k[0]+k[1]+k[2]<<endl;
}

C++: # include <iostream>
# include <vector>
# include <limits>
# include <algorithm>
# include <map>
# include <string>
#include <functional>
using namespace std;

int main() {
	vector<int> w, k;
	int a;
	for (int i = 0; i < 10; i++) {
		cin >> a;
		w.emplace_back(a);
	}
	sort(w.begin(), w.end(), greater<int>());
	for (int i = 0; i < 10; i++) {
		cin >> a;
		k.emplace_back(a);
	}
	sort(k.begin(), k.end(), greater<int>());
	cout << w[0] + w[1] + w[2] << " " << k[0] + k[1] + k[2] << endl;
}

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

int main() {
	vector<int> p[2];
	int tmp;
	for(int j=0;j<2;j++){
	for(int i=0;i<10;i++){
		cin >> tmp;
		p[j].push_back(tmp);
	}
	sort(p[j].begin(),p[j].end(),greater<int>());
	int sum=0;
	for(int i=0;i<3;i++)
	sum+=p[j][i];
	cout << sum;
	if(!j)
	cout << " ";
	else
	cout << endl;
	}
	// your code goes here
	return 0;
}

C++: #include <iostream>
#include <queue>
#include <cctype>
#include <stdio.h>
#include <map>
#include <algorithm>
#include <vector>

using namespace std;


int main(int argc, char const* argv[])
{
    int tmp;
    vector<int> a(10);
    vector<int> b(10);
    for (int i = 0; i < 10; i++) 
    {
        cin >> tmp;
        a.push_back(tmp);
    }
    for (int i = 0; i < 10; i++) 
    {
        cin >> tmp;
        b.push_back(tmp);
    }
    sort( a.begin(),a.end(),greater<int>() );
    sort( b.begin(),b.end(),greater<int>() );
    int all_a=0;
    int all_b=0;
    for (int i = 0; i < 3; i++) 
    {
        all_a += a[i];
        all_b += b[i];
    }

    cout << all_a << " " << all_b << endl;
    return 0;
}

C++: #include <cstdio>
#include <iostream>
#include <algorithm>
#include <cstdlib>
#include <vector>
#include <queue>
#include <map>
#include <functional>
#include <cstring>
using namespace std;
#define INF 1000000000
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[7]+w[8]+w[9],k[7]+k[8]+k[9]);
	return 0;
}

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

int main(){

	int w[10], k[10];
	
	for(int i=0; i<2; i++){
		for(int j=0; j<10; j++){
			if(i == 0) cin >> w[j];
			else cin >> k[j];
		}
	}
	
	sort(w, w+10, greater<int>());
	sort(k, k+10, greater<int>());
	
	cout << w[0] + w[1] + w[2] << " " << k[0] + k[1] + k[2] << endl;
	
	return 0;

}