#P7280. [COCI 2020/2021 #4] Pizza
[COCI 2020/2021 #4] Pizza
Description
The pizzeria offers different pizzas. Toppings are labeled with positive integers. The -th pizza has toppings, with labels .
Mirko is very picky about food. He does not like kinds of toppings, with labels , so he wants to order a pizza that does not contain any of the toppings above. Find the number of pizzas Mirko can order.
Input Format
The first line contains an integer , the number of toppings Mirko does not like. Then follow distinct integers , the labels of the toppings Mirko does not like.
The second line contains an integer , the number of pizzas.
In the next lines, the -th line contains an integer , the number of toppings on the -th pizza. Then follow distinct integers , the labels of the toppings on that pizza.
There will not be two pizzas with exactly the same set of toppings.
Output Format
Output the number of pizzas Mirko can order.
1 2
3
1 1
1 2
1 3
2
2 1 2
4
2 1 4
3 1 2 3
2 3 4
3 3 5 7
2
1 4
3
1 1
1 2
1 3
3
Hint
Constraints
For of the testdata, .
For of the testdata, .
Notes
The scoring of this problem follows the original COCI problem, with a full score of .
Translated from COCI2020-2021 CONTEST #4 T1 Pizza.
Translated by ChatGPT 5
京公网安备 11011102002149号