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 ...
随机推荐
- ubuntu16.04搭建geodjango+postgresql+postgis的WebGIS框架(二))安装postgresql和postgis
卸载老版本sudo dpkg --purge postgis postgresql-9.3-postgis1.安装postgresql sudo apt-cache search postgresql ...
- 网关协议学习:CGI、FastCGI、WSGI
网关协议学习:CGI.FastCGI.WSGI https://www.biaodianfu.com/cgi-fastcgi-wsgi.html
- react-navigation设置navigationOptions中Static中使用 this 的方法
使用react-navigation时,单页面设置navigationOptions中,进行Static中 调用this 中的方法或值时,需要做如下操作 static navigationOption ...
- Installing PHP5 on Ubuntu Server
When installing PHP 5 from source I ran into the following problems and solutions: Problem:configure ...
- UI5-学习篇-18-云端UI5应用部署到Fiori Launchpad
UI5应用发布SCP 选择UI5应用项目,右键 Deploy - Deploy to SAP Cloud Platform 输入云平台子账号,项目名称,应用名称,如下图所示: 点击Open the r ...
- Sql Server 中由数字转换为指定长度的字符串
一个列的数据类型是 int ,从 1 开始自动增长,另一个列是字符串,现在想把 int 列转换成 九个字符,比如 1 转换后就是 000000001 ,添到字符串列,怎么实现呢? set @imaxU ...
- Redis进阶实践之四Redis的基本数据类型(转载4)
Redis进阶实践之四Redis的基本数据类型 一.引言 今天正式开始了Redis的学习,如果要想学好Redis,必须先学好Redis的数据类型.Redis为什么会比以前的Memchaed等内存缓存软 ...
- 在CentOS7中利用yum命令安装mysql
在CentOS7中利用yum命令安装mysql 原创 2016年08月31日 10:42:33 标签: mysql / centos 4832 一.说明 我们是在VMware虚拟机上安装的mysql, ...
- 维护没有源代码的遗留 Java 项目
维护没有源代码的遗留 Java 项目 Give Those Sweets Some Love --> 有时你可能不得不修改一些只有 Jar 和 .class 的 Java 项目. 要修改 Jar ...
- 配置IIS支持Json格式
配置iis支持.json格式的文件 原文地址:http://blog.eroad.info/iis-suport-json/ 在做easyUI的官方示例的时候 有的例子是直接读取的json文件,但是默 ...