#BS0000015. Số dương bị thiếu thứ k (Kth Excluded)
Số dương bị thiếu thứ k (Kth Excluded)
Kth Excluded
Source: AtCoder
Version: Phuoc Hung OJ Extended
Problem Statement
You are given a strictly increasing sequence of positive integers. For query , you are given a positive integer . Find the -th smallest positive integer that is different from every element of the sequence.
Input
The first line contains and .
The second line contains .
The next lines contain , one value per line.
Output
Print one answer per query.
Subtasks
- Subtask 1 — 20%: , .
- Subtask 2 — 30%: , .
- Subtask 3 — 50%: , , .
Examples
Input
4 3
3 5 6 7
2
5
3
Output
2
9
4
Explanation
The missing positive integers are .