#include <stdio.h>
const int maxn = ;
int a[maxn] = {};
int b[maxn]= {};
int main(void) {
int n;
while(scanf("%d", &n) != EOF){
for(int i=; i<n; i++){
scanf("%d", a+i);
} int m;
scanf("%d", &m);
int j;
for(int i=; i<m; i++){
scanf("%d", b+i);
for(j=; j<n; j++){
if(a[j] == b[i]) break;
}
if (j==n) printf("NO\n");
else printf("YES\n");
} }
}

3.2-1937 Problem D的更多相关文章

  1. HDU3032 Nim or not Nim?(Lasker’s Nim游戏)

    Nim or not Nim? Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)T ...

  2. HDU 1937 F - Finding Seats 枚举

    F - Finding Seats Time Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64u S ...

  3. 1199 Problem B: 大小关系

    求有限集传递闭包的 Floyd Warshall 算法(矩阵实现) 其实就三重循环.zzuoj 1199 题 链接 http://acm.zzu.edu.cn:8000/problem.php?id= ...

  4. No-args constructor for class X does not exist. Register an InstanceCreator with Gson for this type to fix this problem.

    Gson解析JSON字符串时出现了下面的错误: No-args constructor for class X does not exist. Register an InstanceCreator ...

  5. C - NP-Hard Problem(二分图判定-染色法)

    C - NP-Hard Problem Crawling in process... Crawling failed Time Limit:2000MS     Memory Limit:262144 ...

  6. Time Consume Problem

    I joined the NodeJS online Course three weeks ago, but now I'm late about 2 weeks. I pay the codesch ...

  7. Programming Contest Problem Types

        Programming Contest Problem Types Hal Burch conducted an analysis over spring break of 1999 and ...

  8. hdu1032 Train Problem II (卡特兰数)

    题意: 给你一个数n,表示有n辆火车,编号从1到n,入站,问你有多少种出站的可能.    (题于文末) 知识点: ps:百度百科的卡特兰数讲的不错,注意看其参考的博客. 卡特兰数(Catalan):前 ...

  9. BZOJ2301: [HAOI2011]Problem b[莫比乌斯反演 容斥原理]【学习笔记】

    2301: [HAOI2011]Problem b Time Limit: 50 Sec  Memory Limit: 256 MBSubmit: 4032  Solved: 1817[Submit] ...

  10. [LeetCode] Water and Jug Problem 水罐问题

    You are given two jugs with capacities x and y litres. There is an infinite amount of water supply a ...

随机推荐

  1. Linux ssh下实现免密码登录

    1.Linux 生成密钥 ssh-keygen -t rsa 进入“.ssh”会生成以下几个文件 id_rsa : 生成的私钥文件 id_rsa.pub : 生成的公钥文件 know_hosts : ...

  2. box-sizing 和 dom width

    refer : https://developer.mozilla.org/en-US/docs/Web/API/CSS_Object_Model/Determining_the_dimensions ...

  3. string部分方法

    1.string.lastIndexOf() lastIndexOf 是从string末尾查找,但是返回值仍是首部的位置值. 2.string.replace() 放一个正则匹配会全部替换. 3.st ...

  4. UPX脱壳全程分析(转)

    [文章标题]: UPX脱壳全程分析 [保护方式]: 本地验证 [使用工具]: OllyDBG [作者声明]: 只是感兴趣,没有其他目的.失误之处敬请诸位大侠赐教! ------------------ ...

  5. SAP WDA 自建Portal

    1.新建Package:ZWDA. 2.新建Portal用户表:ZPORTAL_USER 上图中是基于CRM的BP来做的用户表,如果针对其他系统可以使用组织架构里的角色用户... 3.新建用户视图配置 ...

  6. 3、简单了解Angular应用的启动过程

    首先,了解一下目录结构: 然后,简明扼要的说一下应用的启动过程: 1.首先找到main.ts(模块启动入口),main.ts去找到app中的根模块app.module.ts 2.根模块app.modu ...

  7. linux软件管理 RPM命令

    RPM命名规则 httpd -2.2.15-15.el6.centos.1.i686.rpm (包全名) httpd 软件包名 (包名) 2.2.15 软件版本 15 软件发布的次数 el6.cent ...

  8. python 爬虫 记录

    python3 爬虫需要安装:requests,beautifulsoup4,html5lib 带有中文的需要这样写,要不然就会出现乱码 html = response.content.decode( ...

  9. python全栈开发笔记---------数据类型-----集合set

    定义:由不同元素组成的集合,集合中是一组无序排列的可hash值,可以作为字典的key 1.不同元素组成 2.无序 3.集合中元素必须是不可变类型(数字,字符串,元组) 特性:集合的目的是讲不同的值放到 ...

  10. Convert BST to Greater Tree

    Given a Binary Search Tree (BST), convert it to a Greater Tree such that every key of the original B ...