Company: Texas_1staug
Difficulty: hard
Meeting People Frequently Problem Description "Meeting people frequently is the surest way to get re-elected", advised the party President. Margaret, one of the party's elected representatives, took the advice seriously and planned a "meet & greet" on a street of N houses, numbered 1 to N from one end of the street to the other. To be seen often enough, her plan must be frequent : every block of C consecutive houses on the street must contain at least V houses that she visits. A block is any C consecutive house numbers i, i+1, ..., i+C-1 that lies entirely inside the street, so there are N - C + 1 blocks in all. Because her time is short, the plan must also be tight : no visited house may be dropped. That is, for every house she visits, removing just that one house from her plan would leave some block of C consecutive houses with fewer than V visited houses. Two plans are different if some house is visited in one plan and not in the other. Count the plans that are both frequent and