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 <cstdio>
#include <vector>
#include <algorithm>
#include <complex>
#include <cstring>
#include <cstdlib>
#include <string>
#include <cmath>
#include <queue>
#include <functional>
using namespace std;

#define REP(i,n) for(int i=0;i<(int)n;++i)
#define FOR(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)
#define ALL(c) (c).begin(), (c).end()
const int INF = 1<<29;

int main() {
  vector<int> v1(10),v2(10);
  REP(i,10)
    cin >> v1[i];
  REP(i,10)
    cin >> v2[i];
  sort(ALL(v1), greater<int>());
  sort(ALL(v2), greater<int>());
  cout << v1[0]+v1[1]+v1[2] << " " << v2[0]+v2[1]+v2[2] << endl;
}

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

	for(i=0;i<10;i++){
		scanf("%d",&b[i]);
	}	
	sort(b,b+10);
	for(i=0;i<10;i++){
	}
	
	s=a[7]+a[8]+a[9];
	ss=b[7]+b[8]+b[9];
	printf("%d %d\n",s,ss);
	return 0;
}

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

#define REP(i,b,n) for(int i=b;i<n;i++)
#define rep(i,n) REP(i,0,n)
#define pb push_back

void solve() {
  vector<int> w, k;
  rep(i,10) {
    int t; cin>>t;
    w.pb(t);
  }
  rep(i,10) {
    int t; cin>>t;
    k.pb(t);
  }
  sort(w.begin(), w.end(), greater<int>());
  sort(k.begin(), k.end(), greater<int>());
  int sw = 0, sk = 0;
  rep(i,3) {
    sw += w[i]; sk += k[i];
  }
  cout<<sw<<" "<<sk<<endl;
}

int main (int argc, char const* argv[]) {
  solve();
  return 0;
}

C++: #include<iostream>
using namespace std;
int main(void)
{
  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];
    }
  for(int i=0;i<10;i++)
    {
      int max=w[i],x=i;
      for(int j=i;j<10;j++)
	{
	  if(w[j]>max)
	    {
	      max=w[j];
	      x=j;
	    }
	  
	}
int tmp=w[i];
	  w[i]=w[x];
	  w[x]=tmp;
    }
for(int i=0;i<10;i++)
    {
      int max=k[i],x=i;
      for(int j=i;j<10;j++)
	{
	  if(k[j]>max)
	    {
	      max=k[j];
	      x=j;
	    }
	  
	}
int tmp=k[i];
	  k[i]=k[x];
	  k[x]=tmp;
    }
 int sumw=0;
for(int i=0;i<3;i++)
    {
      sumw+=w[i];
    }
 int sumk=0;
for(int i=0;i<3;i++)
    {
      
      sumk+=k[i];
    }
 cout<<sumw<<" "<<sumk<<endl;
    
  return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)

int main() {
        const int N = 10;
        const int T =  3;
        vector<int> W(N);
        vector<int> K(N);
        int wt = 0, kt = 0;

        rep(n, N) {
                cin >> W.at(n);
        }
        rep(n, N) {
                cin >> K.at(n);
        }
        sort(W.begin(), W.end(), greater<int>());
        sort(K.begin(), K.end(), greater<int>());
        rep(i, 3) {
                wt += W.at(i);
                kt += K.at(i);
        }
        cout << wt << " " << kt << endl;

        return 0;
}

C++: #include<iostream>
using namespace std;
int main(void){
  int ans1=0,ans2=0,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);
  for(int i=7;i<=9;i++){
    ans1 +=a[i];
    ans2 +=b[i];
  }cout << ans1<< " " << ans2<< endl;
}

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-i;j>0;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<iostream>
#include<algorithm>
using namespace std;
int main(){
int t[20];
int i;
for(i=0;i<20;i++){
cin>>t[i];
}
sort(t,t+10);
sort(t+10,t+20);
cout<<t[0]+t[1]+t[2] << endl;
cout <<t[10]+t[11]+t[12] << endl;
return 0;
}

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

#define REP(i, n) for (int i = 0; i < (n); i++)

int main()
{
  int w[10], k[10], i;
  
  REP(i, 10) cin >> w[i];
  REP(i, 10) 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 <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
    vector<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.begin(), W.end());
    sort(K.begin(), K.end());
    cout << W[9] + W[8] + W[7] << " " << K[9] + K[8] + K[7] << "\n";
    return 0;
}

C++: #include<iostream>
#include<string>
#include<algorithm>
using namespace std;
int main(void){

	int w[10],k[10];
	int W,K;

	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);
    W=w[0]+w[1]+w[2];
    K=k[0]+k[1]+k[2];
    cout <<W<<" "<<K<<endl;

	return 0;
}

C++: #include<cstdio>
#include<string>
#include<iostream>
#include<vector>

using namespace std;

int main(){
	
	vector<int> a;
	vector<int> b;
	
	for(int i=0;i<10;i++){
		int c;
		cin>>c;
		a.push_back(c);
	}
	
	for(int i=0;i<10;i++){
		int c;
		cin>>c;
		b.push_back(c);
	}
	
	
	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 <iostream>
#include <cstdio>
#include <algorithm>
#include <cmath>
#include <vector>

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

C++: #include <iostream>
#include <sstream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <ctime>
#include <cstring>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <deque>
#include <map>
#include <set>
#include <bitset>
#include <numeric>
#include <utility>
#include <iomanip>
#include <algorithm>
#include <functional>
using namespace std;

typedef long long ll;
typedef vector<int> vint;
typedef vector<long long> vll;
typedef pair<int,int> pint;
typedef pair<long long, long long> pll;

#define MP make_pair
#define PB push_back
#define ALL(s) (s).begin(),(s).end()
#define EACH(i, s) for (__typeof__((s).begin()) i = (s).begin(); i != (s).end(); ++i)
#define COUT(x) cout << #x << " = " << (x) << " (L" << __LINE__ << ")" << endl

template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
template<class T1, class T2> ostream& operator << (ostream &s, pair<T1,T2> P) 
{ return s << '<' << P.first << ", " << P.second << '>'; }
template<class T> ostream& operator << (ostream &s, vector<T> P) 
{ for (int i = 0; i < P.size(); ++i) { if (i > 0) { s << " "; } s << P[i]; } return s; }
template<class T1, class T2> ostream& operator << (ostream &s, map<T1,T2> P) 
{ EACH(it, P) { s << "<" << it->first << "->" << it->second << "> "; } return s; }



int a[25], b[25];

int main() {
    for (int i = 0; i < 10; ++i) cin >> a[i];
    for (int i = 0; i < 10; ++i) cin >> b[i];
    sort(a, a+10, greater<int>());
    sort(b, b+10, greater<int>());
    
    cout << a[0] + a[1] + a[2] << " " << b[0] + b[1] + b[2] << endl;
    
    return 0;
}