#B3660. Hidden Card Detection
Hidden Card Detection
Hidden Card Detection
Small A recently purchased cards in T separate transactions. In each transaction, Small A bought n cards (note that the number of cards purchased in each transaction may vary). Each card has a numeric identifier, and if the identifier is \(0\), it indicates a hidden card.
Your task is to determine for each transaction whether a hidden card has been drawn. If a hidden card is present, output yes
; otherwise, output no
.
inputFormat
The first line of the input contains an integer T, representing the number of transactions.
Then follow T transactions. For each transaction:
- The first integer is n (the number of cards purchased in that transaction).
- Followed by n space-separated integers representing the identifiers of the cards.
outputFormat
For each transaction, output a single line containing yes
if a hidden card (identifier \(0\)) exists; otherwise, output no
.
sample
3
4 1 2 3 4
3 0 1 2
5 2 3 4 0 6
no
yes
yes
</p>