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 ...
随机推荐
- hdu 4670 树的点分治
思路:首先当然是要用树的点分治了.根节点为root,那么经过root的合法路径数求出来这题就解决了.因为我们可以用分治枚举根,最后将所有根的路径数加起来就是结果.当然这里的根不是整棵树的根,是子树根. ...
- (原创)monitor H3C switch with cacti
H3C交换机需要做的操作 [H3C]snmp-agent #H3C默认SNMP是关闭的,需要先开启 [H3C]snmp-agent community read public #设置团体名[publi ...
- js学习笔记—转载(闭包问题)
---恢复内容开始--- 闭包(closure)是Javascript语言的一个难点,也是它的特色,很多高级应用都要依靠闭包实现. 一.变量的作用域 要理解闭包,首先必须理解Javascrip ...
- 安装SqlServer2008时相关问题
在安装SqlServer2008时,安装程序支持规则,老提示重启计算机 1,运行 regedit 打开注册表编辑器. 2,依次展开HKEY_LOCAL_MACHINE\SYSTEM\CurrentCo ...
- 关于微信response_type参数错误
可能出现问题的几个原因: 1.正确的2.0auth的地址:https://open.weixin.qq.com/connect/oauth2/authorize?appid=1%&redire ...
- Win32非递归遍历和搜索文件以及目录算法
转载请注明来源:http://www.cnblogs.com/xuesongshu 要点: 1.搜索的顶层目录在进入循环之前进栈 2.栈元素存储字符串指针,出栈时释放资源 3.每次循环开始,栈顶元素出 ...
- Contoso 大学 - 2 – 实现基本的增删改查
原文 Contoso 大学 - 2 – 实现基本的增删改查 目录 Contoso 大学 - 使用 EF Code First 创建 MVC 应用 原文地址:http://www.asp.net/mvc ...
- (转) 读取xml文件转成List<T>对象的两种方法
读取xml文件,是项目中经常要用到的,所以就总结一下,最近项目中用到的读取xml文件并且转成List<T>对象的方法,加上自己知道的另一种实现方法. 就以一个简单的xml做例子. xml格 ...
- CSS 初体验之一
层叠样式表 (Cascading Style Sheets)”,它主要是用于定义HTML内容在浏览器内的显示样式. 1.首先先看盒装模型,如下图,平时设置的width,height是指元素内容(con ...
- android 数据库的创建
主java package com.itheima.createdatabase; import android.app.Activity; import android.content.Contex ...