Codeforces Round #361 (Div. 2) D. Friends and Subsequences 题解(st表+二分 or 单调队列)

NoSuchKey