結果
問題 | No.1703 Much Matching |
ユーザー | lloyz |
提出日時 | 2023-07-31 01:26:15 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 327 bytes |
コンパイル時間 | 207 ms |
コンパイル使用メモリ | 82,708 KB |
実行使用メモリ | 241,808 KB |
最終ジャッジ日時 | 2024-04-18 02:29:16 |
合計ジャッジ時間 | 25,778 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 36 ms
57,600 KB |
testcase_01 | AC | 38 ms
52,096 KB |
testcase_02 | AC | 41 ms
51,968 KB |
testcase_03 | AC | 38 ms
52,608 KB |
testcase_04 | WA | - |
testcase_05 | AC | 38 ms
52,992 KB |
testcase_06 | WA | - |
testcase_07 | AC | 120 ms
78,720 KB |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | WA | - |
testcase_11 | WA | - |
testcase_12 | WA | - |
testcase_13 | WA | - |
testcase_14 | WA | - |
testcase_15 | WA | - |
testcase_16 | WA | - |
testcase_17 | AC | 905 ms
111,192 KB |
testcase_18 | WA | - |
testcase_19 | TLE | - |
testcase_20 | WA | - |
testcase_21 | TLE | - |
testcase_22 | WA | - |
testcase_23 | AC | 651 ms
100,992 KB |
testcase_24 | WA | - |
testcase_25 | WA | - |
testcase_26 | WA | - |
testcase_27 | AC | 995 ms
113,792 KB |
testcase_28 | WA | - |
testcase_29 | WA | - |
testcase_30 | WA | - |
testcase_31 | WA | - |
testcase_32 | WA | - |
testcase_33 | WA | - |
testcase_34 | WA | - |
testcase_35 | WA | - |
testcase_36 | TLE | - |
testcase_37 | -- | - |
ソースコード
from bisect import bisect_left n, m, q = map(int, input().split()) Q = [list(map(int, input().split())) for _ in range(q)] Q.sort(key=lambda x: (x[0], x[1])) LIS = [] for i in range(q): b = Q[i][1] idx = bisect_left(LIS, b) if idx == len(LIS): LIS.append(b) else: LIS[idx] = b print(len(LIS))