AT_abc437_b [ABC437B] Tombola
Description
There is a grid with $ H $ rows and $ W $ columns. Each square has one integer written on it, and these integers are distinct. The square at the $ i $ -th row from the top and $ j $ -th column from the left has the integer $ A_{i,j} $ written on it.
Now, the host called out $ N $ distinct integers $ B_1, \dots, B_N $ .
If you find, for each row, how many of the integers called out by the host are contained in that row, what is the maximum value among these?
Input Format
The input is given from Standard Input in the following format:
> $ H $ $ W $ $ N $ $ A_{1,1} $ $ \cdots $ $ A_{1,W} $ $ \vdots $ $ A_{H,1} $ $ \cdots $ $ A_{H,W} $ $ B_1 $ $ \vdots $ $ B_N $
Output Format
Output the answer in one line.
Explanation/Hint
### Sample Explanation 1
- Among the integers in the $ 1 $ -st row from the top, $ 0 $ integers were called out by the host.
- Among the integers in the $ 2 $ -nd row from the top, $ 3 $ integers $ 6,11,9 $ were called out by the host.
- Among the integers in the $ 3 $ -rd row from the top, $ 2 $ integers $ 2,4 $ were called out by the host.
Thus, the answer is the maximum value among $ 0,3,2 $ , which is $ 3 $ .
### Constraints
- $ 1 \leq H \leq 3 $
- $ 1 \leq W \leq 5 $
- $ 1 \leq N \leq 90 $
- $ 1 \leq A_{i,j} \leq 90 $
- $ A_{i,j} $ are distinct.
- $ 1 \leq B_i \leq 90 $
- $ B_i $ are distinct.
- All input values are integers.