Socks
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 64 megabytes
There is a table of length l. n socks are expanded on the table so that no sock lie beyond the table. There exists a clever boy Vasya, who wants (purely for selfish reasons) to measure the thickness of the socks of the table in m points.
Input
First the numbers l, n, m (1 ≤ l ≤ 10000, 1 ≤ n ≤ 10000, 1 ≤ m ≤ 100000) are given. Further there are n pairs of integers left, right (1 ≤ left ≤ right ≤ l) are given - left and right ends of the socks. Then go m numbers from 1 to l - the Vasya's interesting points.
Output
Print m numbers - the socks thickness at every interesting point on the table.
Examples
Input #1
Answer #1
Submissions 453
Acceptance rate 47%