HDU 4696 Answers (水题)
来源:互联网 发布:程序员的呐喊下载 编辑:程序博客网 时间:2024/05/16 12:14
看题看了好长时间,看懂之后,想了好久。终于yy了一种方法,只考虑是否有1。写了一下,提交a了。
#include <iostream>#include <cmath>#include <cstdio>#include <cstring>#include <algorithm>#include <queue>#include <stack>#include <map>#include <set>#include <list>#include <deque>#include <string>#define LL long long#define DB double#define SI(a) scanf("%d",&a)#define SD(a) scanf("%lf",&a)#define SS(a) scanf("%s",a)#define SF scanf#define PF printf#define MM(a,b) memset(a,b,sizeof(a))#define REP(i,a,b) for(int (i)=(a);(i)<(b);(i)++)#define N 100009#define INF 0x3f3f3f3f#define EPS 1e-8#define bug puts("bug")using namespace std;int visit[N];int main(){ #ifndef ONLINE_JUDGE freopen("in.txt","r",stdin); #endif int n,m,a; while(~SF("%d%d",&n,&m)) { REP(i,0,n) SI(a); int one = 0; REP(i,0,n) { SI(a); if(a==1) one = 1; } REP(i,0,m) { SI(a); if(a<=0||(one==0&&(a&1))) { puts("NO"); }else { puts("YES"); } } } return 0;}
- HDU 4696 Answers (水题)
- hdu 4696 Answers(规律)
- 多校十 Hdu 4696 Answers
- hdu 4696Answers
- hdu 4696 Answers
- hdu 4696 Answers 多校第十场
- 2013 多校第九场 hdu 4696 Answers(纯YY )
- hdu Questions and answers
- hdu 4696 Answers/杭电2013年多校第十场 循环
- HDOJ 4696 Answers 乱搞
- HDU 3038 How Many Answers Are Wrong (并查集)(需复习!)
- HDU 3038 how many answers are wrong(带权并查集)
- HDU 3038 How Many Answers Are Wrong (带权并查集+区间判断)
- hdu 3038 How Many Answers Are Wrong(并查集)
- HDU - 3038 How Many Answers Are Wrong (带权并查集)
- HDU 3038 How Many Answers Are Wrong(带权并查集)
- 【HDU】How Many Answers Are Wrong(带权并查集)
- HDU 3038 How Many Answers Are Wrong (并查集)
- Nginx 快速安装手册及如何修改端口号
- silverlight自定义初始化参数
- ABAP屏幕开发 - TABLE CONTROL隐藏列和固定列的实现
- Microsoft Visual Studio 2003 2005 2008 2010 2012 下载
- svn 桌面?号 解决方法
- HDU 4696 Answers (水题)
- VS 2010 制作 Windows Service 安装包
- iOS控件的Sent Events的含义
- Python排序算法-选择排序
- 【屌丝学习笔记】第四天 JAVA基础
- HDU 4038 Stone (模拟 快速幂)
- android ScrollView 下嵌ListView完美实现
- 循环单向链表
- 海量数据随机抽样问题(蓄水池问题)