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 ...
随机推荐
- SG函数值
如果只有单个游戏,只需找必胜态就行,不用找sg函数值,这样节省一个常数的时间. 但是多个游戏时一定要sg函数的异或来判断成败.因为虽然必败态一定到必胜态,但是必胜态不一定到必败态就是最优的.而单个游戏 ...
- hdoj5769后缀自动机版本
网上的题解都是后缀数组,我来个后缀自动机题解. 建好后缀自动机后由于后缀自动机是单向的,那么dfs一遍记录各节点的size,要保证一个节点只经过一次才是O(n),否则是O(n^2).表示这个节点及后面 ...
- Expression的烦恼
var tar = Expression.Label(typeof(int)); var p1=Expression.Parameter(typeof(int), "a"); va ...
- PXE网络启动无人值守自动安装 centos 全程实录
PXE网络启动无人值守自动安装 centos 全程实录 http://shayi1983.blog.51cto.com/4681835/1549854/ 搭建Pxe服务器无人听应答全自动安装CentO ...
- scrapy---反爬虫
反爬虫措施1)动态修改User-Agent2)动态修改ip3)延迟DOWNLOAD_DELAY = 0.5 1)在middleware中新建一个类,从fake_useragent中导入UserAgen ...
- multipath配置详细参考
1.配置文件结构及位置multipath配置文件/etc/multipath.conf由节(section),子节(sub-section),属性(atribute)和属性值(value)等组成,其结 ...
- nisght heap increase
sudo gedit /usr/local/cuda-5.5/libnsight/nsight.ini --launcher.defaultActionopenFile-vm../jre/bin/ja ...
- redis可执行文件说明
redis-server :redis服务器 redis-cli :redis命令客户端 redis-benchmark :redis性能压测工具 redis-check-dump ...
- day08_python_1124
01 昨日内容回顾 文件操作 文件操作的流程: 1,打开文件创建文件句柄. 2,对文件句柄进行操作. 3,关闭文件句柄. 读, r r+ rb r+b read() 全部读取 read(n) 读取一部 ...
- 关于c#连接数据库的代码
using System;using System.Collections.Generic;using System.Data;using System.Data.SQLite;using Syste ...