#P2098. Kth Query
Kth Query
题目描述
点击查看pdf
MianKing has a sequence and he wants to answer queries about it.
Let denote the K-th smallest number of sequence which satisfies that .
Now for each query, give you , you need to answer .
输入格式
The first line has two integers .
The second line has integers which denote .
Then there are lines, the i-th line has three integers which represents the i-th query.
输出格式
There are lines, the i-th line has one integer which denotes .
样例
提示
Form 2020ICPC济南站