3.2-1937 Problem D
#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的更多相关文章
- 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 ...
- HDU 1937 F - Finding Seats 枚举
F - Finding Seats Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u S ...
- 1199 Problem B: 大小关系
求有限集传递闭包的 Floyd Warshall 算法(矩阵实现) 其实就三重循环.zzuoj 1199 题 链接 http://acm.zzu.edu.cn:8000/problem.php?id= ...
- 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 ...
- C - NP-Hard Problem(二分图判定-染色法)
C - NP-Hard Problem Crawling in process... Crawling failed Time Limit:2000MS Memory Limit:262144 ...
- Time Consume Problem
I joined the NodeJS online Course three weeks ago, but now I'm late about 2 weeks. I pay the codesch ...
- Programming Contest Problem Types
Programming Contest Problem Types Hal Burch conducted an analysis over spring break of 1999 and ...
- hdu1032 Train Problem II (卡特兰数)
题意: 给你一个数n,表示有n辆火车,编号从1到n,入站,问你有多少种出站的可能. (题于文末) 知识点: ps:百度百科的卡特兰数讲的不错,注意看其参考的博客. 卡特兰数(Catalan):前 ...
- BZOJ2301: [HAOI2011]Problem b[莫比乌斯反演 容斥原理]【学习笔记】
2301: [HAOI2011]Problem b Time Limit: 50 Sec Memory Limit: 256 MBSubmit: 4032 Solved: 1817[Submit] ...
- [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 ...
随机推荐
- swagger2的接口文档
以前见过一个swagger2的接口文档,特别好用,好看,对接口中入参描述的很详细:适合用于项目的开发 后来自己做项目的时候,没有找到这个swagger版本 <dependency> < ...
- [原][译][jsbsim]空气动力学模型库讨论JSBSim对比YASim
英文原文:JSBSim_vs_YASim 准确性和现实性飞行动力学模型的准确性和真实性是针对YASim的争论中提出的两个共同点.实际上,如果你给YASim或JSBSim垃圾参数,它们都将返回垃圾空气动 ...
- php格式化json字符串
header('content-type:application/json;charset=utf8'); $arr = array( 'status' => true, 'errMsg' =& ...
- babel-node + Express NodeJS项目搭建指南
1.搭建Node.js环境 从官网下载安装 2.搭建Express环境 express 是 node.js的短精简的Web框架,官网:http://www.expressjs.com.cn/ 安装: ...
- hdoj4871
5 4 21 2 12 3 23 4 34 5 2
- Pycharm:设置Tab键一次性为4个空格
File > Settings > Editor > Code Style > Python
- PAT 1073 Scientific Notation
1073 Scientific Notation (20 分) Scientific notation is the way that scientists easily handle very ...
- zzw_rsync命令中的/的作用
[root@sv0379 rsync]# rsync -vzrtopg --password-file=/usr/local/rsync/rsync.passwd /opt/aspire/prod ...
- ceph Luminous版手动安装零散记录
1.安装必要的依赖包,关防火墙,向/etc/hosts内添加域名等 2.安装ceph 配置yum源 (如果嫌慢,可以配置cachedir=/home/yum/$basearch/$releasever ...
- anguar6中 无法在Element上找到属性 (eg 原DOM的offsetTop)
let aa=this.elementRef.nativeElement.querySelector('.logBox') ;