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>
#include <cstdio>
using namespace std;

int main()
{
    int scoreW[10];
    int scoreK[10];

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

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

    sort(scoreW, scoreW + 10);
    sort(scoreK, scoreK + 10);

    int Ksum = 0;
    int Wsum = 0;

    Wsum = scoreW[7] + scoreW[8] + scoreW[9];
    Ksum = scoreK[7] + scoreK[8] + scoreK[9];
    cout << Wsum << " " << Ksum << endl;

    return (0);
}

C++: #include<stdio.h>
int main(void)
{
	int a[10],s[10],d,f,g,z;
	for(g=1;g<=10;g++){
		scanf("%d",&a[g]);
	}
	for(g=1;g<=10;g++){
		scanf("%d",&s[g]);
	}
	for(g=1;g<=10;g++){
		for(f=g+1;f<=10;f++){
			if(a[g]<a[f]){
				d=a[g];
				a[g]=a[f];
				a[f]=d;
			}
			if(s[g]<s[f]){
				z=s[g];
				s[g]=s[f];
				s[f]=z;
			}
		}
	}
	printf("%d %d\n",a[1]+a[2]+a[3],s[1]+s[2]+s[3]);
	return 0;
}

C++: #include <bits/stdc++.h>
#define range(i, a, n) for(int (i) = (a); (i) < (n); (i)++)
#define rep(i, n) for(int (i) = 0; (i) < (n); (i)++)
using namespace std;
int main(void){
    vector<int> a(10), b(10);
    for(auto & e : a) cin >> e;
    for(auto & e : b) cin >> e;

    sort(begin(a), end(a), grater<int>());
    sort(begin(b), end(b), grater<int>());

    cout << a[0] + a[1] + a[2] << " " << b[0] + b[1] + b[2] << endl;

	return 0;
}

C++: #include <stdio.h>
int main(void){
  int data[20],W[10],K[10],i,j;
  
  for(i=0;i<20;i++){
    scanf("%d",&data[i]);
    if(i<10)W[i]=data[i];
    else K[i-10]=data[i];
  } 
  
  for(i=0;i<10;i++)
    for(j=1;j<10;j++)
      if(W[j-1]<W[j]){
	int a=W[j];
	W[j]=W[j-1];
	W[j-1]=a;	
      }
 
 for(i=0;i<10;i++)
   for(j=1;j<10;j++)
     if(K[j-1]<K[j]){
       int b=K[j-1];
       K[j-1]=K[j];
       K[j]=b;	
      }

 printf("%d %d\n",W[0]+W[1]+W[2],K[0]+K[1]+K[2]);
 
 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 <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<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[8]+a[9]+a[7] << endl;
  cout << b[8]+b[9]+b[7] << endl;
  return 0;
}

C++: #include <iostream>
using namespace std;
int main(void)
{
	int a,b,c[101]={0},d,e,f;
	for (a=0;a<10;a++)
	{
		cin>>b;
		c[b]=1;
	}
	d=0;
	e=0;
	for (a=100;a>=0;a--)
	{
		if (c[a]==1&&d<3)
		{
			e=e+a;
			d++;
		}
	}
	c[101]={0};
	for (a=0;a<10;a++)
	{
		cin>>b;
		c[b]=1;
	}
	d=0;
	f=0;
	for (a=100;a>=0;a--)
	{
		if (c[a]==1&&d<3)
		{
			f=f+a;
			d++;
		}
	}
	cout<<e<<" "<<f<<endl;
	return 0;
}

C++: #include <stdio.h>
#include <vector>
#include <algorithm>

using namespace std;

int main(){
    
    vector<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.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 <cstdio>
#include <cstdlib>
#include <cstring>
using namespace std;
int main()
{
int w[3],x;
for(int j=0;j<2;j++){
 memset(w,0,sizeof(w));
 for(int i=0;i<10;i++){
 scanf("%d",&x);
 if(x>w[0]){w[2]=w[1]; w[1]=w[0]; w[0]=x;}
 else if(x>w[1]) {w[2]=w[1]; w[1]=x;}
 else if(x>w[2]) w[2]=x;
 }
 printf("%d\n",w[0]+w[1]+w[2]);
}
}

C++: #include<stdio.h>

int main()
{
	int i;
	int w1=0,w2=0,w3=0,k1=0,k2=0,k3=0;
	int w[10];
	int k[10];
	for(i=0;i<10;i++){
		scanf("%d",&w[i]);
		if(w[i]>=w1){w3=w2;w2=w1;w1=w[i];}
		else if(w[i]>=w2){w3=w2;w2=w[i];}
		else if(w[i]>w3){w3=w[i];}
		}
	for(i=0;i<10;i++){
		scanf("%d",&k[i]);
		if(k[i]>=k1){k3=k2;k2=k1;k1=k[i];}
		else if(k[i]>=k2){k3=k2;k2=k[i];}
		else if(k[i]>k3){k3=k[i];}
	}
	printf("%d %d\n",w1+w2+w3,k1+k2+k3);
	return 0;
}

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

C++: #include <iostream>

int main() {
	int k[10] = {}, w[10] = {};
	int swap;
	for (int i = 0; i < 10; i++) {
		std::cin >> w[i];
	}
	for (int j = 0; j < 10; j++) {
		std::cin >> k[j];
	}

	for (int n = 1; n < 10; n++) {
		for (int m = 0; m < 10; m++) {
			if (w[n] > w[m]) {
				swap = w[m];
				w[m] = w[n];
				w[n] = swap;
			}
		}
	}
	for (int n = 1; n < 10; n++) {
		for (int m = 0; m < 10; m++) {
			if (k[n] > k[m]) {
				swap = k[m];
				k[m] = k[n];
				k[n] = swap;
			}
		}
	}

	std::cout << w[0] + w[1] + w[2] << " " << k[0] + k[1] + k[2] << std::endl;
	
	return 0;
}

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(w.begin(), w.end(), greater<int>());
	cout << w[0] + w[1] + w[2] << " " << k[0] + k[1] + k[2] << endl;
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main(){
	int i,l,j,a[100],b[100],w=0,k=0;
	for(i=0;i<10;i++){
	cin>>a[i];
	}
	for(l=0;l<10;l++){
	cin>>b[l];
	}
	sort(a,a+10);
	sort(b,b+10);
	for(j=9;j>6;j--){
		w+=a[j];
		k+=b[j];
	}
	cout<<w<<" "<<k<<endl;
return 0;
}

C++: #include <bits/stdc++.h>
#define REP(i, n) for(int i = 0; i < n; i++)
#define REPR(i, n) for(int i = n; i >= 0; i--)
#define FOR(i, m, n) for(int i = m; i < n; i++)
#define INF 2e9
#define ALL(v) (v).begin(), (v).end()
using namespace std;
typedef long long ll;
 
//const int dx[] = {1, 0, -1, 0, 1, -1, -1, 1};
//const int dy[] = {0, 1, 0, -1, 1, 1, -1, -1};
 
int main()
{
	vector<int> w(10);
	vector<int> k(10);
	REP(i, 10) cin >> w[i];
	REP(i, 10) cin >> k[i];

	sort(ALL(w), greater<int>());
	sort(ALL(k), greater<int>());
	cout << w[0]+w[1]+w[2] << " " << k[0]+k[1]+k[2] << endl;
	
}

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