#Z14118. 正常血压
正常血压
Description
The intensive care unit measures a patient's blood pressure every hour. If the systolic pressure is between 90-140 and the diastolic pressure is between 60-90 (including the endpoints), it is considered normal. Now, given a patient's blood pressure measurements over several hours, calculate the longest consecutive hours during which the patient's blood pressure remained normal.
Input Format
The first line is a positive integer n (n < 100), followed by n lines. Each line contains 2 positive integers representing the systolic and diastolic pressures for one measurement.
Output Format
Output only one line, indicating the longest consecutive hours of normal blood pressure.
4
100 80
90 50
120 60
140 90
2