結果
| 問題 | No.664 超能力者Aと株価予測 | 
| コンテスト | |
| ユーザー |  tails | 
| 提出日時 | 2018-03-10 00:21:44 | 
| 言語 | Perl (5.40.0) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 296 bytes | 
| コンパイル時間 | 407 ms | 
| コンパイル使用メモリ | 5,888 KB | 
| 実行使用メモリ | 7,040 KB | 
| 最終ジャッジ日時 | 2024-10-10 22:35:43 | 
| 合計ジャッジ時間 | 10,235 ms | 
| ジャッジサーバーID (参考情報) | judge3 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 10 WA * 5 | 
コンパイルメッセージ
Name "main::n" used only once: possible typo at Main.pl line 3. Name "main::m" used only once: possible typo at Main.pl line 3. Main.pl syntax OK
ソースコード
sub max{$_[$_[0]<$_[1]]}
($n,$m,$k)=glob<>;
$b{0,300}=$k;
for(<>){
	$_+=0;
	for$i(0..19){
		for$j($_..300){
			$b{$i,$_}=max($b{$i,$_},$b{$i,$j});
		}
	}
	%c=%b;
	for$i(0..19){
		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;
            
            
            
        