Page 7 of 7

Re: 10041 - Vito's Family

Posted: Sun Dec 21, 2014 12:19 am
by s0mbra
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!