(num.bit_count(), num)
sorted(range(len(arr)), key=lambda i: arr[i])
{v: r for r, v in enumerate(sorted(set(arr)), 1)}