import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { static long longestSequence(long[] a,int n) { long sum1=0; long res=0; long[] sum = new long[n]; int i; for(i=0;i