时间限制:C/C++/Rust/Pascal 2秒,其他语言4秒 空间限制:C/C++/Rust/Pascal 512 M,其他语言1024 M 64bit IO Format: %lld
题目描述
Walk_alone has a sequence of length , he defines function as
He thinks that calculating the value of the function to a given interval is too boring, so he wants you to output the -th largest value of the function among all where .
输入描述:
The first line contains and , where indicates the length of sequence .
The second line contains integers as the sequence.
输出描述:
Output a single value indicating the -th largest function value among all intervals.