結果
問題 | No.1767 BLUE to RED |
ユーザー |
![]() |
提出日時 | 2021-11-30 17:04:24 |
言語 | Perl (5.40.0) |
結果 |
AC
|
実行時間 | 1,991 ms / 2,000 ms |
コード長 | 203 bytes |
コンパイル時間 | 577 ms |
コンパイル使用メモリ | 6,016 KB |
実行使用メモリ | 72,292 KB |
最終ジャッジ日時 | 2024-07-03 12:26:31 |
合計ジャッジ時間 | 21,923 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 21 |
コンパイルメッセージ
Unquoted string "a" may clash with future reserved word at Main.pl line 2. Unquoted string "c" may clash with future reserved word at Main.pl line 2. Name "main::b" used only once: possible typo at Main.pl line 4. Name "main::c" used only once: possible typo at Main.pl line 4. Main.pl syntax OK
ソースコード
sub f{$y=$x<$y+$d?$x:$y+$d;} @$_=glob<>.2e9for a..c; $p=-2e9; while($u=$b[$i],$v=$c[$j]){ if($u<$v){ f$d=$u-$p; $x=$y; $p=$u; ++$i; }else{ f$d=$v-$p; $x+=$d; $p=$v; ++$j; } } print$y;