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 S,T,ST,a,b,c,d,e,f,g,h;
	scanf("%d %d %d %d",&a,&b,&c,&d);
	scanf("%d %d %d %d",&e,&f,&g,&h);
	S=a+b+c+d;
	T=e+f+g+h;
	if(S<T){
		printf("%d\n",T);
	}
	else{
		printf("%d\n",S);
	}
	if(S==T){
		printf("S=T\n");
	}
	return 0;
}

C++: #include <stdio.h>

#define A_N (2)

int a_max(int a[])
{
	int max;
	int i;
	
	max = a[0];
	for (i = 1; i < A_N; i++){
		if (max < a[i]){
			max = a[i];
		}
	}
	
	return (max);
}

int main(void)
{
	int x;
	int s[2];
	int i, j;
	
	for (i = 0; i < A_N; i++){
		s[i] = 0;
		for (j = 0; j < 4; j++){
			scanf("%d", &x);
			s[i] += x;
		}
	}
	
	printf("%d\n", a_max(s));
	
	return (0);
}

C++: #include <iostream>
#include <algorithm>
using namespace std;
int main () {
         int ans;
         int a,b;
         int S=0,T=0;
         for(int i=0;i<4;i++){
                 cin>>a;
                  S+=a;
          }
         for(int j==0;j<4;j++){
                   cin>>b;
                   T+=b;
          }
          ans=max(S,T);
           cout<<ans<<endl;
           return 0;
}

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

int main()
{
	int a,b,s=0,t=0;
	for(int i=1; i<=4; i++){
		cin>>a;
		s+=a;
		}
	for(int i=1; i<=4; i++){
		cin>>b;
		t+=b;
		}
	if(s>=t)
		cout<<s;
	else
		cout<<t;
	return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <cassert>
#include <cctype>
#include <cstdio>
#include <math.h>
#include <map>
#include <queue>
#include <string>
#include <vector>
using namespace std;

int a,b,c,d,e,f,g,h;

int main(){
	cin>>a>>b>>c>>d>>e>>f>>g>>h;
	if(a+b+c+d>e+f+g+h)cout<<a+b+c+d<<endl;
	else cout<<e+f+g+h<<endl;
}

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

int main(){
int a,b,c,d,e,f,g,h,S,T;
cin>>a>>b>>c>>d;
cin>>e>>f>>g>>h;
S=a+b+c+d;
T=e+f+g+h;
if(S>=T) cout<<S;
else cout<<T;

return 0;
}

C++: #include<iostream>
using namespace std;
 
int main(){
int a,b,c,d,A,B,C,D,S,T;
cin>>a>>b>>c>>d;
cin>>A>>B>>C>>D;
S=a+b+c+d;
T=A+B+C+D;
if(S>T) cout<<S<<"\n";
else cout<<T<<"\n";
return 0;
}

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

int main {
    int S=0,T=0,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;
}

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

int main()
{
  int s[2][4];
  for (int i = 0; i < 2; i++){
    for (int j = 0; j < 4; j++){
      cin >> s[i][j];
      if (j != 0) s[i][j] += s[i][j - 1];
    }
  }

  cout << max(s[0][3], s[1][3]) << endl;

  return 0;
}

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

using namespace std;

int sum(int x[], int xNum) {
	int result = 0;
	for (int i = 0; i < xNum; i++) {
		result += x[i];
	}
	return result;
}

int main(void){
    int aSum, bSum;
	int a[4], b[4];

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

	aSum = sum(a, sizeof a / sizeof a[0]);
	bSum = sum(b, sizeof b / sizeof b[0]);

	cout << ((aSum >= bSum) ? aSum : bSum) << endl;

    return 0;
}

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

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

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

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

C++: #include <stdio.h>


int main(){

	int a = 0, b = 0,i,buf;

	for (i = 0; 4 > i; i++){
		scanf("%d", &buf);
		a += buf;
	}
	for (i = 0; 4 > i; i++){
		scanf("%d", &buf);
		b += buf;
	}
	printf("%d\n", a > b ? a : b);
return 0;
}

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

using namespace std;

int main()
{
    int a[4], b[4];
    int sa, sb;

    sa = sb = 0;
    for (int i = 0; i < 4; i++)
        cin >> a[i];
    for (int i = 0; i < 4; i++)
        cin >> b[i];
    
    for (int i = 0; i < 4; i++) {
        sa += a[i];
        sb += b[i];
    }
    cout << max(sa, sb) << endl;

    return 0;
}

C++: #define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <algorithm>
using namespace std;

int main(void) {

	int a = 0, b = 0, temp;

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

	printf("%d", max(a, b));

	return 0;
}

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

int point,a,b;

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

  for(int i=0;i<4;i++){
    scanf("%d",&point);  
    b = b + point;
  }

  if(a>b){
    printf("%d\n",a);
  }
  else{
    printf("%d\n",b);
  }
}

C++: #include <iostream>

using namespace std;

int main()
{
	int i, m, s, e, sp;

	cin >> i >> m >> s >> e;
	sp = i + m + s + e;
	cin >> i >> m >> s >> e;
	if (sp > i + m + s + e) cout << sp << endl;
	else cout << i + m + s + e << endl;

	return (0);
}

C++: int main()
{
    int a, b, c, d;
    int sum = 0;
    std::cin >> a >> b >> c >> d;
    sum = a + b + c + d;  
    std::cin >> a >> b >> c >> d;
    if(sum < (a + b + c + d)){
        std::cout << (a + b + c + d)  << std::endl;
    }
    else{
        std::cout << sum << std::endl; 
    }
}

C++: #include <iostream>
using namespace std;
int main(void){
    int ia,ma,sa,ea,ib,mb,sb,eb,S,T;
    cin >> ia >> ma >> sa >> ea >> ib >> mb >> sb >> eb ;
    S=ia+ma+sa+ea;
    T=ib+mb+sb+eb;
    if(S<T){
        cout << T << endl;
    }
    else if(S>=T){
        cout << S << endl;
    }    
    
    
}

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

#define for_(i,a,b) for(int i=a;i<b;++i)

int main() {
	int A = 0, B = 0, a;
	for_(i,0,4) scanf("%d", &a), A += a;
	for_(i,0,4) scanf("%d", &a), B += a;
	printf("%d\n",max(A,B));
	return 0;
}

C++: #include<stdio.h>
int main(void)
{
	int　a1,a2,a3,a4,b1,b2,b3,b4,s,t;
	scanf("%d %d %d %d %d %d %d %d",&a1,&a2,&a3,&a4,&b1,&b2,&b3,&b4);
	s=a1+a2+a3+a4;
	t=b1+b2+b3+b4;
	if(s<=t){
		printf("%d\n",t);
	}
	else if(t<=s){
		printf("%d\n",s);
	}
	return 0;
}

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

C++: // Example program
#include <iostream>
#include <vector>
#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;
 cin >> b;
 cin >> c;
 cin >> d;
 cin >> e;
 cin >> f;
 cin >> g;
 cin >> h;
 
 int  s=(a+b+c+d); 
 int t=(e+f+g+h);

 
 if(s<t){
     cout << "t" << endl;
 }
 if(t<s){
     cout << "s" << endl;
 }
 if(s==t){
     cout << "s" << endl;
 }
}