You are viewing a single comment's thread. Return to all comments →
Nice solution!
A more concise (but perhaps less clear?) Python 3 translation might be:
from collections import defaultdict n, A = int(input()), defaultdict(list) for i in range(n): ind, str = input().split() A[int(ind)].append('-' if i < n/2 else str) print(*map(' '.join, A.values()))
Seems like cookies are disabled on this browser, please enable them to open this website
The Full Counting Sort
You are viewing a single comment's thread. Return to all comments →
Nice solution!
A more concise (but perhaps less clear?) Python 3 translation might be: