Logo
(追記) (追記ここまで)

34302번 - Win Streak 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 2048 MB1401059573.643%

문제

The Colorado School of Mines football team is just off of another great season which saw them reach the Division II finals for the second year in a row.

Unfortunately, the team lost the finals, but the Orediggers still had a great season, going on the longest winning streak in school history with fourteen games across the regular season and the playofffs until the final game. (A winning streak is a sequence of chronologically consecutive games where a team scores more points than their opponent.)

Orediggers head coach Pete Sterbick has tasked you with analyzing the games of the other teams in the Rocky Mountain Athletic Conference (RMAC) to determine how long their longest winning streaks were.

Given the scores for all of the games that one particular team has played, Coach Sterbick wants to know the length of the longest winning streak for that team.

입력

The first line of input will be a single integer 1ドル \leq N \leq 10^4,ドル the number of games the team you are analyzing has played.

The next $N$ lines will each contain two integers 0ドル \leq S, T \leq 222,ドル representing the score of the team you are analyzing, and the score of the opposing team, respectively. The scores are given in chronological order.

출력

Output a single integer, the length of the longest sequence of consecutive games where the team you are analyzing scored more points than their opponent.

제한

예제 입력 1

10
14 7
17 20
20 10
28 14
30 7
10 17
45 20
24 10
28 24
14 14

예제 출력 1

3

힌트

출처

School > CS@Mines > CS@Mines HSPC 2024 F번

  • 문제를 만든 사람: Sumner Evans
(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /