Official ioi solution : http://www.ioi2009.org/GetResource?id=1963
Explanation - We first find out how much points each problem will be worth. Then we find out the score of each contestant. We sort the list of contestants on the basis of their score and in case of equal score on the basis of number of problems solved by the contestant and on their ids in case of equality. We then output the position of the candidate in the sorted ordering.
Can be found here.