Duplicate detection

We are trying to develop duplicate detection software. It should identify if a string appears as part of the previous strings. You would like to write a program that would print Duplicate if the inputted string is part of its predecessors and Unique otherwise.
The input contains 4 strings. For each of those, the program should print Duplicate if it has already appeared in any of the previous strings and Unique otherwise.
Hi, I would like to invite you to a conference My name is Bob a conference Bob is super smart!
Unique Unique Duplicate Unique


Time limit: 2 seconds

Memory limit: 512 MB

Output limit: 1 MB

To check your solution you need to sign in
Sign in to continue