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 <cstdio>
#include <utility>
#include <vector>
#include <algorithm>
#include <numeric>
using namespace std;

#define gcu getchar_unlocked
#define ii inline int in
#define is inline bool scan
ii(int c) {
	int n = 0;
	bool minus = false; if (c == '-') minus = true, c = gcu();
	do {n = 10 * n + (c - '0'), c = gcu();} while (c >= '0');
	//return n; }
	return minus ? -n : n; }
ii() {return in(gcu());}
is(int &n){int c=gcu();return c==EOF?false:(n=in(c),true);}
is(char &c){c=gcu();gcu();return c!=EOF;}
//is(string &s){int c;
//	for(;;){c=gcu();if(c=='\n'||c==' ')return true;else if(c==EOF)return false;s+=c;}}
#undef ii
#define pcu putchar_unlocked
template <typename T>
void out(T n) {
	static char buf[20];
	char *p = buf;
	if(n < 0) pcu('-'), n *= -1;
	if (!n) *p++ = '0';
	else while (n) *p++ = n % 10 + '0', n /= 10;
	while (p != buf) pcu(*--p); }
void out(const char *s){while(*s)pcu(*s++);}
void out(char c){pcu(c);}
//void out(string &s){for (char c: s) pcu(c);}
template <typename head, typename... tail>
void out(head&& h, tail&&... t){out(h);out(move(t)...);}
//template <typename T>
//void out(vector<T> &v){for(T &x:v)out(&x == &v[0]?"":" "),out(x);out('\n');}
#undef svo

int main() {
	vector<int> v(10);
	for (int i = 0; i < 2; i++) {
		for(int &s: v)
			s = in();
		sort(v.rbegin(), v.rend());
		out(accumulate(v.begin(), v.begin() + 3, 0), i ? '\n' : ' ');
	}
}

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

int main(){
	int w[10],k[10];
	int wsum,ksum;
	wsum=ksum=0;
	
	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>());
	
	for(int i=0;i<3;i++){
		wsum+=w[i];
		ksum+=k[i];
	}
	
	cout<<wsum<<" "<<ksum<<endl;
	
}

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

int main(){
  int P[2];
  for(int i = 0; i < 2; i++){
    vector<int> point(10);
    for(int j = 0; j < 10; j++){
      cin >> point[j];
    }
    sort(point.begin(), point.end());
     P[i] = point[0] + point[1] + point[2];
  }
  cout << P[0] << " " << P[1] << endl;
}

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

using namespace std;

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

    for(int i=0; i<10; ++i) {
        cin >> temp;
        W.push_back(temp);
    }

    for(int i=0; i<10; ++i) {
        cin >>temp;
        K.push_back(temp);
    }

    sort(W.rbegin(),W.rend());
    sort(K.rbegin(),K.rend());

    cout << W[0]+W[1]+W[2] << " " << K[0]+K[1]+K[2] << endl;

    return 0;
}

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

using namespace std;

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

int main() {
	int sw[10], sk[10];
	REP(i,10) cin >> sw[i];
	REP(i,10) cin >> sk[i];

	sort(sw, sw+10); reverse(sw, sw+10);
	sort(sk, sk+10); reverse(sk, sk+10);
	int tw = 0;
	REP(i,3) tw += sw[i];
	int tk = 0;
	REP(i,3) tk += sk[i];

	cout << tw << ' ' << tk << endl;

	return 0;
}

C++: #include<iostream>
#include<algorithm>
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>
#include <vector>
#include <algorithm>

using namespace std;

int main(void)
{

  int num;
  vector<int> k_num;
  vector<int> w_num;

  for(int i=0;i<20;i++)
    {
      cin >> num;
      
      if(i<10)
	k_num.push_back(num);

      else
	w_num.push_back(num);
    }

  sort(k_num.begin(),k_num.end(),greater<int>());
  sort(w_num.begin(),w_num.end(),greater<int>());

  cout << k_num[0]+k_num[1]+k_num[2] << " " << w_num[0]+w_num[1]+w_num[2] << 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<algorithm>
#define loop(i,a,b) for(int i=a;i<b;i++)
#define rep(i,a) loop(i,0,a)
using namespace std;

int main(){
	int ws=0,ks=0;
	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);
//	rep(i,10)cout<<w[i]<<endl;
	loop(i,7,10)ws+=w[i];
	loop(i,7,10)ks+=k[i];
	
	cout<< ws << " " <<ks << endl;
}

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

int main(void){
    vector<int> wscore(10);
    vector<int> kscore(10);

    int wmax = 0;
    int kmax = 0;

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

    for(int i=0; i < 3; i++){
        vector<int>::iterator max = max_element(wscore.begin(), wscore.end());
        wmax += *max;
        wscore.erase(max);
    }
    for(int i=0; i < 3; i++){
        vector<int>::iterator max = max_element(kscore.begin(), kscore.end());
        kmax += *max;
        kscore.erase(max);
    }

    cout << wmax << " " << kmax << endl;
    return 0;

}

C++: #include<bits/stdc++.h>
using namespace std ;
int main()
{
    int w = 0 , k = 0 ;
    int score[2][10] = {0} ;
    for ( int i = 0 ; i < 2 ; i++ )
    {
        for ( int j = 0 ; j < 10 ; j++ )
        {
            cin >> score[i][j] ;
        }
        sort( score[i],score[i]+10 ) ;
        reverse( score[i],score[i]+10 ) ;
    }
    w = score[0][0] + score[0][1] + score[0][2] ;
    k = score[1][0] + score[1][1] + score[1][2] ;
    printf("%d %d\n",w ,k ) ;

    return 0 ;
}

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

using namespace std;

int main(){
	vector<int> a(10);
	vector<int> b(10);
	for(int i=0;i<10;i++){
		cin >> a[i];
	}
	for(int i=0;i<10;i++){
		cin >> b[i];
	}
	vector<int> c=reverse(a.begin(),a.end());
	vector<int> d=reverse(a.begin(),a.end());
	sort(c.begin(),c.end());
	cout << c[0] + c[1] + c[2] << " ";
	sort(d.begin(),d.end());
	cout << d[0] + d[1] + d[2] << endl;
	
	return 0;
}

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

int main(){
	int k[10],w[10];
	for(int i=0;i<10;i++){
		scanf("%d",&k[i]);
	}
	for(int i=0;i<10;i++){
		scanf("%d",&w[i]);
	}
	sort(k,k+10);
	sort(w,w+10);
	k[9]+=k[8]+k[7];
	w[9]+=w[8]+w[7];
	printf("%d %d\n",k[9],w[9]);
}

C++: #include<iostream>
#include<algorithm>
#include<vector>
#include<functional>
using namespace std;
int main(){
	vector<int> K,W;
	int o;
	for(int i=0;i<10;i++){
		cin>>o;
		K.push_back(o);
	}
	for(int i=0;i<10;i++){
		cin>>o;
		W.push_back(o);
	}
	
	sort(K.begin(),K.end());
	sort(W.begin(),W.end());
	cout<<K[7]+K[8]+K[9]<<" "<<W[7]+W[8]+W[9]<<endl;
}

C++: #include<stdio.h>
int main()
{
	int one[2]={0},two[2]={0},three[2]={0},tenn,sum[2]={0};
	for(int i1=0;i1<2;i1++){
	for(int i=0;i<10;i++){
		scanf("%d",&tenn);
		if(one[i1]<=tenn){
			three[i1]=two[i1];
			two[i1]=one[i1];
			one[i1]=tenn;
		}
		else if(two[i1]<=tenn){
			three[i1]=two[i1];
			two[i1]=tenn;
		}
		else if(three[i1]<=tenn){
			three[i1]=tenn;
		}
	}
	sum[i1]=one[i1]+two[i1]+three[i1];
	}
	printf("%d %d\n",sum[0],sum[1]);
	return 0;
}