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<stdio.h>
int main(){
  int a,a2,b,b2,c,c2,d,d2;
  int s,t;
  scanf("%d %d %d %d",&a,&b,&c,&d);
  scanf("%d %d %d %d",&a2,&b2,&c2,&d2);
  s=a+b+c+d;
  t=a2+b2+c2+d2;
  if(t>=s)
    printf("%d\n",t);
  else
    printf("%d\n",s);
  return 0;
}

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

int main(){

  int a[5], b[5];

  for(int i=0;i<4;i++) cin >> a[i];
  for(int i=0;i<4;i++) cin >> b[i];

  int k = 0, s = 0;
  for(int i=0;i<4;i++){
    k += a[i];
    s += b[i];
  }

  cout << max(k,s) << endl;
}

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

#define loop(v, f, l) for(int v = (f), v##_ = (l); v < v##_; ++v)

using namespace std;

typedef long long int lint;
static inline int in(){ int x; scanf("%d", &x); return (x); }
static inline lint inl(){ lint x; scanf("%lld", &x); return (x); }

int main()
{
	int apoint = 0;
	int bpoint = 0;
	for(int i = 0; i < 4; i++)
	{
		apoint += in();
	}
	for(int i = 0; i < 4; i++)
	{
		bpoint += in();
	}
	printf("%d\n", max(apoint, bpoint));
	return (0);
}

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

int main(){
  while(true){
    int sumA = 0, sumB = 0;
    for(int i = 0; i < 4; i++){
      int x;
      if(!(cin >> x)) return 0;
      sumA += x;
    }
    for(int i = 0; i < 4; i++){
      int x;
      cin >> x;
      sumB += x;
    }

    cout << max(sumA, sumB) << endl;
  }
}

C++: #include <iostream>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <string>
#include <cstring>
#include <vector>
#include <queue>
#include <stack>
#include <deque>
#include <map>
#include <set>
#include <bitset>
#include <limits>
typedef long long ll;
#define REP(i,n)   for(int i=0; i<(int)(n); ++i)
#define FOR(i,b,e) for(int i=(b); i<=(int)(e); ++i)

#define in cin
#define out cout
#define pb push_back
using namespace std;

int main(){
	int a = 0, b = 0,tmp;
	REP(j, 4) {
		in >> tmp;
		a += tmp;
	}
	REP(i, 4) {
		in >> tmp;
		b += tmp;
	}
	int ans=a;
	if (a < b)ans = b;
	out << ans << endl;
	return 0;

}

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

#define repi(i,a,b) for(int i=(a);i<(b);i++)
#define rep(i,n) for(int i=0;i<(n);i++)

int main() {
	ios::sync_with_stdio(false);
	
	int a, b, s, t;
	s = 0;
	t = 0;
	rep(i, 4) {
		cin >> a;
		s += a;
	}
	rep(i, 4) {
		cin >> b;
		t += b;
	}
	
	cout << (t>s?t:s) << endl;
	
	return 0;
}

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

int main()
{
  int a, b, c, d;
  int A_SUM, B_SUM;
  cin >> a >> b >> c >> d;
  A_SUM = a + b + c + d;
  cin >> a >> b >> c >> d;
  B_SUM = a + b + c + d;

  cout << max(A_SUM, B_SUM) << endl;
}

C++: #include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <complex>
#include <string>
#include <sstream>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <functional>
#include <iostream>
#include <map>
#include <set>
using namespace std;
typedef pair<int,int> P;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vll;
#define pu push
#define pb push_back
#define mp make_pair
#define eps 1e-9
#define INF 2000000000
#define sz(x) ((int)(x).size())
#define fi first
#define sec second
#define EQ(a,b) (abs((a)-(b))<EPS)
int main()
{
	int a=0,b=0;
	for(int i=0;i<4;i++)
	{
		int k;
		cin >> k;
		a+=k;
	}
	for(int i=0;i<4;i++)
	{
		int k;
		cin >> k;
		b+=k;
	}
	printf("%d\n",a>b ? a:b);
	return 0;
}

C++: #include <iostream>

using namespace std;

int main(){
   int a[2],in;
   a[0] = a[1] = 0;
   for(int i=0;i<2;i++){
      for(int j=0;j<4;j++){
	 cin >> in;
	 a[i] += in;
      }
   }
   cout << (a[0]>a[1]? a[0]:a[1]) << endl;
   return 0;
}

C++: #include<iostream>
#include<cstdio>
#include<algorithm>
using namespace std;
int main(void)
{
	int a=0,b=0,a1=0,b1=0;
	for(int i=0;i<4;i++)
	{
		cin>>a;
		a1+=a;
	}
	for(int i=0;i<4;i++)
	{
		cin>>b;
		b1+=b;
	}
	cout<<max(a1,b1)<<endl;
	return 0;
}
//8:12.624クリア

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

using namespace std;

#define REP(i,m) for(int i=0; i<m; i++)
#define FOR(i,n,m) for(int i=n; i<m; i++)
#define INF 1000000007
#define INFL (1LL << 60)
#define MOD 998244353
#define ALL(v) v.begin(),v.end()
#define pb push_back
#define ll long long int
#define P pair<ll, ll>

int 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;
	return 0;
}

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

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

C++: #include<cstdio>
int main(){
    int as=0,bs=0,ins;
    for(int i=0;i<4;i++){
        scanf("%d",&ins);
        as+=ins;
    }
    for(int i=0;i<4;i++){
        scanf("%d",&ins);
        bs+=ins;
    }
    printf("%d\n",as>bs?as:bs);
}

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

int score[2][4];
int T[2];
int main()
{
	for(int i=0;i<2;i++)
	{
		for(int j=0;j<4;j++)
		{
			cin >>score[i][j];
			T[i]+=score[i][j];
		}
	}
	if(T[0]>=T[1])
	{
		cout<<T[0]<<endl;
	}
	else
	{
		cout<<T[1]<<endl;
	}
	return 0;
}

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

int main()
{
  int S,T,a,b,c,d;
  cin>>a>>b>>c>>d;
  S=a+b+c+d;
  cin>>a>>b>>c>>d;
  T=a+b+c+d;
  S>=T?cout<<S<<endl:cout<<T<<endl;
}

C++: #include <iostream>
using namespace std;
int main(void){
    int a,b,c,d;
    int e,f,g,h;
    cin >> a >> b >> c >> d;
    cin >> e >> f >> g >> h;
    int x = a+b+c+d;
    int y = e+f+g+h;
    if(x>y){
        cout << x << endl;
    }
    else{
        cout << y <<endl;
    }
}

C++: #include <stdio.h>
#include <iostream>
#include <string>
#include <vector>
#include <map>
using namespace std;
int main(){
	int a,b,c,d;
	cin >> a >> b >> c >> d;
	int S = a+b+c+d;
	cin >> a >> b >> c >> d;
	int T = a+b+c+d;
	
	if(S>=T) cout << S << endl;
	else cout << T << endl;

	return 0;
}

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


int main(){
    int koku, suu, ei, ri;
    int sum_a, sum_b;

    cin >> koku >> suu >> ei >> ri;
    sum_a = koku + suu + ei + ri;

    cin >> koku >> suu >> ei >> ri;
    sum_b = koku + suu + ei + ri;

    if (sum_a > sum_b) cout << sum_a << endl;
    else cout << sum_b << endl;


    return 0;
}

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

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




	
	return 0;
}

C++: #include <stdio.h>

main()
{
int ai,am,as,ae,bi,bm,bs,be,s,t;
scanf("%d %d %d %d %d %d %d %d",&ai,&am,&as,&ae,&bi,&bm,&bs,&be);
s = ai+am+as+ae;
t = bi+bm+bs+be;
if (s>t)	printf("%d\n",s);
else		printf("%d\n",t);
}

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

using namespace std;

int main() {
	int a,b,c,d;
	int wa[2];

	for (int i = 0; i < 2; i++) {
		cin >> a >> b >> c >> d;
		wa[i] = a + b + c + d;
	}
	if (wa[0] > wa[1]) {
		cout << wa[0] << endl;
	} else {
		cout << wa[1] << endl;
	}
	return 0;
}

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

int main(){
    int in,ma,sc,en,in2,ma2,sc2,en2;
    cin >> in >> ma >> sc >> en >> in2 >> ma2 >> sc2 >> en2;
    if(in + ma + sc + en > in2 + ma2 + sc2 + en2){
        cout << in + ma + sc + en << endl;
    }
    else{
        cout << in2 + ma2 + sc2 + en2 << endl;
    }
}