CCC '99 S2 - Year 2000


Submit solution

Points: 1
Time limit: 1.0s
Memory limit: 256M

Problem types
Allowed languages
C++, Python

where dd is a two-digit day between 01 and 31 , mm is a two-digit month between 01 and 12 , yy is a two digit year between 00 and 99 , and Month is one of: January , February , March , April , May , June , July , August , September , October , November , December . The first two formats contain no spaces, and the third format contains a single space after Month and a single space after the comma.

Dates should appear on a single line. Dates traversing two lines or dates immediately adjacent to a letter of the alphabet or a digit should not be recognized. Non-existent data such as February 30, 99 do not need to be checked for.

The first line of input to your program will contain a positive integer \(n\) , indicating the number of lines of text to follow. In each of the lines of text you are to find all dates that occur in any of the formats above, and replace the two-digit year by the appropriate four-digit year as described above.

Sample Input

4
Before 02/03/04, but not after December 19, 99,
there was a rehash of the 55.34.02 meeting. A date, like November 15,
95 cannot traverse two lines, nor can it be surrounded by alphabetics
or numerics like this: 78November 01, 88, or 6801/12/03, or 02/03/04x.

Sample Output

Before 02/03/2004, but not after December 19, 1999,
there was a rehash of the 55.34.02 meeting. A date, like November 15,
95 cannot traverse two lines, nor can it be surrounded by alphabetics
or numerics like this: 78November 01, 88, or 6801/12/03, or 02/03/04x.

Comments

There are no comments at the moment.