| ASU Coding Cup 10 |
|---|
| Finished |
Zmeh is a zookeeper at ASZoo. He knows the number of animals in each family, so he wants to challenge you.
Given an array of $$$n$$$ strings $$$s$$$ denoting the kind of each animal in the zoo, and $$$q$$$ queries.
On each query, you'll be given a string $$$t$$$ and you must find the number of animals that are from that family.
The first line of input consists of two integers $$$n$$$, $$$q$$$ ($$$ 1 \le n, q \le 6 \cdot 10^4$$$).
The second line of input consists of $$$n$$$ strings $$$s_1, s_2, ..., s_n$$$ ($$$1 \le |s_i| \le 10$$$).
The next q lines consist of $$$t_i$$$ ($$$1 \le |t_i| \le 10$$$).
For each test case, print the number of animals that are from family $$$t_i$$$.
4 4dog cat dog dogdogcatdoglion
3 1 3 0
| Name |
|---|


