现在在本地运行都能通过测试,不知道会不会超时和超内存,有问题可以指出来一起探讨   测试样例:5 2 2  4 2  3 3  5 4  5 3  1 5   输出:18      public static void main(String[] args) { // TODO Auto-generated method stub Scanner sc = new Scanner(System.in); while(sc.hasNext()) { int n = sc.nextInt(); int a = sc.nextInt(); int b = sc.nextInt(); int[][] ...