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 ...
随机推荐
- cent0s7 显卡驱动导致重启黑屏
由于 CentOS7.0 版本与前面的 CentOS6.5 及之前的版本的模式变更方法有很大 的不同,以前的版本中我们可以在vi /etc/inittab 文件中将id:5:initdefault 更 ...
- poj3264
Balanced Lineup Time Limit: 5000MS Memory Limit: 65536K Total Submissions: 45777 Accepted: 21499 ...
- 让footer固定在页面(视口)底部(CSS-Sticky-Footer)
让footer固定在页面(视口)底部(CSS-Sticky-Footer) 这是一个让网站footer固定在浏览器(页面内容小于浏览器高度时)/页面底部的技巧.由HTML和CSS实现,没有令人讨厌的h ...
- 在c#中使用log4net
1.从log4net官网下载最新的log4net.dll 2.设置配置文件在app.config <?xml version="1.0"?> <configura ...
- Contoso 大学 - 使用 EF Code First 创建 MVC 应用
原文 Contoso 大学 - 使用 EF Code First 创建 MVC 应用 Contoso 大学 Web 示例应用演示了如何使用 EF 技术创建 ASP.NET MVC 应用.示例中的 Co ...
- Js 对象二
一.Date对象 1.创建Date对象的方法 1)使用new关键字和Date类来创建(不带参数) Var today = new Date(); //不带参数 它是获取当前的系统时间 2)使用new关 ...
- JasperReport原理解析之(一)
1. [加载原始文件]有iReport生成jrxml文件后,由jasperreport包中的类JRXml文件 加载和解析 jrxml文件. 文件解析后生成 JasperDesign对象. Jaspe ...
- 【转】DataGridView显示行号
ref:http://blog.csdn.net/xieyufei/article/details/9769631 方法一: 网上最常见的做法是用DataGridView的RowPostPaint事件 ...
- ASP.NET 将DataTable解析成JSON简介
这里解析json使用的是Newtonsoft.Json.dll程序集.下面请看code: using System; using System.Collections.Generic; using S ...
- LESS学习总结
之前在工作过程中,用到了Less,一直没有将学习心得整理归纳,今天终于空出时间整理了一下. Less学习常用参考文档: Less 中文网 http://lesscss.cn/ 快速入门 | Les ...