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 javax.swing.*;
  import java.io.BufferedReader;
  import java.io.IOException;
  import java.io.InputStreamReader;
  import java.lang.reflect.Array;
  import java.math.BigInteger;
  import java.security.cert.CollectionCertStoreParameters;
  import java.util.*;
  
  
  
  import static javax.swing.UIManager.get;
  import static javax.swing.UIManager.getString;
  
  
  public class Main {
  
  
      static class Pair implements Comparable<Pair>{
          int x=0;
          int y=0;
          public Pair(int x1,int y1)
          { x=x1;
              y=y1;
          }
  
  
          @Override
          public int compareTo(Pair o) {
              return this.x-o.x;
          }
      }
  
      static boolean checkPallindrome(int n)
      {    ArrayList<Integer> list = new ArrayList<>();
          while(n>0)
          { list.add(n%10);
              n/=10;
          }
          int low=0,high=list.size()-1;
          while(low<=high)
          {     if(list.get(low)!=list.get(high))
              return false;
              low++;
              high--;
          }
          return true;
      }
  
  
      static boolean check(String s)
      {
  
          int low=0,high=s.length()-1;
          while(low<=high)
          {     if(s.charAt(low)!=s.charAt(high))
              return false;
              low++;
              high--;
          }
          return true;
      }
  
      static  int min=Integer.MAX_VALUE;
      public static void main(String[] args) throws IOException {
          FastReader sc = new FastReader();
  //(1)very very important**(never take the first problem for granted, always check the test cases) take 5 minutes more and check the edge cases
          // 5 minutes will not decreases rating as much as a wrong submission does it is easy u just think with an open mind and u will surely get the answer
          //(2)let ur brain consume the problem don't just jump to the solution. after reading the problem take a pause 1 minute
          //(3)go through the example test cases and also at least two of ur own test cases.Think of testcases which are difficult(edge cases).dry run ur concept
  
          int t = sc.nextInt();
          while (t-- > 0) {
  
            int m =sc.nextInt();
            int[][] a = new int[2][m];
            for(int i=0;i<m;i++)
                a[0][i]=sc.nextInt();
  
              for(int i=0;i<m;i++)
                  a[1][i]=sc.nextInt();
  
              int[] pre1 = new int[m];
              pre1[0]=a[0][0];
              for(int i=1;i<m;i++)
              pre1[i]=pre1[i-1]+a[0][i];
  
              int[] pre2 = new int[m];
              pre2[0]=a[1][0];
              for(int i=1;i<m;i++)
                  pre2[i]=pre2[i-1]+a[1][i];
  
              int[] suf1 = new int[m];
              suf1[m-1]= a[0][m-1];
              for(int i=m-2;i>=0;i--)
                  suf1[i]=suf1[i+1]+a[0][i];
  
              int[] suf2 = new int[m];
              suf2[m-1]= a[1][m-1];
              for(int i=m-2;i>=0;i--)
                  suf2[i]=suf2[i+1]+a[1][i];
  
  
              int min=Integer.MAX_VALUE,max=0;
  
              for(int i=0;i<m;i++)
              {  if(i==0)
              {  if(i<m-1)
                  max=suf1[i+1];
                  else max=0;
              }
              else if(i==m-1)
              {  if(i>0)
                   max=pre2[i-1];
                  else max=0;
              }
              else
                  max = Math.max(pre2[i - 1], suf1[i + 1]);
                  min = Math.min(min, max);
  
              }
  
  
              System.out.println(min);
  
          }
  
  
      }
  
  
  
  
  
  
  //Things to check when u r getting wrong answer
  // syntax of conditional operator y=(x==1)?1:0;
  // 1-  check the flow of the code
  //2- If ur stuck read the problem once again
  //3- before submitting always check the output format of ur code
  //4- don't check standings until problem B is done
  //5- if u r thinking ur concept is correct but still u r getting wrong answer try to implement it in another way
  //6- By default, java interpret all numeral literals as 32-bit integer values.
  // If you want to explicitely specify that this is something bigger then 32-bit integer you should use suffix L for long values.    example   long a = 600851475143L
  
  //All the functions
  
  
  
      static void debug(String s)
      { System.out.println(s);
  
      }
  
      //collections.sort use merge sort instead of quick sort but arrays.sort use quicksort whose worst time complexity is O(n^2)
      static int[] sort(int[] a)
      {         ArrayList<Integer> list = new ArrayList<>();
          for(int i=0;i<a.length;i++)
              list.add(a[i]);
  
          Collections.sort(list);
          int ind=0;
          for(int x:list)
              a[ind++]=x;
          return a;
  
      }
  
      //function to print an array for debugging
      static void print(int[] a) {
          for (int i = 0; i < a.length; i++)
              System.out.print(a[i] + " ");
          System.out.println();
      }
  
      static void printc(char[] a) {
          for (int i = 0; i < a.length; i++)
              System.out.print(a[i] + " ");
          System.out.println();
      }
  
  
      //normal gcd function, always put the greater number as a and the smaller number as b
      static int gcd(int a, int b) {
          if (b == 0)
              return a;
          return gcd(b, a % b);
  
      }
  
      static int lcm(int a,int b)
      {
          return (a*b)/gcd(a,b);
      }
  
  
      //to find gcd and lcm for numbers of long data type
      static long gcdl(long a, long b) {
          if (b == 0)
              return a;
          return gcdl(b, a % b);
  
      }
  
      static long lcml(long a,long b)
      {
          return (a*b)/gcdl(a,b);
      }
  
  
      //Input Reader to read faster input
      static class FastReader {
          BufferedReader br;
          StringTokenizer st;
  
          public FastReader() {
              br = new BufferedReader(new
                      InputStreamReader(System.in));
          }
  
          String next() {
              while (st == null || !st.hasMoreElements()) {
                  try {
                      st = new StringTokenizer(br.readLine());
                  } catch (IOException e) {
                      e.printStackTrace();
                  }
              }
              return st.nextToken();
          }
  
          int nextInt() {
              return Integer.parseInt(next());
          }
  
          long nextLong() {
              return Long.parseLong(next());
          }
  
          double nextDouble() {
              return Double.parseDouble(next());
          }
  
          String nextLine() {
              String str = "";
              try {
                  str = br.readLine();
              } catch (IOException e) {
                  e.printStackTrace();
              }
              return str;
          }
  
  
          int[] readArray(int n)
          {  int[] a = new int[n];
              for(int i=0;i<n;i++)
                  a[i]=nextInt();
  
              return a;
          }
      }
  
  
  
  }
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  