P27805 [洛谷] [Language Contest 202209] Collecting Cards
普及-
题目描述

Problem Background

Little A has recently become obsessed with collecting cards.

Problem Description

Little A has bought cards $T$ times recently, each time purchasing $n$ cards (note that the number of cards bought in different purchases may not be the same). Each card has a numeric identifier, and if the identifier is 0, it means a hidden card was drawn.

Little A wants to know separately for each purchase whether a hidden card was drawn. If a hidden card was drawn, output yes; otherwise, output no.

Input Format

The first line contains an integer $T$, indicating the number of times Little A has bought cards recently.

The next $2T$ lines represent the details of these $T$ purchases.

For each purchase, there are two lines of input:
- The first line contains an integer $n$, indicating the number of cards bought.
- The second line contains $n$ integers, representing the numeric identifiers of the $n$ cards bought in this purchase.

Hint: If you have difficulty understanding the input format, you can first read the sample input and output below, and then use them to understand the input format.

Output Format

There are $T$ lines in total, each containing either yes or no, indicating whether a hidden card was drawn. If a hidden card was drawn, output yes; otherwise, output no.

Sample Input and Output

Sample Input #1

1
5
1 2 3 4 0

Sample Output #1

yes

Sample Input #2

2
3
1 2 3
4
1 2 0 3

Sample Output #2

no
yes

Notes

For $20\%$ of the data, $T=1$ and $0 \le n \le 10$;
For $40\%$ of the data, $T=1$;
For $70\%$ of the data, $T \le 100$ and $0 \le n \le 1000$;
For $100\%$ of the data, $T \le 100$ and $0 \le n \le 10^4$, and the numeric identifiers of the cards are within the range of int in C++.

输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
1 5 1 2 3 4 0
样例输出
yes