結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
6,820 KB
testcase_01 AC 15 ms
6,940 KB
testcase_02 AC 31 ms
6,944 KB
testcase_03 AC 9 ms
6,940 KB
testcase_04 AC 8 ms
6,944 KB
testcase_05 AC 8 ms
6,940 KB
testcase_06 AC 148 ms
6,944 KB
testcase_07 AC 139 ms
6,944 KB
testcase_08 AC 816 ms
6,940 KB
testcase_09 AC 192 ms
6,940 KB
testcase_10 AC 796 ms
6,940 KB
testcase_11 AC 1,298 ms
6,940 KB
testcase_12 AC 1,591 ms
6,944 KB
testcase_13 AC 970 ms
6,940 KB
testcase_14 AC 16 ms
6,940 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});
		}
		for$j(100..$_){
			$k=max($k,$b{$i+1,300}=max($b{$i+1,300},int($b{$i,$j}/$j)*$_+$b{$i,$j}%$j));
		}
	}
}
print $k;
0