結果
問題 | No.2796 Small Matryoshka |
ユーザー |
![]() |
提出日時 | 2024-06-28 21:40:06 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 804 ms / 2,000 ms |
コード長 | 213 bytes |
コンパイル時間 | 162 ms |
コンパイル使用メモリ | 82,816 KB |
実行使用メモリ | 109,032 KB |
最終ジャッジ日時 | 2024-06-28 21:40:17 |
合計ジャッジ時間 | 8,397 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 19 |
ソースコード
import heapqN = int(input())A = [tuple(map(int, input().split())) for _ in range(N)]A.sort()q = []for l, r in A:if q and q[0] <= l:heapq.heappop(q)heapq.heappush(q, r)print(len(q) - 1)