Language: C++

//writen by @libra9z
//please don't hack me ! if you do this , please leave a message to me ! I'm looking forward to hearing from you !
//#define LOCAL_TIME
#define __USE_FAST_
#pragma comment(linker, "/stack:20000000")
#pragma warning(disable:4146)
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#define _CRT_SECURE_NO_WARNINGS
#include <assert.h>
#include <ctype.h>
#include <errno.h>
#include <float.h>
#include <limits.h>
#include <locale.h>
#include <math.h>
#include <setjmp.h>
#include <signal.h>
#include <stdarg.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <complex.h>
#include <fenv.h>
#include <inttypes.h>
#include <stdalign.h>
#include <stdbool.h>
#include <stdint.h>
#include <tgmath.h>
#include <wchar.h>
#include <wctype.h>
#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <string>
#include <typeinfo>
#include <valarray>
#include <vector>
#include <array>
#include <atomic>
#include <chrono>
#include <condition_variable>
#include <forward_list>
#include <future>
#include <mutex>
#include <random>
#include <ratio>
#include <regex>
#include <scoped_allocator>
#include <system_error>
#include <thread>
#include <tuple>
#include <typeindex>
#include <unordered_map>
#include <unordered_set>
using namespace std;
unsigned long long rdtsc(){unsigned long long ret=0;asm volatile("rdtsc" : "=A" (ret) : :);return ret;}
typedef char i8;typedef unsigned char u8;
typedef short i16;
typedef unsigned short u16;
typedef int i32;
typedef unsigned int u32;
typedef long i32p;
typedef unsigned long u32p;
typedef long long i64;
typedef unsigned long long u64;
typedef long long ll;
typedef unsigned long long ull;
#ifdef __USE_FAST_
namespace libra9z
{
	namespace fastio
	{
		template<int __R=10>
		class mystream {
			protected:
				int precision=6;
				inline int readChar(){int c=getchar();while(c!=-1&&c<=32)c=getchar();return c;}
				template<class T=unsigned int>inline T readUInt()
				{int c=readChar();T x=0;while('0'<=c&&c<='9')x=x*__R+c-'0',c=getchar();return x;}
				template<class T=int>inline T readInt(){int s=1,c=readChar();T x=0;if(c=='-')s=-1,c=getchar();
				while('0'<=c&&c<='9')x=x*__R+c-'0',c=getchar();return s==1?x:-x;}
				template<class T=double>inline T readDouble()
				{int s=1,c=readChar();T x=0;if(c=='-')s=-1,c=getchar();while('0'<=c&&c<='9')
				x=x*__R+c-'0',c=getchar();if(c=='.'){c=getchar();long double coef=0.1f;while('0'<=c&&c<='9')
				{x+=(c-'0')*(coef);coef*=0.1f;c=getchar();}
				}return s==1?x:-x;
				}
				inline void readWord(char *s){int c=readChar();while(c>32)*s++=(char)c,c=getchar();*s=0;}
				inline bool readLine(char *s,char cc='\n')
				{int c=getchar();while(c!=cc&&c!=-1)*s++=(char)c,c=getchar();*s=0;return c!=-1;}
				inline string readstring(){char s[1000005];readWord(s);return string(s);}
				inline string readLinestring(char cc='\n'){char s[1000005];readLine(s,cc);return string(s);}
				template<class T=int>inline void writeInt(T x,int output_len=-1)
				{if(x<0)putchar('-'),x=-x;char s[24];int n=0;
				while(x||!n)s[n++]='0'+x%__R,x/=__R;while(n<output_len)s[n++]='0';while(n--)putchar(s[n]);}
				template<class T=unsigned int>inline void writeUInt(T x,int output_len=-1)
				{char s[24];int n=0;while(x||!n)
				s[n++]=(char)('0'+(char)(x%__R)),x/=__R;while(n<output_len)s[n++]='0';while(n--)putchar(s[n]);}
				inline void writeWord(const char *s){while(*s)putchar(*s++);}
				template<class T=double>inline void writeDouble(T x,int output_len=-1)
				{if(x<0)putchar('-'),x=-x;int t=(int)x;writeUInt(t),x-=t;putchar('.');
				for(int i=output_len-1;i>0;i--)
				{x*=__R;t=__min(9,(int)x);putchar('0'+t),x-=t;}x*=__R;t=__min(9,(int)(x+0.5));putchar('0'+t);
				}
				inline void writestring(const string &x){writeWord(x.c_str());}
			public:
				mystream() { }
				mystream& setprecision(int __precision){precision=__precision;return *this;}
				mystream&operator>>(int &x){x=readInt<int>();return *this;}
				mystream&operator>>(long long &x){x=readInt<long long>();return *this;}
				mystream&operator>>(unsigned &x){x=readUInt<unsigned>();return *this;}
				mystream&operator>>(unsigned long long &x){x=readUInt<unsigned long long>();return *this;}
				mystream&operator>>(float &x){x=readDouble<float>();return *this;}
				mystream&operator>>(double &x){x=readDouble<double>();return *this;}
				mystream&operator>>(long double &x){x=readDouble<long double>();return *this;}
				mystream&operator>>(char &x){x=readChar();return *this;}
				mystream&operator>>(char *x){readWord(x);return *this;}
				mystream&operator>>(string &x){x=readstring();return *this;}
				mystream&operator<<(const int &x){writeInt<int>(x,-1);return *this;}
				mystream&operator<<(const long long &x){writeInt<long long>(x,-1);return *this;}
				mystream&operator<<(const unsigned &x){writeUInt<unsigned>(x,-1);return *this;}
				mystream&operator<<(const unsigned long long &x)
				{writeUInt<unsigned long long>(x,-1);return *this;}
				mystream&operator<<(const float &x){writeDouble<float>(x,precision);return *this;}
				mystream&operator<<(const double &x){writeDouble<double>(x,precision);return *this;}
				mystream&operator<<(const long double &x)
				{writeDouble<long double>(x,precision);return *this;}
				mystream&operator<<(const char &x){putchar(x);return *this;}
				mystream&operator<<(char *x){writeWord(x);return *this;}
				mystream&operator<<(const string &x){writestring(x);return *this;}
				template<typename T>mystream&operator>>(vector<T> &x){if(x.size())input(x.begin(),x.end());
				else{string st;readline(st);stringstream ss(st);int k;while(ss>>k)x.push_back(k);}return *this;
				}
				template<typename T>mystream&operator<<(const vector<T> &x){return print(x.begin(),x.end());}
				mystream&readline(string &s,char cc='\n'){s=readLinestring(cc);return *this;}
				mystream&readline(char *s,char cc='\n'){readLine(s,cc);return *this;}
				template<typename T>mystream&readarr(T a[],int x,int y){return input(a+x,a+y);}
				template<typename T>mystream&writearr(T a[],int x,int y){return print(a+x,a+y);}
				template<typename _I>
				mystream&input(_I a,_I b){do{operator>>(*a);a++;}while(a<b);return *this;}
				template<typename _I>
				mystream&print(_I a,_I b,char c=' '){do{operator<<(*a);operator<<(c);a++;}while(a<b);return *this;}
		};
		const char endl='\n';
		template<int __R=10>
		class myfstream : public mystream<__R> {
			public:
				myfstream() { }
				void openinfile(const string &s) {freopen(s.c_str(),"r",stdin);}
				void openinfile(char *s) {freopen(s,"r",stdin);}
				void openoutfile(const string &s) {freopen(s.c_str(),"w",stdout);}
				void openoutfile(char *s) {freopen(s,"w",stdout);}
		};
	}
	fastio::mystream<10> iostr=fastio::mystream<10>();
	fastio::myfstream<10> fiostr=fastio::myfstream<10>();
	namespace number_theory
	{
		template<class T>inline void normod(T &x,T m){x%=m;while(x<0)x+=m;}
		template<class T>inline void addmod(T &x,T y,T m){x+=y;x%=m;while(x<0)x+=m;}
		template<class T>inline T mulmod(T x,T n,T m){return static_cast<T>(x)*n%m;}
		template<class T>inline T powmod(T x,T n,T m)
		{T r=1;normod(x,m);while(n){if(n&1)r*=x;x*=x;r%=m;x%=m;n/=2;}return r;}
		template<class T>inline bool isprime(const T &x){if(x==1) return false;if(x==2) return true;
		for(T i=2;i*i<=x;++i)if(x%i==0) return false;return true;}
		template<class T>T gcd(T m,T n){while(n!=0){T t=m%n;m=n;n=t;}return m;}
		template<class T>T lcm(const T &x,const T &y){return x/gcd(x,y)*y;}
	}
	namespace others
	{
		template<class T,class F>inline T lowerbound(T x,T y,F cp,bool p=false)
		{T ans=-1;while(x<=y){T m=x+y>>1;if(cp(m)){ans=m;if(!p)x=m+1;else y=m-1;}else
		{if(!p)y=m-1;else x=m+1;}}return ans;}
		template<class T,class E>T Themost(T a[],int l,int r,E x){int m=(l+r)/2;if(l==r-1){return a[l];}
		else{int u=Themost(a,l,m,x);int v=Themost(a,m,r,x);return x(u,v);}}
		template<class T,class E>T Themost(vector<T> a,int l,int r,E x){int m=(l+r)/2;if(l==r-1){return a[l];}
		else{int u=Themost(a,l,m,x);int v=Themost(a,m,r,x);return x(u,v);}}
		template<class T>T max(T a[],int x,int y)
		{return Themost(a,x,y,[](const T &x,const T &y){return max(x,y);});}
		template<class T>T min(T a[],int x,int y)
		{return Themost(a,x,y,[](const T &x,const T &y){return min(x,y);});}
		template<class T>T max(vector<T> v)
		{return Themost(v,0,v.size(),[](const T &x,const T &y){return max(x,y);});}
		template<class T>T min(vector<T> v)
		{return Themost(v,0,v.size(),[](const T &x,const T &y){return min(x,y);});}
		template<class T=int>T Rand(T l=0,T r=(T)numeric_limits<T>::max()){static mt19937 gen;
		uniform_int_distribution<T> dist(l,r);return dist(gen);}
	}
}
using namespace libra9z;
#endif
#define lowbit(n) ((n)&(-(n)))
#define setbit(n, b) ((n)|((n)>>1<<(b)))
#define removebit(n, b) ((n)&~((n)>>1<<(b)))
#define flipbit(n, b) ((n)^((n)>>1<<(b)))
#define checkbit(n,b) (((n)>>(b))&1)
#define rep(i,n) for (int i=0;i<(n);i++)
#define Rep(i,a,b) for (int i=(a);i<=(b);i++)
#define rrep(i,n) for (int i=(n)-1;i>=0;i--)
#define rRep(i,a,b) for (int i=(a);i>=b;i--)
#define repit(it,a) for (__typeof(a.begin()) it=a.begin();it!=a.end();++it)
#define X first
#define Y second
#define eprintf(...) fprintf(stderr, __VA_ARGS__),fflush(stderr)
#define all(a) (a).begin(),(a).end()
#define reunique(v) v.erase(unique(all(v)),v.end())
#define prl cerr << "called: " << __LINE__ << endl
#define eaq(n,x) __typeof(x) n=x;
#define RET(p,x) return p<<x<<endl,0;
#define Error(p,x) p<<x<<endl;__builtin_abort();
#define Debug(x) cerr<<#x<<" = "<<x<<endl
#define Debug22(x,y) cerr<<#x<<" = "<<x<<" , "<<#y<<" = "<<y<<endl
#define Debug2(x, y) cerr<<"("<<#x<<", "<<#y<<") = ("<<x<<", "<<y<<")\n"
#define Debug_arr(v,n) for(int i=0;i<n;++i) cerr<<#v<<"["<<i<<"]"<<" = "<<v[i]<<endl
const bool multitests=false,alotoftests=false;
const int inf=1e9,ninf=-1e9;
const long long infl=1e18,ninfl=-1e18;
const long long h1=239017,h2=731604233;
const long long mod=1000000007,mod2=1000000009;
const int dx[]={1,0,-1,0,1,0,-1,0},dy[]={0,1,0,-1,1,0,-1,0};
const double pi=3.1415926535897932384626f;
ifstream fin("Youareabiginfilesb.txt");ofstream fout("Youareabigoutfilesb.txt");stringstream sinout;
//****************↓↓↓↓↓****************THE*HACHERS*PLEASE*BEGIN*HACK*AT*THIS*LINE****************************
int n;
int a[2][105],dp[2][105];
bool solve(const int &__test)
{
	iostr>>n;
	rep(k,2)rep(i,n)
	{
		iostr>>a[k][i];
	}
	dp[0][0]=a[0][0];
	Rep(i,1,n-1)
	{
		dp[0][i]=dp[0][i-1]+a[0][i];
	}
	dp[1][0]=dp[0][0]+a[1][0];
	Rep(i,1,n-1)
	{
		dp[1][i]=max(dp[0][i],dp[1][i-1])+a[1][i];
	}
	iostr<<dp[1][n-1];
	return false;
}
//****************↑↑↑↑↑****************THE*HACHERS*PLEASE*END*HACK*AT*THIS*LINE******************************
signed main()
{
	rdtsc();ios_base::sync_with_stdio(0);cin.tie();cout.tie();
	int __tests,__test=1;
	(multitests==true)?((alotoftests==false)?__builtin_scanf("%d",&__tests):__tests=inf):__tests=1;
	for (;(alotoftests==true && multitests==true)?(!solve(__test)):(__test<=__tests);++__test)
		if (!(multitests==true && alotoftests==true)) solve(__test);
	#ifdef LOCAL_TIME
	cerr<<"\n\nSystem Time : "<<(double)clock()*1.0/1000<<" seconds.\n";
	#endif
	fin.close();fout.close();
	return 0;
}

Compiler output:
a.cc: In member function 'void libra9z::fastio::mystream<__R>::writeDouble(T, int)':
a.cc:122:43: error: there are no arguments to '__min' that depend on a template parameter, so a declaration of '__min' must be available [-fpermissive]
  122 |                                 {x*=__R;t=__min(9,(int)x);putchar('0'+t),x-=t;}x*=__R;t=__min(9,(int)(x+0.5));putchar('0'+t);
      |                                           ^~~~~
a.cc:122:43: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
a.cc:122:89: error: there are no arguments to '__min' that depend on a template parameter, so a declaration of '__min' must be available [-fpermissive]
  122 |                                 {x*=__R;t=__min(9,(int)x);putchar('0'+t),x-=t;}x*=__R;t=__min(9,(int)(x+0.5));putchar('0'+t);
      |                                                                                         ^~~~~