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>
using namespace std;

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

	for (int i = 1; i <= 4; i++){
		cin>>b;
		T=T+b;
	}
	
	if(S>T){
		cout<<S<<endl;
	} else if(S<=T){
		cout<<T<<endl;
	}
	// your code goes here
	return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;int S,T,a,i,j;
int main(){
for(j=0;j<4;j++){cin>>a;S+=a;}
for(j=0;j<4;j++){cin>>a;T+=a;}
cout<<max(S,T)<<endl;}

C++: #include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
int main(){
	int x,s1=0,s2=0;
	for(int i=0;i<4;i++){
		cin >> x;
		s1+=x;
	}
	for(int i=0;i<4;i++){
		cin >> x;
		s2+=x;
	}
	cout << max(s1,s2) << endl;
	return 0;
}

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

using namespace std;

int main()
{
	int a, b, i;
	int sum_a, sum_b;
	
	sum_a = sum_b = 0;
	
	for (i = 0; i < 4; i++){
		scanf("%d", &a);
		sum_a += a;
	}
	for (i = 0; i < 4; i++){
		scanf("%d", &b);
		sum_b += b;
	}
	
	printf("%d\n", max(sum_a, sum_b));
	
	return (0);
}

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

C++: /*
	AOJ 0510 JOI yo 2005 2006 1 Score
*/

//ミスを防ぐためにまずは基本のIncludeをすべて格納する

#include<fstream>
#include<iostream>
#include<string>
#include<queue>
#include<algorithm>
#include<set>
#include<map>
#include<cmath>
#include<cstring>
#include<cstdlib>
#include<cstdio>
#include<vector>
#define INF (1<<21)
using namespace std;
typedef pair<int,int> P;

//ここまで基本型、多少の変更はあるけどまあいける

int main()
{
	int a[4],b[4];
	int asum,bsum;


	cin >>a[0]>>a[1]>>a[2]>>a[3];
	cin >>b[0]>>b[1]>>b[2]>>b[3];

	asum=a[0]+a[1]+a[2]+a[3];
	bsum=b[0]+b[1]+b[2]+b[3];

	int high;

	high=asum;
	if (bsum>asum) {high = bsum;}
	
	cout<<high<<\n;

	return 0;
}

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

#define iota(i,n,b,s) for(int i=int(b);i!=int((b)+(s)*(n));i+=(s))
#define range(i,n,m) iota(i,(((n)>(m))?((n)-(m)):((m)-(n))),(n),((n)>(m)?-1:1))
#define rep(i,n) iota(i,(n),0,1)
#define loop for(;;)

#define INF (1e9)
#define EPS (1e-9)
#define cons(a,b) (make_pair(a,b))
#define car(a) (a.first)
#define cdr(a) (a.second)
#define cadr(a) (car(cdr(a)))
#define cddr(a) (cdr(cdr(a)))
#define all(a) a.begin(), a.end()
#define trace(var) cerr<<">>> "<<#var<<" = "<<var<<endl;

typedef long long Integer;
typedef double Real;
typedef vector<int> vi;
typedef vector<string> vs;
typedef map<string,int> Dictionary;
const Real PI = acos(-1);

template<class S, class T>
ostream& operator<<(ostream& os, pair<S,T> p) {
  os << '(' << car(p) << ", " << cdr(p) << ')';
  return os;
}

template<class T>
ostream& operator<<(ostream& os, vector<T> v) {
  if (v.size() == 0) {
    os << "(empty)";
    return os;
  }
  os << v[0];
  for (int i=1, len=v.size(); i<len; ++i) os << ' ' << v[i];
  return os;
}

int dx[] = { -1, 0, 1, 0 };
int dy[] = {  0, -1, 0, 1 };

int main() {

  int a=0;
  int b=0;
  rep(i,4) { int x; cin >> x; a += x; }
  rep(i,4) { int x; cin >> x; b += x; }
  cout << max(a,b)<<endl;

  return 0;
}

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

int main() {
    int tmp, i;
    int sum_a = 0, sum_b = 0;

    for (i=0; i<4; i++) {
        cin >> tmp;
        sum_a += tmp;
    }
    for (i=0; i<4; i++) {
        cin >> tmp;
        sum_b += tmp;
    }

    cout << max(sum_a, sum_b) << endl;
    return 0;
}

C++: #include <iostream>
#include <string>
#include <algorithm>
#include <functional>
#include <vector>
#include <utility>
#include <cstring>
#include <iomanip>
#include <numeric>
#include <limits>
#include <cmath>
#include <cassert>

using namespace std;
using ll = long long;

const int INF = 1<<30;
const int MOD = (int)1e9 + 7;
const int MAX_N = (int)1e5 + 5;
#define debug(x) cout << #x << ": " << x << endl

signed main(void)
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    int sumA = 0;
    for(int i = 0; i < 4; i++)
    {
        int x; cin >> x;
        sumA += x;
    }
    int sumB = 0;
    for(int i = 0; i < 4; i++)
    {
        int x; cin >> x;
        sumB += x;
    }
    cout << (sumA > sumB ? sumA : sumB) << endl;
    return 0;
}

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

int main(){
  int a,b,s,t;
  s=0;t=0;

  for(int i=0;i<4;i++){
    cin>>a;
    s+=a;
  }
  
  for(int i=0;i<4;i++){
    cin>>b;
    t+=b;
  }

  if(s<=t)s=t;

  cout<<s<<endl;
  return 0;
}

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

C++: #include<iostream>
#include<string>
#include<algorithm>
#include<stack>
#include<queue>
#include<set>
using namespace std;
int main()
{
	int a, b, c, d, e, i, j, k, l, m, n, o, p, q, r;
	cin >> a;
	cin >> b;
	cin >> c;
	cin >> d;
	cin >> e;
	cin >> i;
	cin >> j;
	cin >> k;
	d += a;
	d += b;
	d += c;
	k += e;
	k += i;
	k += j;
	cout << max(k, d) << endl;
	return 0;
}

C++: #include <iostream>

using namespace std;

int main() {

	int s[4], t[4], ss ,st;

	ss=st=0;
	for(int i=0; i<4; i++) {
		cin >> s[i];
	}
	for(int i=0; i<4; i++) {
		cin >> t[i];
	}
	for(int i=0; i<4; i++) {
		ss+=s[i];
		st+=t[i];
	}
	cout << (ss>=st ? ss : st) << endl;

	return 0;

}

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

using namespace std;

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){
		printf("%d\n",A);
	}
	else if (A<B){
		printf("%d\n",B);
	}
	else {
		printf("%d\n",A=B);
	}
}

C++: #include<stdio.h>

int main(){
 int a1,b1,c1,d1,a2,b2,c2,d2,sum1,sum2;

 scanf("%d %d %d %d",&a1,&b1,&c1,&d1);
 scanf("%d %d %d %d",&a2,&b2,&c2,&d2);
 sum1=a1+b1+c1+d1;
 sum2=a2+b2+c2+d2;
 printf("%d\n",sum1<sum2?sum2:sum1);
 return 0;
}

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 <iostream>
using namespace std;
int main(void){
    // Your code here!
    int a1, a2, a3, a4;
    int b1, b2, b3, b4;
    int sum1, sum2;
    cin >> a1 >> a2 >> a3 >> a4;
    sum1 = a1 + a2 + a3 + a4;
    cin >> b1 >> b2 >> b3 >> b4;
    sum2 = b1 + b2 + b3 + b4;
    
    if(sum1 > sum2) cout << sum1 << endl;
    else cout << sum2 << endl;
    
}

C++: #include <cstdio>
main(){
int a[4],l[3],n=2;
while(n--)
scanf("%d%d%d%d",a,a+1,a+2,a+3),l[n]=*a+a[1]+a[2]+a[3];
printf("%d\n",*l>l[1]?*l:l[1]);
}

C++: #include <studio.h>

int q,w,e,r,t,y,u,i;
scanf("%d%d%d%d",&q,&w,&e,&r);
scanf("%d%d%d%d",&t,&y,&u,&i);

printf("%d",(q+w+e+r>=t+y+u+i?q+w+e+r:t+y+u+i));

C++: #include <studio.h>

int main(){
int q,w,e,r,t,y,u,i;
scanf("%d%d%d%d",&q,&w,&e,&r);
scanf("%d%d%d%d",&t,&y,&u,&i);

printf("%d",(q+w+e+r>=t+y+u+i?q+w+e+r:t+y+u+i));

return 0;
}