SPOJ - Ordering the Soldiers (树状数组+二分)

NoSuchKey