結果
問題 | No.2796 Small Matryoshka |
ユーザー |
![]() |
提出日時 | 2024-06-28 21:40:05 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 862 ms / 2,000 ms |
コード長 | 213 bytes |
コンパイル時間 | 178 ms |
コンパイル使用メモリ | 82,048 KB |
実行使用メモリ | 109,056 KB |
最終ジャッジ日時 | 2024-06-28 21:40:15 |
合計ジャッジ時間 | 9,493 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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)