結果

問題 No.10 +か×か
ユーザー %20%20
提出日時 2017-07-09 17:53:55
言語 Perl
(5.38.2)
結果
WA  
実行時間 -
コード長 256 bytes
コンパイル時間 452 ms
コンパイル使用メモリ 5,760 KB
実行使用メモリ 297,472 KB
最終ジャッジ日時 2024-04-16 11:08:24
合計ジャッジ時間 9,048 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 9 ms
6,016 KB
testcase_01 AC 9 ms
5,888 KB
testcase_02 AC 9 ms
5,888 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 8 ms
5,888 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 423 ms
25,856 KB
testcase_10 AC 12 ms
6,944 KB
testcase_11 AC 8 ms
6,944 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #

$N=<>;
$T=<>;
@A=glob<>;
$d[0][$A[0]]='';
for$i(1..$N-1){
	for$v(reverse 1..$T){
		$d[$i][$v*$A[$i]]="$d[$i-1][$v]*"if defined$d[$i-1][$v] && $v*$A[$i]<=$T;
		$d[$i][$v+$A[$i]]="$d[$i-1][$v]+"if defined$d[$i-1][$v] && $v+$A[$i]<=$T;
	}
}
print$d[$N-1][$T]
0