#P10780. BZOJ3028 食物
BZOJ3028 食物
Problem Description
Mingming is going on a trip again. Unlike last time, this time he is going on a space adventure. Let’s not talk about how “NC” he is. He is imagining what things he should bring. Of course, you need to help him calculate the number of ways to bring a total of items.
This time he plans to bring some popular foods, such as: Mi Tao Duo La, chicken nuggets, Chengde hamburgers, and so on.
Of course, he also has some strange restrictions:
The restrictions for each type of food are as follows:
- Chengde hamburger: an even number;
- Cola: or ;
- Chicken drumstick: , , or ;
- Mi Tao Duo: an odd number;
- Chicken nuggets: a multiple of ;
- Baozi: , , , or ;
- Potato chips stir-fried with meat: at most one;
- Bread: a multiple of .
Note that we will not consider how Mingming matches these foods when eating, and we also assume each type of food is counted in “pieces” (after all, it is just imagination). As long as the total number adds up to , it counts as one valid plan. Therefore, for the given , you need to compute the number of plans, and take it modulo .
Input Format
One integer , representing the total count.
Output Format
One integer, representing the number of plans modulo .
1
1
5
35
Hint
- For of the data, .
- For all data, .
Translated by ChatGPT 5