結果

問題 No.1703 Much Matching
ユーザー 👑 rin204rin204
提出日時 2022-01-23 01:07:30
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 306 bytes
コンパイル時間 701 ms
コンパイル使用メモリ 82,300 KB
実行使用メモリ 302,176 KB
最終ジャッジ日時 2024-11-28 10:43:10
合計ジャッジ時間 27,018 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 42 ms
60,308 KB
testcase_01 AC 42 ms
52,508 KB
testcase_02 AC 41 ms
53,028 KB
testcase_03 AC 43 ms
52,424 KB
testcase_04 AC 50 ms
60,192 KB
testcase_05 AC 43 ms
52,808 KB
testcase_06 AC 1,309 ms
121,868 KB
testcase_07 AC 128 ms
78,948 KB
testcase_08 AC 1,381 ms
122,816 KB
testcase_09 AC 1,624 ms
131,608 KB
testcase_10 AC 247 ms
83,412 KB
testcase_11 AC 347 ms
88,044 KB
testcase_12 AC 125 ms
77,840 KB
testcase_13 AC 618 ms
97,556 KB
testcase_14 AC 90 ms
76,964 KB
testcase_15 AC 292 ms
85,644 KB
testcase_16 AC 836 ms
105,848 KB
testcase_17 AC 986 ms
110,828 KB
testcase_18 AC 93 ms
77,160 KB
testcase_19 TLE -
testcase_20 AC 276 ms
84,868 KB
testcase_21 TLE -
testcase_22 AC 949 ms
109,508 KB
testcase_23 AC 710 ms
101,252 KB
testcase_24 AC 88 ms
76,704 KB
testcase_25 AC 145 ms
79,356 KB
testcase_26 AC 469 ms
91,644 KB
testcase_27 AC 1,111 ms
113,852 KB
testcase_28 TLE -
testcase_29 AC 376 ms
89,068 KB
testcase_30 AC 560 ms
95,860 KB
testcase_31 AC 111 ms
77,348 KB
testcase_32 AC 1,096 ms
113,560 KB
testcase_33 AC 704 ms
100,672 KB
testcase_34 AC 126 ms
77,884 KB
testcase_35 AC 217 ms
82,856 KB
testcase_36 TLE -
testcase_37 AC 62 ms
302,176 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from bisect import bisect_left

n, m, q = map(int, input().split())
xy = [list(map(int, input().split())) for _ in range(q)]
xy.sort(key = lambda x:(x[0], -x[1]))
lst = []

for _, y in xy:
    p = bisect_left(lst, y)
    if p == len(lst):
        lst.append(y)
    else:
        lst[p] = y

print(len(lst))
0