import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Sol { static long longestSequence(long[] a) { int n=a.length; long ans=0; for(int i=0;i