Gift Expiration Date
Time limit1sMemory limit1024 MB
Count how many gift cards have an expiration date later than the current date, with dates in YYYY-MM-DD form and no leap years.
- Level
Easy2 of 10
- Topics
- Implementation, String
- Solved
- No attempts yet
Problem
Ims received gift cards from several people. Ims wants to check how many of the gift cards received so far can be used now. Help Ims by finding the total number of gift cards that can be used at the current date. Only gift cards whose expiration date is after the current date can be used.
Given the expiration dates of the gift cards Ims received, find the number of gift cards Ims can use now. Dates are given in the format YYYY-MM-DD, and leap years are not considered in this problem. In other words, February always has only 28 days, regardless of the year.
Input
The first line contains the current date.
The second line contains the number of gift cards Ims received, .
From the third line, the next lines contain the expiration dates of the gift cards Ims received.
The years are given only from to .
Output
Print the number of gift cards Ims can use now.