
Alice and Bob 
Time Limit: 1000ms, Special Time Limit:2500ms, Memory Limit:32768KB 
Total submit users: 52, Accepted users: 37 
Problem 11317 :
No special judgement

Problem description 
Alice and Bob are very smart guys and they like to play all kinds of games in their spare time. The most amazing thing is that they always find the best strategy, and that's why they feel bored again and again. They just invented a new game, as they usually did. The rule of the new game is quite simple.
There are N heap of stones,the i_th heap has Ai stones.
the operation should follow only one rule:one operation can only operate in one heap,and the stone of taking away in a time must no less than half number of the heap. For example :having a heap which has 5 stones,you can pick up 3,4,or 5.having a heap which has 2 stones ,you can pick up 1or2 stone.
Alice and Bob operate take turns .he who first can’t operate is loss.
As usual,alice operates first;

Input 
There are multiple cases,each case have two lines.first line have a integer N(0<N<=100).which represents having N heap stones.follow line have N integers A1,A2,A3,…An(1<=Ai<=2048), each represents the number of stones of the i_th heap .input end with n=0;

Output 
If Alice win output “YES” otherwise output “NO”.

Sample Input 
2
3 4
3
1 2 4
0

Sample Output 
YES
NO

Problem Source 
湖南师范大学第四届大学生计算机程序设计竞赛

Submit
Discuss
Judge Status
Problems
Ranklist

