結果
問題 |
No.1703 Much Matching
|
ユーザー |
👑 |
提出日時 | 2022-01-23 01:10:20 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 802 ms / 2,000 ms |
コード長 | 379 bytes |
コンパイル時間 | 313 ms |
コンパイル使用メモリ | 81,396 KB |
実行使用メモリ | 211,528 KB |
最終ジャッジ日時 | 2024-11-28 10:50:34 |
合計ジャッジ時間 | 8,145 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 35 |
ソースコード
from bisect import bisect_left n, m, q = map(int, input().split()) lst = [[] for _ in range(n)] for _ in range(q): x, y = map(int, input().split()) lst[x - 1].append(y) Y = [] for ls in lst: ls.sort(reverse = True) Y += ls lst = [] for y in Y: p = bisect_left(lst, y) if p == len(lst): lst.append(y) else: lst[p] = y print(len(lst))