結果

問題 No.1703 Much Matching
ユーザー NatsubiSoganNatsubiSogan
提出日時 2021-10-08 22:34:38
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 372 bytes
コンパイル時間 1,109 ms
コンパイル使用メモリ 87,100 KB
実行使用メモリ 165,560 KB
最終ジャッジ日時 2023-09-30 11:30:48
合計ジャッジ時間 26,499 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,636 KB
testcase_01 AC 71 ms
71,572 KB
testcase_02 AC 71 ms
71,436 KB
testcase_03 AC 72 ms
71,096 KB
testcase_04 AC 77 ms
75,724 KB
testcase_05 AC 76 ms
75,368 KB
testcase_06 AC 1,118 ms
124,108 KB
testcase_07 AC 123 ms
79,636 KB
testcase_08 AC 1,161 ms
127,100 KB
testcase_09 AC 1,373 ms
134,228 KB
testcase_10 AC 222 ms
84,648 KB
testcase_11 AC 305 ms
89,416 KB
testcase_12 AC 118 ms
79,276 KB
testcase_13 AC 523 ms
99,024 KB
testcase_14 AC 97 ms
78,124 KB
testcase_15 AC 262 ms
86,848 KB
testcase_16 AC 745 ms
108,016 KB
testcase_17 AC 844 ms
113,032 KB
testcase_18 AC 95 ms
77,516 KB
testcase_19 AC 1,872 ms
152,644 KB
testcase_20 AC 252 ms
86,608 KB
testcase_21 TLE -
testcase_22 AC 789 ms
111,516 KB
testcase_23 AC 603 ms
102,772 KB
testcase_24 AC 91 ms
76,580 KB
testcase_25 AC 134 ms
80,224 KB
testcase_26 AC 405 ms
93,400 KB
testcase_27 AC 908 ms
116,172 KB
testcase_28 AC 1,748 ms
149,788 KB
testcase_29 AC 327 ms
90,540 KB
testcase_30 AC 477 ms
96,940 KB
testcase_31 AC 114 ms
78,736 KB
testcase_32 AC 913 ms
115,912 KB
testcase_33 AC 603 ms
102,364 KB
testcase_34 AC 122 ms
79,468 KB
testcase_35 AC 205 ms
84,004 KB
testcase_36 TLE -
testcase_37 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

def main():
	import sys
	input = sys.stdin.buffer.readline
	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))
if __name__ == '__main__':
	main()
	
0