Matches Game
Matches Game
http://poj.org/problem?id=2234
| Time Limit: 1000MS | Memory Limit: 65536K | |
| Total Submissions: 12309 | Accepted: 7172 |
Description
Input
Output
Sample Input
2 45 45
3 3 6 9
Sample Output
No
Yes
#include<iostream>
using namespace std;
#define lson l,mid,rt<<1
#define rson mid+1,r,rt<<1|1
#define sqr(x) ((x)*(x))
#define maxn 100005
typedef long long ll;
typedef unsigned long long ull;
const ull MOD=;
/*#ifndef ONLINE_JUDGE
freopen("1.txt","r",stdin);
#endif */ int a[]; int main(){
#ifndef ONLINE_JUDGE
// freopen("1.txt","r",stdin);
#endif
std::ios::sync_with_stdio(false);
int n;
while(cin>>n){
int ans=;
for(int i=;i<=n;i++) {
cin>>a[i];
ans^=a[i];
}
if(!ans) cout<<"No"<<endl;
else cout<<"Yes"<<endl; }
}
Matches Game的更多相关文章
- keil MDK error: L6236E: No section matches selector - no section 错误
今天板子刚到,新建的第一个工程就报错了. .\Objects\cse.sct(7): error: L6236E: No section matches selector - no section t ...
- 解决Android中No resource found that matches android:TextAppearance.Material.Widget.Button.Inverse问题
解决Android中No resource found that matches android:TextAppearance.Material.Widget.Button.Inverse问题http ...
- HDU5456 Matches Puzzle Game(DP)
题目 Source http://acm.hdu.edu.cn/showproblem.php?pid=5456 Description As an exciting puzzle game for ...
- Matches正则使用提取内容
用VS新建WinForm程序,窗体上是三个文本框和一个按钮.可以自己构造正则表达式,自己修改匹配内容 正则表达是要提取的部分为hewenqitext 代码如下: using System; using ...
- js之 matches (可以取代jq的 delegate 方法)
问题:请给#wrap 下面的子元素添加点击事件! <div id="wrap"> <a class="btn" href="http ...
- Owin SelfHost Asp.net WebApi 遇到 No type was found that matches the controller named 'ControllerName' 异常的解决方案
问题背景:在使用普通的SelfHost时,调用其它工程的dll(其实就是把WebApi写到一个单独的工程方便管理),通过加载其他工程的dll然后再访问webapi是没有问题的. 但是在使用Owin S ...
- uva 11357 Matches
// uva 11357 Matches // // 题目大意: // // 给你n个火柴,用这n个火柴能表示的非负数有多少个,不能含有前导零 // // 解题思路: // // f[i] 表示正好用 ...
- android中出现Error retrieving parent for item: No resource found that matches the Theme.AppCompat.Light
styles.xml中<style name="AppBaseTheme" parent="Theme.AppCompat.Light">提示如下错 ...
- error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'.
error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCom ...
- No resource found that matches the given name 'Theme.AppCompat.Light 的完美解决方案
No resource found that matches the given name 'Theme.AppCompat.Light 的完美解决方案 首先这个问题的产生是由于缺少Theme.App ...
随机推荐
- ip黑白名单防火墙frdev的原理与实现
汤之盘铭曰 苟日新 日日新 又日新 康诰曰 作新民 诗曰 周虽旧邦 其命维新 是故 君子无所不用其极 ——礼记·大学 在上一篇文章<DDoS攻防战 (二) :CC攻击工具实现与防御理论>中 ...
- php中显示数组与对象的实现代码
1. 使用 print_r ( $array/$var ) print 是打印的意思,而r则取自Array的单词,那么该函数的功能就是打印数组内容,它既可以打印数组内容,也可以打印普通的变量. pri ...
- How to make MySQL handle UTF-8 properly
To make this 'permanent', in my.cnf: [client] default-character-set=utf8 [mysqld] character-set-serv ...
- Windows 8 禁用强制驱动签名
打开管理员模式的命令行,运行命令: bcdedit.exe -set loadoptions DDISABLE_INTEGRITY_CHECKS bcdedit/set testsigning on ...
- java 线程状态相关测试
1. 启动netty server 等待接受客户端连接 package io.netty.example.myTest.nio; import java.io.IOException; import ...
- ACM__并查集
并查集是树型的数据结构,处理不想交集合 主要解决查找和合并的问题 步骤: 初始化 把每个点所在的集合初始化为自身 复杂度为O(N) 查找 查找元素所在的集合,即根节点 合并 将两个元素所在的集合合并在 ...
- 树莓派安装centos7
引用:https://blog.csdn.net/elesos/article/details/80514659 1,格式化 https://www.sdcard.org/downloads/form ...
- Haskell语言学习笔记(87)Time
安装 time $ cabal install time Installed time-1.9.1 Prelude> import Data.Time Prelude Data.Time> ...
- Shell编程常用函数
1.打印提示消息函数,不同级别消息使用不同的颜色显示.其中错误信息提示为红色字体. # -------------------------------------------------------- ...
- 自定义 mapper的实现
json格式,要想好看直接百度,json,将字符放进去就可 一步:将mapper复制一份,名字加一个Custom自定义 二步:mpper.xml也是一样,设置里面的namespace映射关系 自定义m ...