F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

Lucky

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)
Total Submission(s): 1514    Accepted Submission(s): 805


Problem Description
$\ \ \ \ $Chaos August likes to study the lucky numbers.

$\ \ \ \ $For a set of numbers S,we set the minimum non-negative integer,which can't be gotten by adding the number in S,as the lucky number.Of course,each number can be used many times.

$\ \ \ \ $Now, given a set of number S, you should answer whether S has a lucky number."NO" should be outputted only when it does have a lucky number.Otherwise,output "YES".
 

Input
$\ \ \ \ $The first line is a number T,which is case number.

$\ \ \ \ $In each case,the first line is a number n,which is the size of the number set.

$\ \ \ \ $Next are n numbers,means the number in the number set.

$\ \ \ \ 1\le n\le 10^5,1\le T \le 10,0\le a_i \le 10^9$.
 

Output
$\ \ \ \ $Output“YES”or “NO”to every query.
 

Sample Input
1 1 2
 

Sample Output
NO
 

Source
 

Statistic | Submit | Discuss | Note
Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-06-25 14:34:46, Gzip enabled