結果
問題 | No.1 道のショートカット |
ユーザー | Snark86 |
提出日時 | 2016-04-26 11:57:54 |
言語 | Python2 (2.7.18) |
結果 |
MLE
|
実行時間 | - |
コード長 | 480 bytes |
コンパイル時間 | 476 ms |
コンパイル使用メモリ | 6,704 KB |
実行使用メモリ | 571,720 KB |
最終ジャッジ日時 | 2023-09-22 12:43:05 |
合計ジャッジ時間 | 7,907 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge14 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 11 ms
10,332 KB |
testcase_01 | AC | 11 ms
5,944 KB |
testcase_02 | AC | 11 ms
5,856 KB |
testcase_03 | AC | 11 ms
5,968 KB |
testcase_04 | AC | 11 ms
5,944 KB |
testcase_05 | AC | 11 ms
6,020 KB |
testcase_06 | AC | 11 ms
5,900 KB |
testcase_07 | AC | 11 ms
6,068 KB |
testcase_08 | AC | 26 ms
7,044 KB |
testcase_09 | AC | 14 ms
6,184 KB |
testcase_10 | AC | 45 ms
9,036 KB |
testcase_11 | MLE | - |
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 | -- | - |
testcase_33 | -- | - |
testcase_34 | -- | - |
testcase_35 | -- | - |
testcase_36 | -- | - |
testcase_37 | -- | - |
testcase_38 | -- | - |
testcase_39 | -- | - |
testcase_40 | -- | - |
testcase_41 | -- | - |
testcase_42 | -- | - |
testcase_43 | -- | - |
ソースコード
n = int(raw_input()) c = int(raw_input()) v = int(raw_input()) s = map(int, raw_input().split()) t = map(int, raw_input().split()) y = map(int, raw_input().split()) m = map(int, raw_input().split()) a = [[] for _ in range(n)] b = sorted([[s[i]-1,t[i]-1,y[i],m[i]] for i in range(v)]) a[0].append([c,0]) for bi in b: for ai in a[bi[0]]: if ai[0]-bi[2] >= 0: a[bi[1]].append([ai[0]-bi[2],ai[1]+bi[3]]) ans = -1 if a[-1]: ans = sorted(a[-1],key=lambda x:x[1])[0][1] print ans