Bibig wants to know whether he is the most orzed and orzing man in the lab.So he asked his concubine.
She thought for a while, and decided to play a hard game with bibig.
If bibig wins ,he is the most orzed and orzing man in the lab.
Here are the rules:
1.There are n(1<=n<=1e5) groups of a[i](0<=n<=1e9) orzers in the lab initially.
2.Everyone take turns to get q(0<q<=a[i]) orzers in the ith group out, and i depends on you.
3.q must be a power of 2.
4.If it's your turn and there is no orzer ,you will lose.
5.Bibig is always takes first.
Bibig is buzy with orzing.Please tell him whether he is the most orzed and orzing man in the lab.If he is,print
"Yes".In other case, print "No".
问题 C: The most orzed and orzing man
时间限制: 1000 ms 内存限制: 128 MB提交: 132 解决: 38
[提交][状态][讨论版]
题目描述
输入
There are multiple cases.The number of cases is no more than 100.
For each case,in the first line give a number n.
The next line contains n positive integers a[i].
输出
If he is the most orzed and orzing man in the lab,print "Yes".In other cases, print "No".
样例输入
2
1 1
2
0 1
样例输出
No
Yes
提示
한국어
中文
فارسی
English
ไทย
Anything about the Problems, Please Contact Admin:admin
All Copyright Reserved 2010-2024 Xidian Programming Contest Online Judge TEAM
GPL2.0 2003-2014 HUSTOJ Project TEAM
Anything about the Problems, Please Contact Admin:admin
All Copyright Reserved 2010-2024 Xidian Programming Contest Online Judge TEAM
GPL2.0 2003-2014 HUSTOJ Project TEAM