PHƯỚC HƯNG OJ · THỬ THÁCH THUẬT TOÁN

#BS0000089. Đếm học sinh đạt ngưỡng chiều cao (Counting 2)

HỌC THEO LỘ TRÌNH

Bài tập thuộc lộ trình

1 lộ trình

Đếm học sinh đạt ngưỡng chiều cao (Counting 2)

Counting 2

Source: AtCoder

Version: Phuoc Hung OJ Extended

Problem Statement

A class has nn students of heights aia_i. For each of qq independent thresholds xjx_j, count students whose heights are at least xjx_j.

Input

The first line contains nn and qq. The second line contains nn heights. Each of the next qq lines contains one threshold.

Output

Print qq lines; the jj-th line is the number of heights at least xjx_j.

Subtasks

  • Subtask 1 (20 points): 1≤n,q≤201\le n,q\le 20; 1≤ai,xj≤1091\le a_i,x_j\le10^9.
  • Subtask 2 (30 points): 1≤n,q≤20001\le n,q\le 2000; 1≤ai,xj≤1091\le a_i,x_j\le10^9.
  • Subtask 3 (50 points): 1≤n,q≤2000001\le n,q\le 200000; 1≤ai,xj≤1091\le a_i,x_j\le10^9.

Examples

Input

3 1
100 160 130
120

Output

2

Explanation

The heights are 100,160,130100,160,130. The threshold 120120 is met by 160160 and 130130, but not 100100, so the count is 22.