前四个全是MLE
查看原帖
前四个全是MLE
1065722
hanzunh楼主2023/9/2 14:38
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt(), m = sc.nextInt(), t;

        int[] arr=new int[n];

        for (int i = 0; i < n; i++) {
            arr[i]= sc.nextInt();
        }

        for (int i = 0; i < m; i++) {
            t = sc.nextInt();
            System.out.println(arr[t-1]);
        }
    }
}
2023/9/2 14:38
加载中...