Contest2037 - CSU Monthly 2013 Oct (problem F :ZZY and his little friends)
http://acm.csu.edu.cn/OnlineJudge/problem.php?cid=2037&pid=5
【题解】:
没想通这题暴力可以过。。。。
【code】:
#include<iostream>
#include<stdio.h>
#include<string.h>
using namespace std; int arr[]; int main()
{
int n,m;
while(~scanf("%d%d",&n,&m))
{
int i,j;
for(i=;i<n;i++) scanf("%d",arr+i);
for(i=;i<n;i++)
{
for(j=i+;j<n;j++)
{
if((arr[i]^arr[j])>m)
break;
}
if(j<n) break;
}
if(i<n)
{
puts("YES");
}
else
{
puts("NO");
}
}
return ;
}
Contest2037 - CSU Monthly 2013 Oct (problem F :ZZY and his little friends)的更多相关文章
- Contest2037 - CSU Monthly 2013 Oct (problem B :Scoop water)
http://acm.csu.edu.cn/OnlineJudge/problem.php?cid=2037&pid=1 [题解]:卡特兰数取模 h(n) = h(n-1)*(4*n-2)/( ...
- Contest2037 - CSU Monthly 2013 Oct (problem D :CX and girls)
[题解]: 最短路径问题,保证距离最短的同时,学妹权值最大,哈哈 [code]: #include<iostream> #include<queue> #include< ...
- Contest2037 - CSU Monthly 2013 Oct (problem A :Small change)
[题解]:二进制拆分 任意一个整数都可以拆分成 2^0 + 2^1 + 2^2 + 2^3 + ....+ m [code]: #include <iostream> #include & ...
- Contest2037 - CSU Monthly 2013 Oct (Problem J: Scholarship)
http://acm.csu.edu.cn/OnlineJudge/problem.php?cid=2037&pid=9 [题解]: 这题卡了一下,卡在负数的情况,负数输出 0 这题主要找到一 ...
- Contest2037 - CSU Monthly 2013 Oct(中南大学2013年10月月赛水题部分题解)
Problem A: Small change 题解:http://www.cnblogs.com/crazyapple/p/3349469.html Problem B: Scoop water 题 ...
- ZOJ 4009 And Another Data Structure Problem(ZOJ Monthly, March 2018 Problem F,发现循环节 + 线段树 + 永久标记)
题目链接 ZOJ Monthly, March 2018 Problem F 题意很明确 这个模数很奇妙,在$[0, mod)$的所有数满足任意一个数立方$48$次对$mod$取模之后会回到本身. ...
- The Ninth Hunan Collegiate Programming Contest (2013) Problem F
Problem F Funny Car Racing There is a funny car racing in a city with n junctions and m directed roa ...
- 实验12:Problem F: 求平均年龄
Home Web Board ProblemSet Standing Status Statistics Problem F: 求平均年龄 Problem F: 求平均年龄 Time Limit: ...
- Codeforces Gym 100500F Problem F. Door Lock 二分
Problem F. Door LockTime Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/gym/100500/at ...
随机推荐
- Nginx+FastCGI+C
http://flandycheng.blog.51cto.com/855176/858946 http://www.cnblogs.com/xiaouisme/archive/2012/08/01/ ...
- [Yii2]Unable to verify your data submission(你提交的资料无法被验证)
Yii2中,使用form提交数据,会提示: [yii\web\HttpException:400] exception 'yii\web\BadRequestHttpException' with m ...
- html accesskey (단축키 지정)
accesskey 속성은 마우스 등을 쓰지 않는 환경을 위해 링크나 입력 폼에서 키보드의 키 입력만으로 동작을 실행할 수 있도록 accesskey 속성값에 access 할 영어 또 ...
- jQuery中的经典动画
show()方法和hide()方法是jQuery中的基本动画方法,hide()方法等于将css()方法设置display属性为none.如何让元素动起来呢,我们可以在show和hide里加入slow, ...
- pdf文件流生成pdf文件
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { Code.Login Starr_mode ...
- winform 上传文件
using System; using System.Collections.Generic; using System.Text; using System.Net; using System.IO ...
- Android简单计算器
这是很久之前做的,方法很简单,都是一些基础的,不足的是还有很多功能不够. activity_main.xml布局: <LinearLayout xmlns:android="http: ...
- HOWTO: Be more productive
---by Aaron Swartz HOWTO: Be more productive “With all the time you spend watching TV,” he tells m ...
- 自定义TREEVIEW UL无限极嵌套
背景:做一个多级图片分类管理,当然要用到TreeView,在asp.net中已经提供了此服务器控件,参照效果,自定义一个简单可控性高的就当做练手吧! 效果:如图,小图标 折叠 展开 ico-tr ...
- Linux rar
http://www.vpsyou.com/2010/06/15/to-extract-rar-centos.html wget http://www.rarsoft.com/rar/rarlinux ...