//如果每次循环都用一次Collections.max(intArr.subList(i,N))的话, //时间复杂度是N**2,但是, //如果提前先用反向循环设计一个最大值数组,时间复杂度就是N //即,intArr数组的最后一位肯定是这个(N,N)里最大的,所以从右往左推,用Math.max判断,maxArr每个切片的最大值 import java.util.*; import java.io.*; public class Main { public static void main(String[] args) throws IOException{ BufferedReader b...