結果
問題 | No.949 飲酒プログラミングコンテスト |
ユーザー | seica_at_se |
提出日時 | 2019-12-12 00:42:38 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 596 bytes |
コンパイル時間 | 207 ms |
コンパイル使用メモリ | 10,800 KB |
実行使用メモリ | 93,064 KB |
最終ジャッジ日時 | 2023-09-06 13:38:49 |
合計ジャッジ時間 | 10,660 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 494 ms
84,928 KB |
testcase_01 | AC | 495 ms
84,744 KB |
testcase_02 | AC | 498 ms
84,792 KB |
testcase_03 | AC | 500 ms
84,724 KB |
testcase_04 | AC | 497 ms
84,708 KB |
testcase_05 | AC | 503 ms
84,740 KB |
testcase_06 | AC | 502 ms
84,876 KB |
testcase_07 | AC | 520 ms
84,756 KB |
testcase_08 | AC | 607 ms
84,876 KB |
testcase_09 | AC | 526 ms
84,760 KB |
testcase_10 | AC | 538 ms
84,868 KB |
testcase_11 | TLE | - |
testcase_12 | -- | - |
testcase_13 | -- | - |
testcase_14 | -- | - |
testcase_15 | -- | - |
testcase_16 | -- | - |
testcase_17 | -- | - |
testcase_18 | -- | - |
testcase_19 | -- | - |
testcase_20 | -- | - |
testcase_21 | -- | - |
testcase_22 | -- | - |
testcase_23 | -- | - |
testcase_24 | -- | - |
testcase_25 | -- | - |
testcase_26 | -- | - |
testcase_27 | -- | - |
testcase_28 | -- | - |
testcase_29 | -- | - |
testcase_30 | -- | - |
testcase_31 | -- | - |
testcase_32 | -- | - |
ソースコード
n = int(input()) a = list(map(int, input().split())) a.reverse() b = list(map(int, input().split())) b.reverse() d = list(map(int, input().split())) d.sort() dp = [[0 for i in range(3003)] for j in range(3003)] for i in range(n+1): for j in range(n+1): #print(i, j) if i > 0: dp[i][j] = max(dp[i][j], dp[i-1][j]) if j > 0: dp[i][j] = max(dp[i][j], dp[i][j-1]) if dp[i][j] == n: continue if i == n and j == n: continue if a[i] + b[j] >= d[dp[i][j]]: dp[i][j] += 1 print(dp[n][n])