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

Why not working Python 3.6
Posted by Daniil 26 Sep 2018 20:38
a=[]
for i in range(int(input())):
    c=str(input())
    if len(a)==0 :
        a.append(c)
        continue
    d=(a[0].split())[1]
    d=int(d)
    k=int((c.split())[1])

    if k>=d :
        a.reverse()
        a.append(c)
        a.reverse()
    else:
        for j in range (len(a)):
            h=int((a[j].split())[1])



            if k >= h:
                p = a[:j]
                o = a[j:]
                p.append(c)
                p.extend(o)








for i in range(len(a)):
   print(a[i])


Edited by author 26.09.2018 20:38