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(void) {
    int a1, a2, a3, a4, b1, b2, b3, b4, S, T;

    scanf ("%d %d %d %d\n", &a1, &a2, &a3, &a4);    
    scanf ("%d %d %d %d\n", &b1, &b2, &b3, &b4);

    S = a1 + a2 + a3 + a4;
    T = b1 + b2 + b3 + b4;

    if (S > T) {
        printf ("%d\n", S);
    }
    else {
        printf ("%d\n", T);
    }

    return 0;
}

C++: #include<stdio.h>
int main(void)
{

	int a[4],s[4],i,d,f;
	d=0;
	f=0;
	for(i=0;i<4;i++){
	scanf("%d",&a[i]);
	scanf("%d",&s[i]);
	d=d+a[i];
	f=f+s[i];
	}
	if(d<f){
		printf("%d\n",f);
	}
	else{
		printf("%d\n",d);
	}
	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",s);
else		printf("%d",t);
}

C++: #include <stdio.h>

int 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",s);
else		printf("%d",t);
}

C++: #include <iostream>
using namespace std;
int main(void){
    // Your code here!
    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 <iostream>
using namespace std;

int main()
{

	int A = 0, B = 0, point;

	for(int i = 0; i < 2; i++) {
		for(int j = 0; j < 4; j++) {
			cin >> point;
			!i ? A += point : B += point;
		}
	}

	cout << (A > B ? A : B) << endl;

	return 0;

}

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;
	} else if(S<=T){
		cout<<T;
	}
	// your code goes here
	return 0;
}

C++: #include<iostream>
int main() {
  int a[4],b[4];
  std::cin>>a[0]>>a[1]>>a[2]>>a[3];
  std::cin>>b[0]>>b[1]>>b[2]>>b[3];
  int i,j;
  if((i=a[0]+a[1]+a[2]+a[3]) >= (j=b[0]+b[1]+b[2]+b[3])) {
    std::cout<<i;
  }else{
    std::cout<<j<<endl;
  }
}

C++: #include<stdio.h>

int main(){

  int a[4]={0};
  int b[4]={0};
  int suma=0,sumb=0;

  scanf("%d %d %d %d",&a[0],&a[1],&a[2],&a[3]);
  scanf("%d %d %d %d",&b[0],&b[1],&b[2],&b[3]);

  for(int i=0;i<4;i++){
    suma+=a[i];
    sumb+=b[i];
  }

  if(suma<=sumb){
    printf("%d\n",sumb);
  }
  else {
    printf("%d\n",suma);
  }

  return 0;
}

C++: #include <iostream>
#include <fstream>
#include <cmath>  
#include <cstdlib>
#include <ctime>
#include <algorithm>
#include <numeric>
#include <functional>
#include <string> 
#include <vector>
#include <bitset>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <deque>
#include <random>


using namespace std;
using ll = long long;
using ull = unsigned long long;

#define REP(i,n) for(long long i = 0; i < (n); i++)
#define FOR(i, m, n) for(long long i = (m);i < (n); ++i)
#define ALL(obj) (obj).begin(),(obj).end()

template<class T> using V = vector<T>;
template<class T, class U> using P = pair<T, U>;

const ll MOD = (ll)1e9 + 7;
const ll MOD2 = 998244353;
const ll LLINF = (ll)1e18;
const ll INTINF = (ll)1e9;
const long double PI = 3.1415926535897932384626433;

template <class T> void corner(bool flg, T hoge) { if (flg) { cout << hoge << endl; exit(0); } }
template <class T, class U>ostream &operator<<(ostream &o, const map<T, U>&obj) { o << "{"; for (auto &x : obj) o << " {" << x.first << " : " << x.second << "}" << ","; o << " }"; return o; }
template <class T>ostream &operator<<(ostream &o, const set<T>&obj) { o << "{"; for (auto itr = obj.begin(); itr != obj.end(); ++itr) o << (itr != obj.begin() ? ", " : "") << *itr; o << "}"; return o; }
template <class T>ostream &operator<<(ostream &o, const vector<T>&obj) { o << "{"; for (int i = 0; i < (int)obj.size(); ++i)o << (i > 0 ? ", " : "") << obj[i]; o << "}"; return o; }
template <class T, class U>ostream &operator<<(ostream &o, const pair<T, U>&obj) { o << "{" << obj.first << ", " << obj.second << "}"; return o; }
template <template <class tmp>  class T, class U> ostream &operator<<(ostream &o, const T<U> &obj) { o << "{"; for (auto itr = obj.begin(); itr != obj.end(); ++itr)o << (itr != obj.begin() ? ", " : "") << *itr; o << "}"; return o; }
void print(void) { cout << endl; }
template <class Head> void print(Head&& head) { cout << head; print(); }
template <class Head, class... Tail> void print(Head&& head, Tail&&... tail) { cout << head << " "; print(forward<Tail>(tail)...); }
template <class T> void chmax(T& a, const T b) { a = max<T>(a, b); }
template <class T> void chmin(T& a, const T b) { a = min<T>(a, b); }
void YN(bool flg) { cout << ((flg) ? "YES" : "NO") << endl; }
void Yn(bool flg) { cout << ((flg) ? "Yes" : "No") << endl; }
void yn(bool flg) { cout << ((flg) ? "yes" : "no") << endl; }

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 <cstdio>
#include <cstring>
#include <cstdlib>
#include <algorithm>
#include <queue>
#include <utility>
using namespace std;

int main() {
	int A,B,S=0,T=0;
	for(int i=0;i<4;i++) {
		scanf("%d",&A);
		S+=A;
	}
	for(int i=0;i<4;i++) {
		scanf("%d",&B);
		T+=B;
	}
	printf("%d\n",max(A,B));
}

C++: #include <iostream>
using namespace std;
int main(){
  int a ,b ,c ,d ,total[2];
  for( int i=0 ; i<2 ; i++ ){
    cin >> a >> b >> c >> d;
    total[i] = a + b + c + d;
  }

  if( total[0] > total[1] ){
    cout << total[0] << endl;
  }

  else{
    cout << total[1] << endl;
  }

}

C++: 
#include <iostream>
#include <string>
#include <vector>
#include <utility> 
#include <tuple>
#include <algorithm>
#include <map>
#include <math.h>
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>
#include<fstream>
using namespace std;
int main(){
	int a,s=0,t=0;
	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)<<endl;
	
	return 0;
}

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<iostream>
using namespace std;
int main()
{
int a1,b1,c1,d1,a2,b2,c2,d2,T1,T2,T;
cin >> a1 >> b1 >> c1 >> d1;
cin >> a2 >> b2 >> c2 >> d2;
if(a1>100){
        cout << "エラー" << endl;
        return 0;
}
if(b1>100){
        cout << "エラー" << endl;
        return 0;
}
if(c1>100){
        cout << "エラー" << endl;
        return 0;
}
if(d1>100){
        cout << "エラー" << endl;
        return 0;
}
if(a2>100){
        cout << "エラー" << endl;
        return 0;
}
if(b2>100){
        cout << "エラー" << endl;
        return 0;
}
if(c2>100){
        cout << "エラー" << endl;
        return 0;
}
if(d2>100){
        cout << "エラー" << endl;
        return 0;
}

T1=a1+b1+c1+d1;
T2=a2+b2+c2+d2;
if(T1>T2){
        T=T1;
}
if(T2>T1){
        T=T2;
}
if(T1=T2){
        T=T1=T2;
}
cout << T << endl;
return 0;
}