#K9656. Unique Flower Layouts
Unique Flower Layouts
Unique Flower Layouts
In this problem, you are given several flower layouts. Each layout is represented by a sequence of integers that denote the flower IDs arranged in a specific order. Your task is to determine whether each layout is unique compared to all previously seen layouts. The first occurrence of a layout is considered "Unique", and any subsequent identical layout is considered "Duplicate".
More formally, given (n) layouts, for each layout, output "Unique" if it hasn't appeared before; otherwise, output "Duplicate".
The input is read from stdin and the output should be printed to stdout. Each result should be on a separate line.
inputFormat
The first line contains an integer (n) representing the number of layouts. Each of the following (n) lines describes a layout. Each layout starts with an integer (k) (the number of flowers in the layout), followed by (k) space-separated integers representing the flower IDs.
outputFormat
For each layout, output a single line containing either "Unique" if the layout is being seen for the first time, or "Duplicate" if it has appeared before.## sample
1
3 1 2 3
Unique
</p>