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 <bits/stdc++.h>
using namespace std;
using ll=long long;
using vb=vector<bool>;
using vvb=vector<vb>;
using vd=vector<double>;
using vvd=vector<vd>;
using vl=vector<ll>;
using vvl=vector<vl>;
using pll=pair<ll,ll>;
using tll=tuple<ll,ll>;
using vs=vector<string>;
#define all(a) a.begin(),a.end()
#define rall(a) a.rbegin(),a.rend()
#define rep(i,n) range(i,0,n)
#define range(i,a,n) for(int i=(a);i<(n);i++)

#define LINF    	((ll)1ll<<60)
#define INF     	((int)1<<30)
#define EPS     	(1e-9)
#define MOD     	(1000000007ll)
#define fcout(a)	cout<<setprecision(a)<<fixed
#define fs 			first
#define sc			second
#define PI			3.1415926535897932384

int dx[]={1,0,-1,0,1,-1,-1,1},dy[]={0,1,0,-1,1,1,-1,-1};
template<class S,class T>ostream&operator<<(ostream&os,pair<S,T>p){os<<"["<<p.first<<", "<<p.second<<"]";return os;};
template<class S>auto&operator<<(ostream&os,vector<S>t){bool a=1; for(auto s:t){os<<(a?"":" ")<<s; a=0;} return os;}
void OUT(bool b){cout<<(b?"YES":"NO")<<endl;}
void Out(bool b){cout<<(b?"Yes":"No")<<endl;}
void out(bool b){cout<<(b?"yes":"no")<<endl;}
int popcnt(int x) { return __builtin_popcount(x); }
int popcnt(ll x) { return __builtin_popcountll(x); }
int bsr(int x) { return 31 - __builtin_clz(x); }
int bsr(ll x) { return 63 - __builtin_clzll(x); }
int bsf(int x) { return __builtin_ctz(x); }
int bsf(ll x) { return __builtin_ctzll(x); }

class compare {
public:
	bool operator()(tuple<ll, ll> a, tuple<ll, ll> b) {
		return (get<1>(a) > get<1>(b));
	}
};

int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	int n,a=0,b=0,in;
	rep(i,4){
		cin>>in;
		a+=in;
	}
	rep(i,4){
		cin>>in;
		b+=in;
	}
	cout<<max(a,b)<<endl;
}

C++: #include <iostream>
#include <stdio.h>
#include <string>

using namespace std;

int main() {
	int a, b, c, d;
	int max = 0;
	for (int i = 0; i < 2; ++i) {
		cin >> a >> b >> c >> d;
		int sum = a + b + c + d;
		if (sum > max) sum = max;
	}
	cout << sum << endl;
	return 0;
}

C++: #include <iostream>

using namespace std;

int main()
{
    int a,b,c,d,e,f,g,h,s,t;
    cin >> a >> b >> c >> d >> e >> f >> g >> h;
    s=a+b+c+d;
    t=e+f+g+h;
    if (t>s){
        cout << t << endl;
    }
    else cout << s << endl;
    return 0;
}

C++: #include <cstdio>
#include <iostream>
#include <algorithm>
using namespace std;
int main(void)
{
  int ret = 0;
  for(int i = 0;i < 2;i++){
    int p = 0;
    for(int j = 0;j < 4;j++){
      int t;
      cin >> t;
      p += t;
    }
    ret = max(ret,p);
  }
  cout << ret << endl;
}

C++: #include <iostream>
#define MAX(a,b) ((a)>(b)?(a):(b))
using namespace std;

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

C++: #include<iostream>
using namespace std;
int main(){
	int a[10] = {}, b[10] = {},A=0,B=0;
	for (int i = 0; i < 4; i++){
		cin >> a[i];
		A = A + a[i];
	}
	for (int i = 0; i < 4; i++){
		cin >> b[i];
		B = B + b[i];
	}
	if (A >= B){
		cout << A << endl;
	}
	if (B > A){
		cout << B << endl;
	}
	return 0;
}

C++: #include<iostream>

using namespace std;

int main(void) {
	int suma, sumb, tmp;
	int i;

	suma = 0;
	for(i = 0; i < 4; i++) {
		cin >> tmp;
		suma += tmp;
	}
	sumb = 0;
	for(i = 0; i < 4; i++) {
		cin >> tmp;
		sumb += tmp;
	}

	cout << max(suma, sumb) << endl;

	return 0;
}

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

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);

  int S = 0;
  int a,b,c,d;
  for(int i=0;i<2;i++) {
    cin >> a >> b >> c >> d;
    S = max(S,a+b+c+d);
  }
  cout << S << endl;
}

C++: #include <cstdio>
#include <algorithm>
using namespace std;
int main()
{
int a,b,x;
for(int i=0;i<8;i++){scanf("%d",&x); if(i<=3) a+=x; else b+=x;}
printf("%d\n",max(a,b));
}

C++: #include<stdio.h>

int main(void)
{
	int point[4];
	int i;
	int sum[2],max=0;
	
	sum[0]=0;
	sum[1]=0;

	for (i=0;i<2;i++) {
		scanf("%d %d %d %d",&point[0],&point[1],&point[2],&point[3]);
		sum[i]+=point[0]+point[1]+point[2]+point[3];
		if(max < sum[i]) {
			max=sum[i];
		}
	}

	printf("%d\n",max);

	return 0;
}

C++: #include<stdio.h>

int max(int,int);

int main(){
	int a=0;
	int S=0,T=0;
	int i=0;
	for(i=0;i<4;i++){
		scanf("%d",&a);
		S=S+a;
	}
	for(i=0;i<4;i++){
		scanf("%d",&a);
		T=T+a;
	}

	a=max(S,T);
	printf("%d\n",a);

	return 0;
}


int max(int a,int b){
	if(a<b){
		return b;
	}else{
		return a;
	}
}

C++: #include<stdio.h>
int main()
{
	int a, b,i,a1=0,b1=0;
	for (i = 0; i < 4; i++){
		scanf("%d", &a);
		a1 += a;
	}
	for (i = 0; i < 4; i++){
		scanf("%d", &b);
		b1 += b;
	}
	if (a>b){
		printf("%d\n", a1);
	}
	else if (a < b){
		printf("%d\n", b1);
	}
	else
		printf("%d\n", a1);
}

C++: #include <cstdio>
#include <cstdlib>
#include <iostream>
#include <string>
#include <cmath>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>

using namespace std;

int main(){
    int a=0,b=0,in;
    
    for(int i=0;i<4;i++){
        scanf("%d",&in);
        a+=in;
    }
    for(int i=0;i<4;i++){
        scanf("%d",&in);
        b+=in;
    }
    
    if(a>b)
        printf("%d\n",a);
    else
        printf("%d\n",b);
    
    return 0;
}

C++: #include "stdafx.h"
#include <iostream>
#include<algorithm>
using namespace std;

int main()
{
	int sum=0, summ=0;
	for (int i = 0; i < 4; i++)
	{
		int s; cin >> s; sum += s;
	}
	for (size_t i = 0; i < 4; i++)
	{
		int s; cin >> s; summ += s;
	}
	if (sum >= summ) { cout << sum<<endl; }
	else { cout << summ<<endl; }
}

C++: #include<iostream>
#include<cstdio>
#include<algorithm>
using namespace std;
int main(){
	int sumA = 0,sumB = 0,apoint[4],bpoint[4];
	for(int i = 0;i<4;i++){
		cin >> apoint[i];
		sumA = sumA + apoint[i];
	}
	for(int i = 0;i<4;i++){
		cin >> bpoint[i];
		sumB = sumB + bpoint[i];
	}
	if(sumB > sumA){
		cout << sumB << endl;
	}
	else if(sumA > sumB){
		cout << sumA << endl;
	}
	else{
		cout << sumA << endl;
	}
	return 0;
}

C++: #include<iostream>
#include<cstdio>
#include<cstring>
#include<string>
#include<vector>
#include<map>
#include<algorithm>
#define inf 32767
using namespace std;

int main(){
  int sum,max=0,point;
  int i,l;
  
  for(i=0;i<2;i++){
    sum=0;
    for(l=0;l<4;l++){
      cin>>point;
      sum+=point;
    }
    if(sum>max) max=sum;
  }
  printf("%d\n",max);
  return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <complex>
#include <cstring>
#include <cstdlib>
#include <string>
#include <cmath>
#include <queue>
using namespace std;

#define REP(i,n) for(int i=0;i<(int)n;++i)
#define FOR(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)
#define ALL(c) (c).begin(), (c).end()
const int INF = 1<<29;

int main() {
  int v[4] = {};
  REP(i,2) {
    REP(j,4) {
      int a;
      cin >> a;
      v[i] += a;
    }
  }
  cout << max(v[0],v[1]) << endl;
}

C++: #include <cstdio>

int main(){
	int a[5], b[5];a[4] = b[4] = 0;
	for(int i = 0;i < 4;i++){scanf("%d", &a[i]);a[4] += a[i];}
	for(int i = 0;i < 4;i++){scanf("%d", &b[i]);b[4] += b[i];}
	if(a[4] >= b[4])printf("%d\n", a[4]);
	else printf("%d\n", b[4]);
	return 0;
}

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

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