Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"sort"
	"strconv"
)

var scanner = bufio.NewScanner(os.Stdin)

func nextString() string {
	scanner.Scan()
	return scanner.Text()
}

func nextInt() int {
	n, err := strconv.Atoi(nextString())
	if err != nil {
		fmt.Printf("strconv.Atoi failed: %v\n", err)
	}
	return n
}

func main() {
	scanner.Split(bufio.ScanWords)
	points := make([]int, 6)
	for i := 0; i < 6; i++ {
		points[i] = nextInt()
	}
	// fmt.Println(points)
	sort.Slice(points[:4], func(i, j int) bool { return points[i] > points[j] })
	// fmt.Println(points)
	points2 := points[4:]
	sort.Slice(points2, func(i, j int) bool { return points2[i] > points2[j] })
	// fmt.Println(points)

	fmt.Println(points[0] + points[1] + points[2] + points2[0])
}

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

int main(){
    int a,b,c,d,e,f;
    cin >>a>>b>>c>>d>>e>>f;
    int score[]={a,b,c,d};
    sort(score,score+4);
    int score2[]={e,f};
    sort(score2,score2+2);
    cout <<score[1]+score[2]+score[3]+score2[1]<<endl;
    
    return 0;
}

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

int main(){
	int s[4];
	int m_max;
	int h[3];
	int h_max;
	for(int i = 0;i<4;i++){
		cin>>s[i];
		m_max += s[i];
	}
	m_max -= (min(s[0],min(s[1],min(s[2],s[3]))));
	for(int i = 0;i<2;i++){
		cin>>h[i];
		h_max+=h[i];
	}
	h_max -= (min(h[0],h[1]));
	m_max += h_max;
	cout<<m_max<<endl;
}

C++: //Selecting Subjects
#include <iostream>

using namespace std;

int main() {
    int Scores[6];
    for(int i = 0; i < 6; i++) cin >> Scores[i];

    int s = 0, minv = 101;
    for(int i = 0; i < 4; i++) {
        s += Scores[i];
        minv = min(minv, Scores[i]);
    }
    s -= minv;
    for(int i = 4; i < 6; i++) {
        s += Scores[i];
        minv = min(minv, Scores[i]);
    }
    s -= minv;
    
    cout << s << endl;
}

C++: #include<algorithm>
#include<iostream>
#include<cstdio>
int main()
{
    int a[10];
    int m;
    for(int i=0;i<=5;i++){
        std::cin>>a[i];
    }
    std::sort(a,a+4);
    m=std::max(a[4],a[5]);
    std:: cout<<a[3]+a[2]+a[1]+m<<std::endl;
    return 0;
    
    
}

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

int main(){
  int a,b,c,d,e,f;
  cin>>a>>b>>c>>d>>e>>f;
  int m1,m2;
  m1=min(min(min(a,b),c),d);
  m2=min(e,f);
  cout<<(a+b+c+d+e+f-m1-m2)<<endl;
  return 0;
}

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

int main() {
  int score[6];
  for (int i = 0; i < 6; i++) {
    cin >> score[i];
  }

  int sum = 0;
  for (int i = 0; i < 6; i++) {
    sum += score[i];
  }
  
  int mini;
  mini = score[0];
  for (int i = 0; i < 3; i++) {
    if (score[i] < mini) mini = score[i];
  }
  sum -= mini;

  if (score[4] < score[5]) mini = score[4];
  else mini = score[5];
  sum -= mini;

  cout << sum << endl;

  return 0;
}

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

using namespace std;

int main() {
	int a[4];
	int b[2];
	int sum = 0;
	int minv = 0;
	int min1 = 120;
	for (int i = 0; i < 4; i++) {
		cin >> a[i];
		sum += a[i];
		min1 = min(min1, a[i]);
	}
	minv += min1;
	int min2 = 120;
	for (int i = 0; i < 2; i++) {
		cin >> b[i];
		sum += b[i];
		min2 = min(min2, b[i]);
	}
	minv += min2;
	cout << sum - minv << endl;
}

C++: #include<stdio.h>
int main(void)
{
	int a,b,c,d,e,f,g,h,i,j,x;
	scanf("%d %d %d %d %d %d",&a,&b,&c,&e,&f);
	if(a>b){
		a=g;
	}
	else if(a<b){
		b=g;
	}
	if(b>c){
		b=h;
	}
	else if(b<c){
		c=h;
	}
	if(c>d){
		c=i;
	}
	else if(c<d){
		d=i;
	}
	if(e>f){
		e=j;
	}
	else if(e<f){
		f=j;
	}
	x=g+h+i+j;
	printf("%d\n",x);
	return 0;
}

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

using namespace std;

int main() {

	int sum = 0;
	int small = 114514;

	for (int i = 0; i < 4; i++) {
		int t;
		scanf("%d", &t);
		sum += t;
		small = min(small, t);
	}
	sum -= small;

	int t,u;
	scanf("%d", &t);
	scanf("%d", &u);

	printf("%d\n", sum + max(t, u));

	return 0;
}

C++: //
//  main.cpp

#include <iostream>
using namespace std;


int main(){	
	int min1 = 100,min2 = 100,sum1 = 0,sum2 = 0;
	int input;
	for(int i=0;i<4;i++){
		cin >> input;
		min1 = min(min1,input);
		sum1 += input;
	}
	for(int i=0;i<2;i++){
		cin >> input;
		min2 = min(min2,input);
		sum2 += input;
	}
	
	cout << (sum1 - min1) + (sum2 - min2)<< endl;
	
	return 0;
}

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

int main() {
	int numberA[4], b, c, i, min, ans=0;
	for (i = 0; i <= 3; i++) {
		cin >> numberA[i];
		if (i == 0) {
			min = numberA[0];
		}
		if (i > 0) {
			if (numberA[i] < min) {
				min = numberA[i];
			}
			else if (numberA[i] > min) {
				min = min;
			}
			else {
				min = min;
			}
		}
	}
	ans = (numberA[0] + numberA[1] + numberA[2] + numberA[3]) - min;

	cin >> b;
	cin >> c;
	if (b > c) {
		ans += b;
	}
	else if (b < c) {
		ans += c;
	}
	else {
		ans += b;
	}

	cout << ans << endl;

	return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
  int a[10];
  int sum=0;
  for(int i=0; i<6; i++){
    cin >> a[i];
    sum += a[i];
  }
  int mini = 1000;
  for(int i=0; i<4; i++){
    mini = min(a[i],mini);
  }
  //cout << mini << endl;
  sum -= mini;
  mini = 1000;
  for(int i=4; i<6; i++){
    mini = min(a[i],mini);
  }
  //cout << mini << endl;
  sum -= mini;
  cout << sum << endl;
  return 0;
}

C++: #include<stdio.h>
int main(void)
{
	int a,b,c,d,e,f,x,x1,x2,x3,z,max;
	scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f);
	x=a+b+c;
	x1=a+b+d;
	x2=a+c+d;
	x3=b+c+d;
	max=x;
	if(max<=x1){
		max=x1;
	}
	else if(max<=x2){
		max=x2;
	}
	else if (max<=x3){
		max=x3;
	}
	if(e>=f){
		z=max+e;
		printf("%d\n",z);
	}
	else{
		z=max+f;
		printf("%d\n",z);
	}
	return 0;
}