#C9206. Unique Item Distribution
Unique Item Distribution
Unique Item Distribution
You are given an integer n representing the number of items (and stores), followed by a list of n integers representing the unique item IDs. Each store should receive one item, and each item must be unique across the stores.
Your task is to determine if each store can receive a unique item based on the provided list. The output should be "Items distributed successfully" if all items are unique and n > 0; otherwise, output "Distribution failed".
Note: When n = 0, the distribution is considered as failed.
inputFormat
The input is given through standard input in the following format:
n item_1 item_2 ... item_n
The first line contains a single integer n (number of items and stores). The second line contains n space-separated integers representing the item IDs. If n = 0, the second line may be empty.
outputFormat
Output a single line to standard output containing either "Items distributed successfully" if each store receives a unique item, or "Distribution failed" otherwise.
## sample3
4 12 7
Items distributed successfully