結果
問題 | No.949 飲酒プログラミングコンテスト |
ユーザー | Leonardone |
提出日時 | 2019-12-12 21:48:24 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 650 bytes |
コンパイル時間 | 638 ms |
コンパイル使用メモリ | 10,884 KB |
実行使用メモリ | 10,424 KB |
最終ジャッジ日時 | 2023-09-08 00:26:51 |
合計ジャッジ時間 | 5,651 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 16 ms
8,024 KB |
testcase_01 | AC | 15 ms
8,000 KB |
testcase_02 | AC | 15 ms
7,888 KB |
testcase_03 | AC | 15 ms
7,876 KB |
testcase_04 | AC | 16 ms
7,852 KB |
testcase_05 | AC | 19 ms
8,392 KB |
testcase_06 | AC | 18 ms
8,328 KB |
testcase_07 | AC | 29 ms
8,680 KB |
testcase_08 | AC | 82 ms
10,424 KB |
testcase_09 | AC | 33 ms
8,920 KB |
testcase_10 | AC | 46 ms
9,388 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 = [int(i) for i in input().split()] b = [int(i) for i in input().split()] d = [int(i) for i in input().split()] d.sort() n1 = n+1 es = [[] for i in range(n1)] for i in range(n1): for j in range(n1): p = i + j if p <= n: es[p].append(i*n1+j) m = [0] * (n1*n1) for p in range(n,0,-1): for e in es[p]: i = e // n1 j = e % n1 s = m[e] r = a[i] + b[j] if s < n and d[s] <= r: s += 1 u = e - 1 if u >= 0 and s > m[u]: m[u] = s v = e - n1 if v >= 0 and s > m[v]: m[v] = s print(m[0])