Mex

· · 个人记录

problem statement/description:

Now, you have an array A with length N, and a integer K. Please you get every subsequence of A which their length more than K for their Mex 's sum.

Mex is the smallest non-negative integer of the sequence that haven't done appear.

Data Range:

N\leq 10^6,1\leq K\leq N,A_i\leq 10^{18}

Time limit: \infty s