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],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=0;int sum_k=0;
    for(int i=9;i>6;--i){
        sum_w += w[i];sum_k += k[i];
    }
    cout<<sum_w<<" "<<sum_k<<endl;
    return 0;
}

C++: #include<bits/stdc++.h>
#define enld '\n'
#define rep(i,n) for(int i=0; i<(n); i++)
using namespace std;
using ll = long long;
using P = pair<int,int>;
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize("Ofast")
constexpr ll INF = 1e18;
constexpr int inf = 1e9;
constexpr ll mod = 1000000007;
constexpr ll mod2 = 998244353;
const double PI = 3.1415926535897932384626433832795028841971;
const int dx[6] = {1, 0, -1, 0,1,1};
const int dy[6] = {0, 1, 0, -1,1,-1};
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; }
// ---------------------------------------------------------------------------


int main(){
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    vector<int> suzu(10);
    for(int i=0; i<10; i++){
        cin >> suzu[i];
    }
    sort(suzu.begin(),suzu.end());
    vector<int> ken(10);
    for(int i=0; i<10; i++){
        cin >> ken[i];
    }
    sort(ken.begin(),ken.end());
    int sum1=0,sum2=0;
    for(int i=9; i>=7; i--){
        sum1 += suzu[i];
        sum2 += ken[i];
    }
    cout << sum1 << " " << sum2 << enld;
    return 0;
}

C++: #define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <algorithm>
#include <functional>
using namespace std;

int sum(int v[]) {
	int temp = 0;

	for (int i = 0; i < 3; i++) {
		temp += v[i];
	}

	return temp;
}

int main() {
	int a[10], b[10];

	for (int i = 0; i < 10; i++) {
		scanf("%d", &a[i]);
	}
	for (int i = 0; i < 10; i++) {
		scanf("%d", &b[i]);
	}

	sort(a, a + 10, greater<int>());
	sort(b, b + 10, greater<int>());

	printf("%d %d", sum(a), sum(b));

	return 0;
}

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

using namespace std;

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

int main() {
    int W[10], K[10];
    rep(i, 10) cin >> W[i];
    rep(i, 10) cin >> K[i];

    sort(W, W + 10);
    sort(K, K + 10);
    int s1 = 0, s2 = 0;
    rep(i, 3) s1 += W[i + 7];
    rep(i, 3) s2 += K[i + 7];

    cout << s1 << " " << s2 << endl;
}

C++: #include <iostream>
using namespace std;
int main(void){
    // Your code here!
    
    int W[10]={0};
    int K[10]={0};
    int c=0;
    int total_W=0;
    int total_K=0;
    
    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++){
        for(int j=0;j<10;j++){
            if(W[j]<W[j+1]&&j!=9){
            c=W[j];
            W[j]=W[j+1];
            W[j+1]=c;
            }
        }
    }
    total_W=W[0]+W[1]+W[2];
    
     for(int i=0;i<10;i++){
        for(int j=0;j<10;j++){
            if(K[j]<K[j+1]&&j!=9){
            c=K[j];
            K[j]=K[j+1];
            K[j+1]=c;
            }
        }
    }
    total_K=K[0]+K[1]+K[2];
    
    cout<<total_W<<" "<<total_K;
    return 0;

}

C++: #include<iostream>
#include<cstdio>
#include<algorithm>
using namespace std;
int main()
{
	int a[10],ans=0;
	for(int iii=1;iii<=2;iii++){
		ans=0;
	for(int i=0;i<10;i++){
		scanf("%d",&a[i]);
	}
	sort(a,a+10);
	ans+=a[7]+a[8]+a[9];
	if(iii==1)printf("%d ",ans);
	else printf("%d\n",ans);

	}
	return 0;
}

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

#define MEMBER_NUM 10

int max_3_score(std::vector<int> scores) {
  std::sort( scores.begin(), scores.end() );
  int score = 0;
  for (int i = 0; i < 3; i++) {
    score += scores[MEMBER_NUM - i - 1];
  }
  return score;
}

int main() {

  std::vector<int> w_scores;
  std::vector<int> k_scores;

  std::string score;
  int count = 0;
  while ( count != 20 ) {
    std::cin >> score;
    if ( count < 10 ) {
      w_scores.push_back( std::stoi(score) );
    } else if ( count < 20 ) {
      k_scores.push_back( std::stoi(score) );
    }
    count++;
  }

  std::cout << max_3_score( w_scores ) << " " << max_3_score( k_scores ) << std::endl;
  
}

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

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

C++: #include <cstdio>
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<iostream>
#include<cmath>
#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);
    int cnt=0;
    int cnt2=0;
    for(int i=7;i<10;i++){
        cnt+=w[i];
        cnt2+=k[i];
    }
    
    cout << cnt << " " << cnt2 << endl;
    return 0;
}

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

#define INF 1.1e9
#define LINF 1.1e18
#define FOR(i,a,b) for (int i = (a); i < (b); ++i)
#define REP(i,n) FOR(i,0,n)
#define ALL(v) (v).begin(), (v).end()
#define pb push_back
#define pf push_front
#define fi first
#define se second
#define BIT(x,n) bitset<n>(x)

typedef long long ll;
typedef pair<int,int> P;
typedef pair<P,int> PP;

struct edge {
	int to,cost;
	edge(int t,int c):to(t),cost(c) {}
};

//int dx[]={1,-1,0,0},dy[]={0,0,1,-1};
int ddx[]={1,1,1,0,-1,-1,-1,0},ddy[]={1,0,-1,-1,-1,0,1,1};

ll mypow(ll x,ll n,ll m) {	//xのn乗をmで割った余り
	if(n==0) return 1;
	if(n%2==0) return mypow(x*x%m,n/2,m);
	else return x*mypow(x,n-1,m)%m;
}

//-----------------------------------------------------------------------------

int w[10],k[10];

int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);

	REP(i,10) cin>>w[i];
	REP(j,10 ) 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;
}