結果
問題 | No.1703 Much Matching |
ユーザー | kohei2019 |
提出日時 | 2023-06-04 18:17:19 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 387 bytes |
コンパイル時間 | 343 ms |
コンパイル使用メモリ | 86,980 KB |
実行使用メモリ | 215,648 KB |
最終ジャッジ日時 | 2023-08-28 08:18:58 |
合計ジャッジ時間 | 12,348 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge14 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 67 ms
71,180 KB |
testcase_01 | AC | 66 ms
71,204 KB |
testcase_02 | AC | 65 ms
71,332 KB |
testcase_03 | AC | 82 ms
76,500 KB |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | RE | - |
testcase_07 | RE | - |
testcase_08 | RE | - |
testcase_09 | RE | - |
testcase_10 | RE | - |
testcase_11 | RE | - |
testcase_12 | RE | - |
testcase_13 | RE | - |
testcase_14 | RE | - |
testcase_15 | RE | - |
testcase_16 | RE | - |
testcase_17 | RE | - |
testcase_18 | RE | - |
testcase_19 | RE | - |
testcase_20 | RE | - |
testcase_21 | RE | - |
testcase_22 | RE | - |
testcase_23 | RE | - |
testcase_24 | RE | - |
testcase_25 | RE | - |
testcase_26 | RE | - |
testcase_27 | RE | - |
testcase_28 | RE | - |
testcase_29 | RE | - |
testcase_30 | RE | - |
testcase_31 | RE | - |
testcase_32 | RE | - |
testcase_33 | RE | - |
testcase_34 | RE | - |
testcase_35 | RE | - |
testcase_36 | AC | 923 ms
215,648 KB |
testcase_37 | AC | 124 ms
85,568 KB |
ソースコード
N,M,Q = map(int,input().split()) lsAB = [set() for i in range(N+1)] for i in range(Q): a,b = map(int,input().split()) lsAB[a].add(b) dp = [[0]*(N+1) for j in range(M+1)] for i in range(1,N+1): for j in range(1,M+1): if j in lsAB[i]: dp[i][j] = max(dp[i-1][j]+1,dp[i][j-1]) else: dp[i][j] = max(dp[i-1][j],dp[i][j-1]) print(dp[-1][-1])