void Solve(StreamScanner ss, StreamWriter sw) { //--------------------------------- var N = ss.Next(Int); var A1 = ss.Next(Int, N); var A2 = ss.Next(Int, N); var max = 0; for (var i = 0; i < N; i++) { max = Math.Max(max, A1.Take(i + 1).Sum() + A2.Skip(i).Sum()); } sw.WriteLine(max); //--------------------------------- }