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>
using namespace std;
int main(){
  int P1[15],P2[15],tmp;
  for(int i=0;i<10;i++){
    cin >> P1[i];
  }
  for(int i=0;i<10;i++){
    cin >> P2[i];
  }
  for(int i=0;i<9;i++){
    for(int j=9;j>i;j--){
      if(P1[j]>P1[j-1]){
	tmp=P1[j];
	P1[j]=P1[j-1];
	P1[j-1]=tmp;
      }
      if(P2[j]>P2[j-1]){
	tmp=P2[j];
	P2[j]=P2[j-1];
	P2[j-1]=tmp;
      }
    }
  }

  cout << endl << endl;
  for(int i=0;i<10;i++){
    cout << P2[i] << endl;
  }
  cout << P1[0]+P1[1]+P1[2] << " " << P2[0]+P2[1]+P2[2] << endl;
}

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

int main(){
	int total=0 , a;
	for(int i=0 ; i<10 ; ++i ){
		cin >> a;
		total += a;
	}
	cout << total << " ";
	total = 0;
	for(int i=0 ; i<10 ; ++i ){
		cin >> a;
		total += a;
	}
	cout << total << endl;
}

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

using namespace std;


int main(int argc, char const* argv[])
{
    int a=0;
    int b=0;
    int tmp;
    for (int i = 0; i < 10; i++) 
    {
        cin >> tmp;
        a += tmp;
    }
    for (int i = 0; i < 10; i++) 
    {
        cin >> tmp;
        b += tmp;
    }
    cout << a << " " << b<< endl;
    return 0;
}

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

C++: #include <iostream>
#include <algorithm>
#include <vector>
#include <iomanip>
#include <map>
#include <queue>
#include <numeric>

static const int MOD = 1000000007;
using ll = long long;
using u32 = unsigned;
using namespace std;

template<class T>
constexpr T INF = ::numeric_limits<T>::max() / 32 * 15 + 208;

int main() {
    vector<int> w(10), k(10);
    for (auto &&i : w) scanf("%d", &i);
    for (auto &&i : k) scanf("%d", &i);
    sort(w.begin(), w.end(), greater<>());
    sort(k.begin(), k.end(), greater<>());
    cout << accumulate(w.begin(), w.begin()+3, 0) << " " <<
            accumulate(k.begin(), k.begin()+3, 0) << "\n";
    return 0;
}

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

int w[10], k[10];

int main()
{
  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;
  return 0;
}

C++: #include <iostream>
#include <string>
#include <algorithm>
#include <stack>
#include <queue>
#include <set>

using namespace std;
int  a[10];

int main(){

	for (int i = 0; i < 20; i++)cin >> a[i];
	sort(a, a + 10);
	sort(a + 11, a + 20);
	int b = (a[7] + a[8] + a[9]);
	int c = (a[17] + a[18] + a[19]);
	cout << b << " " << c << endl;

	return 0;
}

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

int main() {
    vector<int> sum(20);
    rep(i, 20) cin >> sum[i];
    vector<int> w(10);
    rep(i, 10) w[i] = sum[i];
    vector<int> k(10);
    rep(i, 10) k[i] = sum[i + 10];
    sort(w.begin(), w.end());
    sort(k.begin(), k.end());
    int a = w[9] + w[8] + w[7], b = k[9] + k[8] + k[7];
    cout << a << " " << b << endl;
}

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

using namespace std;

int stuw[10] , answ = 0;
int stuk[10] , ansk = 0;

int main(){

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

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

	sort(stuw , stuw + 10 , greater<int>());
	sort(stuk , stuk + 10 , greater<int>());

	for(int i = 0; i < 3; i++){
		answ += stuw[i];
		ansk += stuk[i];
	}

	cout << answ << " " << ansk;

	return 0;
}

C++: #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
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[7] + w[8] + w[9] << " " << k[7] + k[8] + k[9] << endl;
  return 0;
}

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

int main(){
	int Wp[10], Kp[10];
	int W, K;
	
	for(int i = 0; i < 10; i++){
		cin >> Wp[i];
	}
	for(int i = 0; i < 10; i++){
		cin >> Kp[i];
	}
	sort(Wp, Wp+10);
	sort(Kp, Kp+10);
	
	W = Wp[9] + Wp[8] + Wp[7];
	K = Kp[9] + Kp[8] + Kp[7];
	
	cout << W << ' ' << K << endl;
	
	return 0;
}

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

int main(){
int N[11]={},W[11]={},x;
int Ns=0,Ws=0;
for(int i=0;i<10;i++)
{cin>>N[i];}
for(int i=0;i<10;i++)
{cin>>W[i];}
for(int i=0;i<10;i++)
{for(int j=9;j>i;j--)
{if(N[j]>N[j-1]){int t=N[j];N[j]=N[j-1];N[j-1]=t;}
//if(W[j]>W[j-1]){int tt=W[j];W[j]=W[j-1];W[j-1]=tt;}
}
}
for(int i=0;i<10;i++)
{for(int j=9;j>i;j--)
{//if(N[j]>N[j-1]){int t=N[j];N[j]=N[j-1];N[j-1]=t;}
if(W[j]>W[j-1]){int tt=W[j];W[j]=W[j-1];W[j-1]=tt;}
}
}
for(int i=0;i<3;i++)
{Ns+=N[i];Ws+=W[i];}
cout<<Ns<<" "<<Ws<<endl;
return 0;
}

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);
    sort(data2, data2+10);
    cout << data1[7]+data1[8]+data1[9] << ' ';
    cout << data2[7]+data2[8]+data2[9] << endl;
  }
  return 0;
}

C++: #include<stdio.h>
int main(void)
{
	int data[10];
	int dai1,dai2,wk;
	int i,j;
	
	for(i=0;i<10;i++){
		scanf("%d",&data[i]);
	}
	for(i=0;i<9;i++){
		for(j=i+1;j<10;j++){
			if(data[i]<data[j]){
				wk=data[i];
				data[i]=data[j];
				data[j]=wk;
			}
		}

	}
	dai1=data[0]+data[1]+data[2];
	for(i=0;i<10;i++){
		scanf("%d",&data[j]);
	}
	for(i=0;i<9;i++){
		for(j=i+1;j<10;j++){
			if(data[i]<data[j]){
				wk=data[i];
				data[i]=data[j];
				data[j]=wk;
			}
		}
	}
	dai2=data[0]+data[1]+data[2];
	
	printf("%d %d\n",dai1,dai2);
	return 0;
}

C++: #include <bits/stdc++.h>

#define rep_(v, f, l) for (int v = (f), v##_ = (l); v < v##_; ++v)
#define rep(v, n) rep_(v, 0, n)
#define lep(v, n) rep_(v, 1, n + 1)
#define rrep_(v, f, l) for (int v = (l), v##_ = (f); v >= v##_; --v)
#define rrep(v, n) rrep_(v, 0, n - 1)
#define rlep(v, n) rrep_(v, 1, n)
#define show_a(a, size) rep(a##_it, size) std::cout << a[a##_it] << " \n"[a##_it == a##_it_ - 1];
#define show_v(v) show_a(v, v.size())
#define eachv(v, i) rep(i, v.size())
#define reachv(v, i) rrep(i, v.size())
#define debug(x) std::cerr << #x << " = " << x << "\n";

using namespace std;

typedef long long int lint;

static inline int in(){ int x; scanf("%d", &x); return x; }
static inline lint inl(){ lint x; scanf("%lld", &x); return x; }

int main()
{
    vector<int> W, K;
    rep(i, 10){
        W.push_back(-in());
    }
    rep(i, 10){
        K.push_back(-in());
    }
    sort(W.begin(), W.end());
    sort(K.begin(), K.end());
    printf("%d %d\n", -(W[0] + W[1] + W[2]), -(K[0] + K[1] + K[2]));
    return (0);
}