AT_awc0002_d 鍵と宝箱

Description

After a long adventure, Takahashi has reached ruins containing $ N $ treasure chests. Each treasure chest $ i $ ( $ 1 \leq i \leq N $ ) is secured with a lock of strength $ C_i $ . A larger strength value means a sturdier lock. All treasure chests have mutually distinct lock strengths. Takahashi has $ M $ keys. Each key $ j $ ( $ 1 \leq j \leq M $ ) has an unlocking power $ R_j $ . Key $ j $ can open treasure chest $ i $ only if the key's unlocking power is at least as large as the lock's strength, that is, when $ C_i \leq R_j $ . Note that different keys may have the same unlocking power. Takahashi selects some treasure chests he wants to open (possibly $ 0 $ ), and assigns exactly one key to each selected treasure chest to open it. However, the same key cannot be assigned to two or more treasure chests. Additionally, the key assigned to each treasure chest must be able to open it ( $ C_i \leq R_j $ ). It is fine to leave some keys unused or some treasure chests unopened. Find the maximum number of treasure chests Takahashi can open.

Input Format

> $ N $ $ M $ $ C_1 $ $ C_2 $ $ \ldots $ $ C_N $ $ R_1 $ $ R_2 $ $ \ldots $ $ R_M $ - The first line contains an integer $ N $ representing the number of treasure chests and an integer $ M $ representing the number of keys, separated by a space. - The second line contains integers $ C_1, C_2, \ldots, C_N $ representing the lock strengths of the treasure chests, separated by spaces. - The third line contains integers $ R_1, R_2, \ldots, R_M $ representing the unlocking powers of the keys, separated by spaces.

Output Format

Print the maximum number of treasure chests Takahashi can open, on a single line.

Explanation/Hint

### Constraints - $ 1 \leq N \leq 2 \times 10^5 $ - $ 1 \leq M \leq 2 \times 10^5 $ - $ 1 \leq C_i \leq 10^9 $ $ (1 \leq i \leq N) $ - $ 1 \leq R_j \leq 10^9 $ $ (1 \leq j \leq M) $ - $ C_i \neq C_k $ $ (i \neq k) $ (all lock strengths are mutually distinct) - All input values are integers