結果
| 問題 |
No.3039 配信者
|
| コンテスト | |
| ユーザー |
naniwazu
|
| 提出日時 | 2025-02-03 16:25:35 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 714 ms / 2,000 ms |
| コード長 | 412 bytes |
| コンパイル時間 | 509 ms |
| コンパイル使用メモリ | 82,040 KB |
| 実行使用メモリ | 183,624 KB |
| 最終ジャッジ日時 | 2025-02-03 16:25:47 |
| 合計ジャッジ時間 | 8,999 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 15 |
ソースコード
import sys
input = sys.stdin.buffer.readline
N, H = map(int, input().split())
streams = []
for _ in range(N):
A, B = map(int, input().split())
streams.append(A * 2)
streams.append(B * 2 + 1)
streams.sort()
watching = 0
ans = 0
for stream in streams:
time, is_end = divmod(stream, 2)
if is_end:
watching -= 1
else:
watching += 1
ans = max(ans, watching)
print(ans)
naniwazu