#P478. 练86.1 旅行
练86.1 旅行
Description
You are planning a 7000KM journey. There are some motels along the way, and for safety reasons, you will not drive at night and will stay at motels. You already have a list of motels identified by their distance from the starting point:
0, 990, 1010, 1970, 2030, 2940, 3060
3930, 4060, 4970, 5030, 5990, 6010, 7000
However, more motels may be added before departure.
The travel agency requires you to drive at least kilometers per day to save costs, while the national travel agency requires you to drive at most kilometers per day for safety reasons.
You want to know how many different travel plans are possible.
Input Format
The first line contains , the second line contains , and the third line contains (), representing the number of additional motels to be added before departure. The next lines each contain an integer , representing the distance of a motel from the starting point (). Note: no two motels are at the same location.
Output Format
Output the total number of possible travel plans.
Sample
500
1500
064