10041 - Vito's Family

All about problems in Volume 100. If there is a thread about your problem, please use it. If not, create one with its number in the subject.

Moderator: Board moderators

s0mbra
New poster
Posts: 4
Joined: Thu Dec 11, 2014 9:30 pm

Re: 10041 - Vito's Family

Post by s0mbra » Sun Dec 21, 2014 12:19 am

Hum... Be careful!
When I was solving this problem I just ignored equal numbers, so if the informed list were something like:
{1, 3, 3, 10, 5, 2, 5}
I would only store this ordered set:
{1, 2, 5, 3, 10}
And then calculate its median. This leads to a wrong answer according to the judge. In order to get the correct answer you must consider even the repeated numbers.

I hope that this help you, guys!

Post Reply

Return to “Volume 100 (10000-10099)”