Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|

Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |

Language: Jenny's First Exam
Description First exams cause many problems to Jenny. One problem is that Jenny needs the whole day to prepare for any exam (good news is she needs only one day for any preparation). Another problem: in a day of the exam Jenny is not able to study anything. And the main problem: Jenny must prepare for Jenny wants to start preparations as later as possible but she has to pass all exams. Help Jenny to choose a day when she must start. Input The first line of the input file contains Each description consists of three lines. The first line is the name of the subject (a string containing only Latin letters, maximal length is 10). The second line is the date of the exam in format t ≤ 100 000)._{i}All exams take place in interval from 01.01.1900 to 31.12.2100. Recall that if the year is divisible by 4 and is not divisible by 100, or is divisible by 400 — it is the leap one. Such year has 366 days, the additional day is on February 29. Output Output the latest date when Jenny may start preparation and pass all exams. Write date in format Sample Input
Sample Output
Source Northeastern Europe 2005, Northern Subregion |

[Submit] [Go Back] [Status] [Discuss]

All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di

Any problem, Please Contact Administrator