結果

問題 No.496 ワープクリスタル (給料日前編)
ユーザー TawaraTawara
提出日時 2016-03-07 22:38:02
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 231 bytes
コンパイル時間 42 ms
コンパイル使用メモリ 7,084 KB
実行使用メモリ 6,732 KB
最終ジャッジ日時 2023-10-24 18:38:43
合計ジャッジ時間 2,222 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 9 ms
6,420 KB
testcase_02 WA -
testcase_03 AC 9 ms
6,420 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 11 ms
6,732 KB
testcase_07 AC 10 ms
6,420 KB
testcase_08 WA -
testcase_09 AC 242 ms
6,488 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 16 ms
6,440 KB
testcase_14 AC 22 ms
6,424 KB
testcase_15 AC 15 ms
6,488 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 21 ms
6,488 KB
testcase_19 WA -
testcase_20 AC 17 ms
6,576 KB
testcase_21 WA -
testcase_22 AC 72 ms
6,732 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

R=xrange;I=lambda:map(int,raw_input().split())
W,H,N,F=I()
dp=[[F*(i+j) for j in R(W+1)]for i in R(H+1)]
for t in R(N):
	x,y,c = I()
	for i in R(H,y,-1):
		for j in R(W,x,-1):
			dp[i][j]=min(dp[i][j],dp[i-y][j-x]+c)
print dp[H][W]
0