import java.util.ArrayList; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); ArrayList<Integer>arr; while(sc.hasNext()){ int n=sc.nextInt(); if(n==-1)break; arr=new ArrayList<Integer>(); for (int i = 0; i < n; i++) { arr.add(sc.nextInt()); } int k=sc.nextInt(); for (int i = 0; i < k; i++) { if(arr.contains(sc.nextInt())) System.out.println("YES"); else System.out.println("NO"); } System.out.println(); } } }
0.0分
1 人评分
C语言程序设计教程(第三版)课后习题7.3 (C语言代码)浏览:619 |
C语言程序设计教程(第三版)课后习题1.5 (C语言代码)浏览:578 |
输出正反三角形 (C语言代码)浏览:780 |
蛇行矩阵 (C语言代码)浏览:742 |
C语言程序设计教程(第三版)课后习题7.5 (C语言代码)浏览:519 |
C语言程序设计教程(第三版)课后习题1.5 (C语言代码)浏览:526 |
IP判断 (C语言代码)浏览:761 |
C语言程序设计教程(第三版)课后习题1.5 (C语言代码)浏览:460 |
幸运数 (C++代码)浏览:1258 |
1048题解(读入回车问题)浏览:554 |