Codeforces 983E NN country 倍增+树状数组

NoSuchKey