Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"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 max(x, y int) int {
	if x > y {
		return x
	}
	return y
}

func main() {
	scanner.Split(bufio.ScanWords)
	a := make([]int, 8)
	for i := 0; i < 8; i++ {
		a[i] = nextInt()
	}
	s := 0
	for i := 0; i < 4; i++ {
		s += a[i]
	}
	t := 0
	for i := 4; i < 8; i++ {
		t += a[i]
	}
	fmt.Println(max(s, t))
}

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[8];
int main() {
    for (int i = 0; i < 8; ++i) cin >> a[i];
    int A = 0, B = 0;
    for (int i = 0; i < 4; ++i) A += a[i], B += a[i+4];
    cout << max(A, B) << endl;
    
    return 0;
}

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

int main(){
int a;int b;
int i = 1;
int s;int d;int j;int k;
cin >> s >> d >> j >> k;
a = s+d+j+k;
int w;int ww;int www;int wwww;
cin >>w >> ww >> www >> wwww;
b = w + ww + www + wwww;
if(a >= b){
cout >> a >>endl;
}
else{
cout >> b >> endl;
}
    return 0;
}

C++: #include <iostream>
#include <string>
#include <sstream>
#include <algorithm>
#include <vector>
#include <utility>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <map>
#include <set>
#include <stack>
#include <queue>

 
using namespace std;
 
#define pb(n)	push_back(n)
#define mp(n,m) make_pair(n,m)
#define fi 	first
#define se 	second
#define all(r) (r).begin(),(r).end()
 
#define REP(i,s,e)	for(int i=(s); i<(e); i++)
#define rep(i,n)	REP(i,0,n)
#define REPE(i,s,e)	for(int i=s; i>e; i--)
#define repe(i,n)	REPE(i,n,-1)


typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
 
typedef vector<vi> vvi;
 
const int IMAX=((1<<30)-1)*2+1;
const int INF=100000000;
const double EPS=1e-10;
//int mod=1000000007
 



int main(){
	int s=0,t=0,u;
	rep(i,4) cin>>u,s+=u;
	rep(i,4) cin>>u,t+=u;
	cout<<max(s,t)<<endl;
}

C++: #include<stdio.h>
#include<iostream>
using namespace std;
int main(){
int n1[5]={},n2[5]={},m1,m2,m3,m4,S=0,T=0;
cin>>m1>>m2>>m3>>m4;
S=m1+m2+m3+m4;
cin>>m1>>m2>>m3>>m4;
T=m1+m2+m3+m4;
if(S<T)S=T;
cout<<S<<endl;
return 0;
}

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

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

int main() {
	int s = 0; int t = 0; int temp;
	for (int i = 0; i < 4; i++) { cin >> temp; s = s + temp; }
	for (int i = 0; i < 4; i++) { cin >> temp; t = t + temp; }
	cout << (s > t ? s : t) << endl;
	return 0;
}

C++: #include<iostream>
#include<sstream>
#include<cstdio>
#include<cstdlib>
#include<vector>
#include<string>
#include<stack>
#include<queue>
#include<deque>
#include<set>
#include<map>
#include<algorithm>
#include<functional>
#include<utility>
#include<cmath>
#include<ctime>
#include<complex>

using namespace std;

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


int main(){

	int a,b; int S=0; int T=0;
	rep(i,4){
		cin >> a;
		S+=a;
	}

	rep(i,4){
		cin >> b;
		T+=b;
	}

	if(S>=T) cout << S << endl;
	else cout << T << endl;


	return 0;
}

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

#define int long long int
#define main signed main()
#define bye return 0
#define loop(i, a, n) for (int i = (a); i < (n); i++)
#define rep(i, n) loop(i, 0, n)
#define each(p, v) for (auto p = (v).begin(); p != (v).end(); p++)
#define all(v) (v).begin(), (v).end()
#define prec(n) fixed << setprecision(n)
#define dump(x) cerr << "(L" << __LINE__ << ") " << #x << " = " << (x) << endl
#define clr(x, a) memset(x, a, sizeof(x))

#define sum(v) accumulate(all(v), 0)
#define stlice(from, to) substr(from, (to) - (from) + 1)
#define odd(n) ((n) % 2)
#define even(n) (!odd(n))

#define INF 1000000000
#define MOD 1000000007

#define pb push_back
#define mp make_pair
#define mt make_tuple
#define fi first
#define se second
#define vi vector<int>
#define vb vector<bool>
#define vc vector<char>

using namespace std;

main {
  int a,b,c,d,e,f,g,h;
  cin>>a>>b>>c>>d>>e>>f>>g>>h;
  cout<<max(a+b+c+d,e+f+g+h)<<endl;
  bye;
}

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

int main(void){
	int a,b,c,d;
	int sum1,sum2;

	scanf("%d %d %d %d",&a,&b,&c,&d);
	sum1=(a+b+c+d);
	fflush(stdin);
	scanf("%d %d %d %d",&a,&b,&c,&d);
	sum2=(a+b+c+d);
	if(sum1>=sum2)
		cout<<sum1<<endl;
	else
		cout<<sum2<<endl;

	return 0;
}

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

int main()
{
    vector<int> sum_of_scores(2, 0);

    for (int i = 0; i < 2; i++)
        for (int a, b, c, d; cin >> a >> b >> c >> d;)
            sum_of_scores[i] = a + b + c + d;

    cout << max(sum_of_scores[0], sum_of_scores[1]) << endl;

    return 0;
}

C++: #include <iostream.h>

using namespace std;

int main (){

	int A,B,ma,i,s,e;
	
	cin>>ma>>i>>s>>e;
		
		A=ma+i+s+e;
		
	cin>>ma>>i>>s>>e;
	
		B=ma+i+s+e;
		
	if(A>B){
		return A;
	}	
	else if(A<B){
		return B;
	}
	else {return A;
	}
	return m;
}

int main(){
	int n;
	cin >> n;
	cout << solve(n) << endl;
	return 0;
}