public class JingDong { public static void main(String[] args) { Scanner sc=new Scanner(System.in); int num=sc.nextInt(); long[] nums=new long[num]; for(int i=0;i<num;i++) { nums[i]=sc.nextLong(); } int res=0; long[] m=new long[num]; m[num-1]=nums[num-1]; for(int i=num-2;i&g...