ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1100. Final Standings

Show all messages Hide all messages

Нашел ошибку. =)

Edited by author 12.05.2014 09:33
То же самое у меня, WA1  и все тут, хотя у меня нормально проходило и другие тесты. Вчем была ошибка ?
I have WA1 too, i cant understand why, because example from briefing was ok.

Python code:

from sys import stdin, stdout

N = int(stdin.readline())

D = {}

for i in range(N):
    inp = stdin.readline().split(' ')
    D[inp[0]]=int(inp[1])

for tup in sorted(D.items(), key=lambda x: x[1], reverse=True):
    print(tup[0], tup[1])
In that problem the solution is a STABLE sort.
В этой задаче решением является УСТОЙЧИВАЯ сортировка.
Спасибо за ответ! Не понял этого из описания задачи