#C7062. Redundant Delivery Check
Redundant Delivery Check
Redundant Delivery Check
You are given the planned delivery routes for multiple couriers. Each courier's route is represented as a sequence of integers, where each integer stands for a delivery location. Your task is to determine, for each courier, whether there are any redundant deliveries (i.e. if the courier visits the same location more than once).
Formally, for each courier with a route represented by the sequence \(a_1, a_2, \dots, a_n\), you need to check if there exists two indices \(i\) and \(j\) with \(i \neq j\) such that \(a_i = a_j\). If such indices exist, the courier has a redundant delivery.
For each courier, output "Yes" if redundant deliveries exist; otherwise, output "No".
inputFormat
The input is read from standard input (stdin) with the following format:
T n1 a1 a2 ... an1 n2 b1 b2 ... bn2 ... T
Here, the first line contains an integer \(T\) representing the number of couriers. For each courier, the first number denotes the number of delivery locations followed by that many space-separated integers representing the delivery route.
outputFormat
For each courier, print a single line containing either "Yes" if the courier's route has redundant deliveries, or "No" if all delivery locations are unique.
The output is sent to standard output (stdout).
## sample3
5
10 20 30 40 10
4
25 30 35 40
6
15 20 15 25 30 15
Yes
No
Yes
</p>