Jim and the Orders

  • + 4 comments

    Crazy 1-liner in Python3. :D

    print(*(lambda s: sorted(range(1, len(s) + 1), key=lambda i: s[i - 1]))(tuple(sum(map(int, input().split())) for _ in range(int(input())))))