結果

問題 No.664 超能力者Aと株価予測
ユーザー tailstails
提出日時 2018-03-10 00:28:21
言語 Perl
(5.38.2)
結果
AC  
実行時間 1,736 ms / 4,000 ms
コード長 300 bytes
コンパイル時間 38 ms
コンパイル使用メモリ 6,688 KB
実行使用メモリ 7,040 KB
最終ジャッジ日時 2024-04-19 06:10:09
合計ジャッジ時間 7,162 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 14 ms
6,144 KB
testcase_01 AC 16 ms
5,888 KB
testcase_02 AC 34 ms
6,144 KB
testcase_03 AC 10 ms
6,016 KB
testcase_04 AC 9 ms
6,016 KB
testcase_05 AC 8 ms
6,016 KB
testcase_06 AC 152 ms
6,272 KB
testcase_07 AC 143 ms
6,272 KB
testcase_08 AC 883 ms
6,912 KB
testcase_09 AC 203 ms
5,888 KB
testcase_10 AC 847 ms
6,400 KB
testcase_11 AC 1,394 ms
6,784 KB
testcase_12 AC 1,736 ms
7,040 KB
testcase_13 AC 1,052 ms
6,656 KB
testcase_14 AC 15 ms
6,016 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Name "main::n" used only once: possible typo at Main.pl line 3.
Main.pl syntax OK

ソースコード

diff #

sub max{$_[$_[0]<$_[1]]}

($n,$m,$k)=glob<>;
$b{0,300}=$k;

for(<>){
	$_+=0;
	for$i(0..$m-1){
		for$j($_..300){
			$b{$i,$_}=max($b{$i,$_},$b{$i,$j});
		}
	}
	%c=%b;
	for$i(0..$m-1){
		for$j(100..$_){
			$k=max($k,$b{$i+1,300}=max($b{$i+1,300},int($c{$i,$j}/$j)*$_+$c{$i,$j}%$j));
		}
	}
}
print $k;
0