| 50 | } |
| 51 | |
| 52 | public static void main(String[] args) throws IOException { |
| 53 | BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); |
| 54 | StreamTokenizer in = new StreamTokenizer(br); |
| 55 | PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out)); |
| 56 | in.nextToken(); |
| 57 | n = (int) in.nval; |
| 58 | in.nextToken(); |
| 59 | k = (int) in.nval; |
| 60 | for (int i = 1; i <= n; i++) { |
| 61 | in.nextToken(); |
| 62 | arr[i] = (int) in.nval; |
| 63 | } |
| 64 | out.println(compute()); |
| 65 | out.flush(); |
| 66 | out.close(); |
| 67 | br.close(); |
| 68 | } |
| 69 | |
| 70 | public static int compute() { |
| 71 | // 注意这里第二层for循环,j一定是从k~0的枚举 |