use SortedListWithKey of sortedcontainers-0.8.2