Did you know that eagles hibernate? At least, one eagle does. When the winter break started,
decided that he would retreat into his mancave for a little while to hibernate and take a break from all the hustle-bustle of school life. But when he finally came out, he discovered that he had missed Christmas and it was already the New Year! What a disaster! If he doesn't get the other DMOJ admins their presents, they will definitely refuse when he asks them to be his data slaves!Luckily, there's a special store where the boxing week sales are still going on so can still get some cheap presents. brought shopping bags with him, one for each DMOJ admin's presents. is known for being a calm, cool, and collected shopper normally. When browsing the aisles of the store however, he found that their prices were unbelievably low! Amazed at his luck, went on a shopping spree, grabbing all that he could and shoving them into his shopping bags indiscriminately.
It was only when he lined up for the checkout that he realized he may have made a mistake. What if two or more DMOJ admins end up getting the same present?
can't let his reputation as a great gifter be soiled like that! As the nice cashier of the store, you have agreed to help check if multiple bags contain the same item.Input Specification
The first line of input will contain , the number of shopping bags.
Each of the next lines will contain , the number of items in that bag, followed by integers, the label of each item. The labels of the items will be between and , inclusive.
Output Specification
Output YES
if there's at least one gift that multiple admins will get, otherwise output NO
.
Sample Input 1
2
3 1 2 3
3 2 4 6
Sample Output 1
YES
Explanation for Sample Output 1
Both admins will get item 2.
Sample Input 2
2
3 1 3 5
3 2 4 6
Sample Output 2
NO
Comments
Please i'm new to programming i need help what does "Your output (clipped)" mean?
It's a little hint the website gives you as to why your program failed called partial output - it gives you a small portion of your code's output. However, the partial output sometimes doesn't play nicely with the question, and so the partial output is zero. Basically, you get no help :) good luck!
I think the last test case is wrong, or it exceeds the input constraints.
(and I don't know why I'm getting WA :'( )
Yea, I have used 5 approaches. All give me WA :(
Keep looking. There's something that you've missed.
I've just checked it. It's correct and fits within the constraints.