結果

問題 No.3039 配信者
ユーザー SPD_9X2
提出日時 2025-02-28 23:17:01
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 970 ms / 2,000 ms
コード長 298 bytes
コンパイル時間 344 ms
コンパイル使用メモリ 82,308 KB
実行使用メモリ 229,132 KB
最終ジャッジ日時 2025-02-28 23:17:14
合計ジャッジ時間 11,403 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 15
権限があれば一括ダウンロードができます

ソースコード

diff #

N,H = map(int,input().split())

lis = []

for i in range(N):

    A,B = map(int,input().split())

    lis.append( A*2 + 0 )
    lis.append( B*2 + 1 )

lis.sort()

cnt = 0
ans = 0

for s in lis:

    if s % 2 == 0:
        cnt += 1
    else:
        cnt -= 1

    ans = max(ans , cnt)

print (ans)
0