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;

main(){
  int data1[10], data2[10];
  while(cin >> data1[0]){
    for(int i=1;i<10;i++){
      cin >> data1[i];
    }
    for(int i=0;i<10;i++){
      cin >> data2[i];
    }

    sort(data1, data1+10);
    reverse(data1, data1+10);
    sort(data2, data2+10);
    reverse(data2, data2+10);
    cout << data1[0]+data1[1]+data1[2] << endl;
    cout << data2[0]+data2[1]+data2[2] << endl;
  }
  return 0;
}

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

using namespace std;

void solve()
{
	vector<int> wVec(10);
	vector<int> kVec(10);
	for(int i = 0; i < 10; ++i)
	{
		cin >> wVec[i];
	}
	for(int i = 0; i < 10; ++i)
	{
		cin >> kVec[i];
	}
	sort(wVec.begin(), wVec.end());
	sort(kVec.begin(), kVec.end());
	cout << wVec[wVec.size() - 1] + wVec[wVec.size() - 2] + wVec[wVec.size() - 3] << " " << kVec[kVec.size() - 1] + kVec[kVec.size() - 2] + kVec[kVec.size() - 3] << endl;
}

int main()
{
	solve();
	return(0);
}

C++: #include <iostream>
#include <cstdio>
#include <algorithm>
#include <string>
#include <cstring>
#include <cctype>
#include <cmath>
#include <stack>
#include <queue>
#include <vector>
#include <set>
#include <map>
#include <list>
#include <stdio.h>
#include <string.h>
#include <cstdlib>
#include <math.h>
#include <bitset>
#define INF 2000000000
using namespace std;
int dx[4]={1,0,-1,0},dy[4]={0,1,0,-1};
#define ll long long
#define PL pair<long long, long long>
#define P pair<int,int>
#define mk make_pair
#define en endl;
#define WHITE 0
#define BLACK 2
#define GRAY 1
#define RE return 0;
#define HERE cout<<"    "<<"HERE"<<en

string jj("JOI");
string ii("IOI");

int main(){
  priority_queue<int> pq_w;
  for(int i=0; i<10; i++){
    int n;
    cin>>n;
    pq_w.push(n);
  }
  priority_queue<int> pq_k;
  for(int i=0; i<10; i++){
    int n;
    cin>>n;
    pq_k.push(n);
  }
  
  int w=0,k=0;
  for(int i=0; i<3; i++){
    w+=pq_w.top(); pq_w.pop();
    k+=pq_k.top(); pq_k.pop();
  }
  cout<<w<<endl<<k<<en
}

C++: #include<algorithm>
#include<cstdio>
#define s(A,B) std::sort(A,B);
int main(){
int W[10],K[10],p;
for(int i=0;i<20;i++)
scanf("%d",&p),(i<10)?W[i] = p:W[i-10] = p;
s(W,W+10);
s(K,K+10);
int Wp = W[7] + W[8] + W[9],Kp = K[7] + K[8] + K[9];
printf("%d %d\n",Wp,Kp);
}

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

using namespace std;

int main(int argc, char **argv)
{
	int *array, tmp;
	
	for(int i = 0; i < 2; i++){
		array = (int *)calloc(3, sizeof(int));
		if(i == 1){
			cout << " ";
		}
		for(int j = 0; j < 10; j++){
			cin >> tmp;
			if(array[0] < tmp){
				array[0] = tmp;
				sort(array, array+3);
			}
		}
		cout << (array[0]+array[1]+array[2]);
	}
	cout << endl;
	
	return 0;
}

C++: #include <bits/stdc++.h>
#define ll long long
#define rep(i,n) for(int i=0;i<n;i++)
#define rrep(i,n) for(int i=1;i<=n;i++)
#define drep(i,n) for(int i=n;i>=0;i--)
#define INF 100000005
#define MAX 1002
#define mp make_pair
#define pb push_back
#define fi first
#define se second
using namespace std;
//__gcd(a,b), __builtin_popcount(a);

int main(){
	int a[10], b[10], ans1, ans2;
	rep(i,10)scanf("%d", &a[i]);
	rep(i,10)scanf("%d", &b[i]);
	sort(a, a+10);sort(b, b+10);
	ans1 = a[7]+a[8]+a[9];
	ans2 = b[7]+b[8]+b[9];
	printf("%d %d\n", ans1, ans2);
	return 0;
}

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

C++: #include<iostream>
using namespace std;
int main(){
int w[10],k[10],tmp,i,j;
for(i=0;i<10;i++){
cin>>w[i];
}
for(i=0;i<10;i++){
cin>>k[i];
}
for(i=0;i<9;i++){
for(j=9;j>i;j--){
if(w[j]>=w[j-1]){
tmp=w[j];
w[j]=w[j-1];
w[j-1]=tmp;
}
if(k[j]>=k[j-1]){
tmp=k[j];
k[j]=k[j-1];
k[j-1]=tmp;
}
}
}
cout<<w[0]+w[1]+w[2]<<" "<<k[0]+k[1]+k[2]<<endl;
return 0;
}

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


int d0,d1,d2,d3,dmax,x,y;
int board[92][92];

int Search(x,y){
	if(board[x][y]==0) return 0;
	board[x][y]=0;
	d0=Search((x-1),y);

	dmax=d0;

	d1=Search((x+1),y);

	if(dmax<d1) dmax=d1;

	d2=Search(x,(y-1));

	if(dmax<d2) dmax=d2;

	d3=Search(x,(y+1));

	if(dmax<d3) dmax=d3;
	board[x][y]=1;
	return dmax+1;
}

int main(void) {

	int max=0,m,n,i,j;
	scanf("%d\n%d",&m,&n);
	for (i=1;i<=m;i++){
		for(j=1;j<=n;j++){
		scanf("%d",&board[i][j]);
		}
	}
	for (i=1;i<=m;i++){
			for(j=1;j<=n;j++){
			int	r=Search(i,j);
			if	(max<r) max=r;
			}
		}


	printf("%d\n",max);
	return EXIT_SUCCESS;
}

C++: a = gets.to_i
b = gets.to_i
c = gets.to_i
d = gets.to_i
e = gets.to_i
f = gets.to_i
g = gets.to_i
h = gets.to_i
i = gets.to_i
j = gets.to_i

k = gets.to_i
l = gets.to_i
m = gets.to_i
n = gets.to_i
o = gets.to_i
p = gets.to_i
q = gets.to_i
r = gets.to_i
s = gets.to_i
t = gets.to_i

print("#{a+b+c+d+e+f+g+h+i+j} ")
print("#{k+l+m+n+o+p+q+r+s+t}\n")

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

int main(){
    int n;
    int Wm[4]={0};
    int Km[4]={0};
    int i, j;
    int W=0, K=0;
    for(i=0;i<10;i++){
        cin >> Wm[0];
        for(j=0;j<3;j++){
            if(Wm[j] > Wm[j+1]){
                swap(Wm[j], Wm[j+1]);
            }else{
                break;
            }
        }
    }
    for(j=1;j<4;j++){
        W += Wm[j];
    }
    for(i=10;i<20;i++){
        cin >> Km[0];
        for(j=0;j<3;j++){
            if(Km[j] > Km[j+1]){
                swap(Km[j], Km[j+1]);
            }else{
                break;
            }
        }
    }
    for(j=1;j<4;j++){
        K += Km[j];
    }
    cout << W << ' ' << K << endl;
}

C++: #include <stdio.h>

#define N 10

int main(void){
	int wScores[N];
	int kScores[N];
	int wBests,kBests;
	
	for (int i=0;i<N;i++) scanf("%d",&wScores[i]);
	for (int i=0;i<N;i++) scanf("%d",&kScores[i]);
	
	wBests=0; kBests=0;
	for (int i=0;i<3;i++){
		int max, p;
		max = 0;
		for (int j=0;j<N;j++){
			if (wScores[j] > max){
				max = wScores[j];
				p = j;
			}
		}
		wBests += max;
		wScores[p] = 0;
	}
	for (int i=0;i<3;i++){
		int max, p;
		max = 0;
		for (int j=0;j<N;j++){
			if (kScores[j] > max){
				max = kScores[j];
				p = j;
			}
		}
		kBests += max;
		kScores[p] = 0;
	}
	printf("%d %d\n",wBests, kBests);
	return 0;
}

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

#define rep(i, a, b) for(int i = a; i < b; i++)

using namespace std;

int main() {
	vector<int> W, K;
	int tmp;

	rep(i, 0, 10) {
		cin >> tmp;
		W.push_back(tmp);
	}
	rep(i, 0, 10) {
		cin >> tmp;
		K.push_back(tmp);
	}
	
	sort(W.begin(), W.end(), greater<int>());
	sort(K.begin(), K.end(), greater<int>());
	
	int sw = W[0] + W[1] + W[2];
	int sk = K[0] + K[1] + K[2];

	cout << sw << " " << sk << endl;

	return 0;
}