Advertisement
Guest User

Untitled

a guest
May 25th, 2018
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. n=int(input())
  2. kex=0
  3. gay1=''
  4. gay2=''
  5. sex=2
  6. for i in range(n):
  7. a,b,c,d=map(str,input().split())
  8. d=int(d)
  9. if d>kex:
  10. kex = d
  11. gay1=a+' '+b
  12. gay2=''
  13. sex=2
  14. elif d==kex:
  15. if gay1!='':
  16. if gay2!='':
  17. sex=sex+1
  18. else:
  19. gay2=a+' '+b
  20. else:
  21. gay2=a+' '+b
  22. if sex!=2:
  23. print(sex)
  24. elif gay2=='':
  25. print(gay1)
  26. else:
  27. print(gay1,gay2,sep='\n')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement