結果

問題 No.1703 Much Matching
ユーザー NatsubiSoganNatsubiSogan
提出日時 2021-10-08 22:33:02
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 270 bytes
コンパイル時間 388 ms
コンパイル使用メモリ 87,116 KB
実行使用メモリ 241,336 KB
最終ジャッジ日時 2023-09-30 11:27:33
合計ジャッジ時間 27,746 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
76,104 KB
testcase_01 AC 73 ms
71,636 KB
testcase_02 AC 73 ms
71,484 KB
testcase_03 AC 74 ms
71,432 KB
testcase_04 AC 82 ms
75,492 KB
testcase_05 AC 77 ms
75,408 KB
testcase_06 AC 1,278 ms
125,368 KB
testcase_07 AC 152 ms
80,216 KB
testcase_08 AC 1,355 ms
126,624 KB
testcase_09 AC 1,579 ms
135,696 KB
testcase_10 AC 264 ms
85,476 KB
testcase_11 AC 362 ms
89,604 KB
testcase_12 AC 144 ms
79,600 KB
testcase_13 AC 604 ms
99,588 KB
testcase_14 AC 118 ms
78,440 KB
testcase_15 AC 308 ms
87,336 KB
testcase_16 AC 840 ms
108,316 KB
testcase_17 AC 977 ms
113,632 KB
testcase_18 AC 114 ms
78,084 KB
testcase_19 TLE -
testcase_20 AC 297 ms
87,412 KB
testcase_21 TLE -
testcase_22 AC 929 ms
112,116 KB
testcase_23 AC 710 ms
103,204 KB
testcase_24 AC 114 ms
78,012 KB
testcase_25 AC 165 ms
81,052 KB
testcase_26 AC 473 ms
94,172 KB
testcase_27 AC 1,056 ms
116,868 KB
testcase_28 TLE -
testcase_29 AC 390 ms
91,052 KB
testcase_30 AC 557 ms
97,676 KB
testcase_31 AC 132 ms
78,688 KB
testcase_32 AC 1,060 ms
116,468 KB
testcase_33 AC 701 ms
103,168 KB
testcase_34 AC 144 ms
79,440 KB
testcase_35 AC 244 ms
84,336 KB
testcase_36 TLE -
testcase_37 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

n, m, q = map(int, input().split())
ab = [list(map(int, input().split())) for i in range(q)]
ab.sort(key=lambda x: (x[0], -x[1]))
INF = 10 ** 9
from bisect import bisect_left
dp = [INF] * (q + 1)
for a, b in ab:
    dp[bisect_left(dp, b)] = b
print(bisect_left(dp, INF))
0