結果

問題 No.1703 Much Matching
ユーザー tamatotamato
提出日時 2021-10-08 22:14:52
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 552 bytes
コンパイル時間 262 ms
コンパイル使用メモリ 87,344 KB
実行使用メモリ 165,016 KB
最終ジャッジ日時 2023-09-30 10:36:19
合計ジャッジ時間 21,992 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 80 ms
71,880 KB
testcase_01 AC 74 ms
71,764 KB
testcase_02 AC 74 ms
71,840 KB
testcase_03 AC 76 ms
71,592 KB
testcase_04 AC 81 ms
76,296 KB
testcase_05 AC 75 ms
71,764 KB
testcase_06 AC 941 ms
123,392 KB
testcase_07 AC 127 ms
78,856 KB
testcase_08 AC 983 ms
124,400 KB
testcase_09 AC 1,145 ms
131,436 KB
testcase_10 AC 207 ms
83,092 KB
testcase_11 AC 282 ms
86,096 KB
testcase_12 AC 121 ms
79,100 KB
testcase_13 AC 432 ms
93,140 KB
testcase_14 AC 98 ms
77,056 KB
testcase_15 AC 252 ms
84,984 KB
testcase_16 AC 580 ms
100,836 KB
testcase_17 AC 717 ms
109,624 KB
testcase_18 AC 95 ms
76,996 KB
testcase_19 AC 1,496 ms
157,948 KB
testcase_20 AC 230 ms
85,244 KB
testcase_21 AC 1,794 ms
165,016 KB
testcase_22 AC 666 ms
104,888 KB
testcase_23 AC 507 ms
96,824 KB
testcase_24 AC 94 ms
77,144 KB
testcase_25 AC 136 ms
79,552 KB
testcase_26 AC 361 ms
89,552 KB
testcase_27 AC 733 ms
109,496 KB
testcase_28 AC 1,451 ms
149,404 KB
testcase_29 AC 306 ms
87,612 KB
testcase_30 AC 414 ms
91,540 KB
testcase_31 AC 115 ms
78,920 KB
testcase_32 AC 757 ms
108,760 KB
testcase_33 AC 538 ms
100,432 KB
testcase_34 AC 125 ms
79,036 KB
testcase_35 AC 187 ms
82,176 KB
testcase_36 TLE -
testcase_37 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

mod = 1000000007
eps = 10**-9


def main():
    import sys
    from bisect import bisect_left
    input = sys.stdin.readline

    N, M, Q = map(int, input().split())
    XY = []
    for _ in range(Q):
        XY.append(tuple(map(int, input().split())))

    XY.sort(key=lambda x: x[1], reverse=True)
    XY.sort(key=lambda x: x[0])

    LIS = [0]
    for _, y in XY:
        j = bisect_left(LIS, y)
        if j == len(LIS):
            LIS.append(y)
        else:
            LIS[j] = y
    print(len(LIS) - 1)


if __name__ == '__main__':
    main()
0