fork download
  1. a = int(input())
  2. wh = []
  3.  
  4. for _ in range(a):
  5. wh.append(input().split())
  6. for i in wh:
  7. cnt = 1
  8. for j in wh:
  9. if i[0] < j[0] and i[1] < j[1]:
  10. cnt += 1
  11. print(cnt, end = ' ')
Success #stdin #stdout 0.04s 9872KB
stdin
2
99 99
100 100
stdout
1 2