description: Alice and Bob are playing a game on a matrix, consisting of 2 rows and m columns. The cell in the i-th row in the j-th column contains a_{i, j} coins in it.
  
  Initially, both Alice and Bob are standing in a cell (1, 1). They are going to perform a sequence of moves to reach a cell (2, m).
  
  The possible moves are: 
  
    * Move right — from some cell (x, y) to (x, y + 1); 
    * Move down — from some cell (x, y) to (x + 1, y). 
  
  
  
  First, Alice makes all her moves until she reaches (2, m). She collects the coins in all cells she visit (including the starting cell).
  
  When Alice finishes, Bob starts his journey. He also performs the moves to reach (2, m) and collects the coins in all cells that he visited, but Alice didn't.
  
  The score of the game is the total number of coins Bob collects.
  
  Alice wants to minimize the score. Bob wants to maximize the score. What will the score of the game be if both players play optimally?
  
  Input
  
  The first line contains a single integer t (1 ≤ t ≤ 10^4) — the number of testcases.
  
  Then the descriptions of t testcases follow.
  
  The first line of the testcase contains a single integer m (1 ≤ m ≤ 10^5) — the number of columns of the matrix.
  
  The i-th of the next 2 lines contain m integers a_{i,1}, a_{i,2}, ..., a_{i,m} (1 ≤ a_{i,j} ≤ 10^4) — the number of coins in the cell in the i-th row in the j-th column of the matrix.
  
  The sum of m over all testcases doesn't exceed 10^5.
  
  Output
  
  For each testcase print a single integer — the score of the game if both players play optimally.
  
  Example
  
  Input
  
  
  3
  3
  1 3 7
  3 5 1
  3
  1 3 9
  3 5 1
  1
  4
  7
  
  
  Output
  
  
  7
  8
  0
  
  Note
  
  The paths for the testcases are shown on the following pictures. Alice's path is depicted in red and Bob's path is depicted in blue.
  
  <image>
solution: import java.util.*;import java.io.*;import java.math.*;
  public class CF1555C
  {
      static boolean memory = true;
      static long mod = 998244353;
      static long MOD = 1000000007; 
      
      static void ruffleSort(int[] a) {
          int n = a.length;
          ArrayList<Integer> lst = new ArrayList<>();
          for(int i : a)
              lst.add(i);
          Collections.sort(lst);
          for(int i = 0; i < n; i++)
              a[i] = lst.get(i);
      }
  
      static void ruffleSort(long[] a) {
          int n = a.length; 
          ArrayList<Long> lst = new ArrayList<>();
          for(long i : a)
              lst.add(i);
          Collections.sort(lst);
          for(int i = 0; i < n; i++)
              a[i] = lst.get(i);
      }
  
      public static void process()throws IOException
      {
          int n = ni();
          int[][] a = new int[2][n];
          for(int i = 0; i < 2; i++)
              a[i] = nai(n);
          int[][] sum = new int[2][n+1];
          for(int i = 0; i < 2; i++){
              for(int j = 1; j <= n; j++)
                  sum[i][j] = sum[i][j-1] + a[i][j-1];
          }
          int ans = Integer.MAX_VALUE;
          for(int i = 1; i <= n; i++)
              ans = Math.min(ans, Math.max(sum[1][i-1], (sum[0][n]-sum[0][i])));
          pn(ans);
      }
     
      static AnotherReader sc;
      static PrintWriter out;
  
      public static void main(String[] args) throws Exception{
          if(memory)new Thread(null, new Runnable() {public void run(){try{new CF1555C().run();}catch(Exception e){e.printStackTrace();System.exit(1);}}}, "1", 1 << 32).start();
          else new CF1555C().run();
      }
  
      void run()throws Exception
      {
          boolean oj = System.getProperty("ONLINE_JUDGE") != null;
          if(oj){sc=new AnotherReader();out=new PrintWriter(System.out);}
          else{sc=new AnotherReader(100);out=new PrintWriter("output.txt");}
          long s = System.currentTimeMillis();
          int t=1;
          t=ni();
          //int k = t;
          while(t-->0) {/*p("Case #"+ (k-t) + ": ")*/;process();}
          out.flush();
          System.err.println(System.currentTimeMillis()-s+"ms");
          out.close();
      }
  
      static long power(long k, long c, long mod){
          long y = 1;
          while(c > 0){
              if(c%2 == 1)
                  y = y * k % mod;
              c = c/2;
              k = k * k % mod;
          }
          return y;
      }
  
      static int power(int x, int y, int p){ 
          int res = 1;
          x = x % p;
          while (y > 0) {
              if (y % 2 == 1)
                  res = (res * x) % p;
              y = y >> 1;
              x = (x * x) % p;
          }
          return res;
      }
  
      static int log2(int N)
      {
          int result = (int)(Math.log(N) / Math.log(2));
          return result;
      }
  
   
      static void pn(Object o){out.println(o);}
      static void pn(int[] a){for(int i : a)out.print(i+" ");pn("");}
      static void pn(long[] a){for(long i : a)out.print(i+" ");pn("");}
      static void p(Object o){out.print(o);}
      static void YES(){out.println("YES");}
      static void NO(){out.println("NO");}
      static void yes(){out.println("yes");}
      static void no(){out.println("no");}
      static void p(int[] a){for(int i : a)out.print(i+" ");}
      static void p(long[] a){for(long i : a)out.print(i+" ");}
      static void pni(Object o){out.println(o);out.flush();}
      static int ni()throws IOException{return sc.nextInt();}
      static long nl()throws IOException{return sc.nextLong();}
      static double nd()throws IOException{return sc.nextDouble();}
      static String nln()throws IOException{return sc.nextLine();}
      static String ns()throws IOException{return sc.next();}
      static int[] nai(int N)throws IOException{int[]A=new int[N];for(int i=0;i!=N;i++){A[i]=ni();}return A;}
      static long[] nal(int N)throws IOException{long[]A=new long[N];for(int i=0;i!=N;i++){A[i]=nl();}return A;}
      static long gcd(long a, long b)throws IOException{return (b==0)?a:gcd(b,a%b);}
      static int gcd(int a, int b)throws IOException{return (b==0)?a:gcd(b,a%b);}
      static int bit(long n)throws IOException{return (n==0)?0:(1+bit(n&(n-1)));}
      
  /////////////////////////////////////////////////////////////////////////////////////////////////////////
   
      static class AnotherReader{BufferedReader br; StringTokenizer st;
      AnotherReader()throws FileNotFoundException{
      br=new BufferedReader(new InputStreamReader(System.in));}
      AnotherReader(int a)throws FileNotFoundException{
      br = new BufferedReader(new FileReader("input.txt"));}
      String next()throws IOException{
      while (st == null || !st.hasMoreElements()) {try{
      st = new StringTokenizer(br.readLine());}
      catch (IOException  e){ e.printStackTrace(); }}
      return st.nextToken(); } int nextInt() throws IOException{
      return Integer.parseInt(next());}
      long nextLong() throws IOException
      {return Long.parseLong(next());}
      double nextDouble()throws IOException { return Double.parseDouble(next()); }
      String nextLine() throws IOException{ String str = ""; try{
      str = br.readLine();} catch (IOException e){
      e.printStackTrace();} return str;}}
  
  /////////////////////////////////////////////////////////////////////////////////////////////////////////////
  }