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 <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <fstream>
#include <complex>
#include <stack>
#include <queue>

using namespace std;
typedef long long LL;
typedef pair<int, int> P;
static const double EPS = 1e-5;

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

int main(void){
  int sum[2],tmp;
  REP(i,4){
    cin>>tmp;
    sum[0]+=tmp;
  }
  REP(i,4){
    cin>>tmp;
    sum[1]+=tmp;
  }
  cout<<max(sum[0],sum[1])<<endl;
  return 0;
}

C++: #include <iostream>

using namespace std;

int main(void) {
	int point[2][5];
	
	for(int i = 0; i < 2; i++) {
		for(int j = 0; j < 4; j++) {
		cin >> point[i][j];
		}
		point[i][4] = 0;
	}
	
	for(int i = 0; i < 2; i++) {
		for(int j = 0; j < 4; j++) {
			point[i][4] += point[i][j];
		}
	}
	
	if(point[0][4] >= point[1][4]) {
		cout << point[0][4] << endl;
	} else {
		cout << point[1][4] << 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%d%d%d%d",&a,&b,&c,&d,&e,&f,&g,&h);
	s=a+b+c+d;
	t=e+f+g+h;
	if(s>t){
		printf("%d\n",s);
	}else{
		printf("%d\n",t);
	}
	return 0;
}

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

using namespace std;

int main {
    int A,B,a,b
    for(i=0;i<4;i++) {
        cin << a;
        A += a;
    }
    for(i=0;i<4;i++) {
        cin << b;
        B += b;
    }
    A>B? cout << A : cout << B;
}

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

using namespace std;

int main() {
  int p[8];
  for (int i = 0; i < 8; i++)
    cin >> p[i];
  cout << max(accumulate(p, p+4, 0), accumulate(p+4, p+8, 0)) << endl;
  return 0;
}

C++: using namespace std;
int p[7];
int main(){
	for(int i=0;i<8;i++)cin>>p[i],p[i]+=(i>1&&i%4?p[i-1]:0);
	cout<<(p[3]>?p[7])<<endl;
	return 0;
}

C++: #include<iostream>
#include<string>
#include<algorithm>
using namespace std;
     
int main(){
  int a,b,c,d,e,f,g,h,A,B;
  cin>>a>>b>>c>>d>>e>>f>>g>>h;
  A=a+b+c+d;
  B=e+f+g+h;
  if(A>B){
    cout<<A<<endl;
  }else{
    cout<<B<<endl;
  }
  return 0;
}

C++: #include <cstdio>
#include <cstdlib>
#include <cmath>
#include <iostream>
#include <algorithm>
#include <utility>
#include <functional>
#include <string>
#include <vector>
#include <deque>
#include <queue>
#include <stack>
#include <list>
#include <set>
#include <map>
#include <unordered_map>
#include <iomanip>
#include <numeric>
#include <complex>

using namespace std;
using ll = long long;
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define all(x) (x).begin(),(x).end()
const int INF = (1<<30);
const ll INFL = (1LL<<62);
const ll MOD = 1000000007;
template<class T> bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
template<class T> bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
template<class T> T gcd(T a, T b) { return b ? gcd(b, a % b) : a; }
template<class T> T lcm(T a, T b) { return a / gcd(a, b) * b; }
template<class T> ll mod_pow(ll a, ll n, T mod) { mod=(ll)mod; ll res=1, p=a%mod; while(n){ if(n&1) res=res*p%mod; p=p*p%mod; n>>=1; } return res; }
template<int mod>
struct ModInt {
    using ll = long long; ll x;
    ModInt() : x(0) {}
    ModInt(int y) : x(y >= 0 ? ll(y % mod) : (ll)((mod - (-y) % mod))) {}
    ModInt(ll y) : x(y >= 0 ? y % mod : (mod - (-y) % mod)) {}
    ModInt &operator+=(const ModInt &rhs) { if((x += rhs.x) >= mod) x -= mod; return *this; }
    ModInt &operator-=(const ModInt &rhs) { if((x += mod - rhs.x) >= mod) x -= mod; return *this; }
    ModInt &operator*=(const ModInt &rhs) { x = x * rhs.x % mod; return *this; }
    ModInt &operator/=(const ModInt &rhs) { *this *= rhs.inverse(); return *this; }
    ModInt operator-() const { return ModInt(-x); }
    ModInt operator+(const ModInt &rhs) const { return ModInt(*this) += rhs; }
    ModInt operator-(const ModInt &rhs) const { return ModInt(*this) -= rhs; }
    ModInt operator*(const ModInt &rhs) const { return ModInt(*this) *= rhs; }
    ModInt operator/(const ModInt &rhs) const { return ModInt(*this) /= rhs; }
    ModInt operator==(const ModInt &rhs) const { return x == rhs.x; }
    ModInt operator!=(const ModInt &rhs) const { return x != rhs.x; }
    friend ostream &operator<<(ostream &os, const ModInt &rhs) { return os << rhs.x; }
    friend istream &operator>>(istream &is, ModInt &rhs) { ll t; is >> t; rhs = ModInt<mod> (t); return (is); }
private:
    ModInt inverse() const { ll a = x, u = 1LL, v = 0LL, t, b = (ll)mod; while(b > 0) { t = a / b; swap(a -= t * b, b); swap(u -= t * v, v); } return  ModInt(u); }
};
using mint = ModInt<MOD>;

int main() {
    vector<int> a(4), b(4);
    rep(i, 4) cin >> a[i];
    rep(i, 4) cin >> b[i];
    cout << max(accumulate(all(a), 0), accumulate(all(b), 0)) << endl;
    return 0;
}

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

int main(){
    int a=0,b=0;
    for (int i = 0; i < 4; ++i) {
        int t;
        cin>>t;
        a+=t;
    }
    for (int i = 0; i < 4; ++i) {
        int t;
        cin>>t;
        b+=t;
    }
    cout<<max(a,b)<<endl;
    return 0;
}

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

int main() {
    int a[4],b[4];
    for(int i=0;i<4;i++) scanf("%d",&a[i]);
    for(int i=0;i<4;i++) scanf("%d",&b[i]);
    
    int as=std::accumulate(a,a+4, 0), bs=std::accumulate(b,b+4, 0);
    as > bs ? std::cout << as : std::cout << bs;
    
    return 0;
}

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

using namespace std;

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

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

int main() {
	int ajou, asu, ari, aei, S ;/*A???????????????*/
	int bjou, bsu, bri, bei, T ;/*B???????????????*/
	scanf("%d%d%d%d", &ajou, &asu, &ari, &aei);
	scanf("%d%d%d%d", &bjou, &bsu, &bri, &bei);
	S = ajou + asu + ari + aei ;
	T = bjou + bsu + bri + bei ;
	if(S>T)
	{
		printf("%d\n",S);
	}else if(S<T){
		printf("%d\n",T);
	}else{
		printf("%d\n",S);
	}
	
	return 0;
}

C++: 
#include<iostream>
#include<stdio.h>
#include<math.h>
#include<algorithm>
#include<string.h>
using namespace std;
int main(){
	int a,b,n;
	for(int i=0;i<4;i++){
		cin>>n;
		a=a+n;
	}
	for(int i=0;i<4;i++){
		cin>>n;
		b=b+n;
	}
	if(a>b){
		cout<<a<<endl;
	}
	else{
		cout<<b<<endl;
	}
	return 0;
}

C++: #include<iostream>

using namespace std;

int main(){
	int S = 0, T = 0, s[4], t[4];

	for(int i = 0; i < 4; i++){
		cin >> s[i];
		S += s[i];
	}
	for(int i = 0; i < 4; i++){
		cin >> t[i];
		T += t[i];
	}

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

	return 0;
}

C++: #include <stdio.h>
#define N 4

int main(void){
    int tmp, sumA=0, sumB=0;
    
    for (int i=0; i<N; i++){
        scanf("%d", &tmp);
        sumA += tmp;
    }
    for (int i=0; i<N; i++){
        scanf("%d", &tmp);
        sumB += tmp;
    }
    printf("%d\n", sumA>sumB?sumA:sumB);
    return 0;
}