結果
問題 |
No.1703 Much Matching
|
ユーザー |
![]() |
提出日時 | 2021-10-09 19:29:27 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 440 bytes |
コンパイル時間 | 347 ms |
コンパイル使用メモリ | 82,168 KB |
実行使用メモリ | 242,576 KB |
最終ジャッジ日時 | 2024-09-13 07:05:48 |
合計ジャッジ時間 | 22,015 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 3 |
other | WA * 32 TLE * 2 -- * 1 |
ソースコード
import sys input = sys.stdin.readline import bisect n,m,q = map(int,input().split()) ab = [list(map(int,input().split())) for _ in range(q)] ab.sort(key=lambda x:(x[0],-x[1])) def LIS(lst,weakly=False,max_value=float('inf')): f=bisect.bisect_right if weakly else bisect.bisect_left dp=[max_value]*(min(n,m)+1) for x in lst: i=f(dp,x) dp[i]=x res=bisect.bisect_left(dp,max_value) return res inf=1<<30