結果

問題 No.527 ナップサック容量問題
コンテスト
ユーザー %20
提出日時 2018-05-31 20:24:26
言語 Perl
(5.42.1)
コンパイル:
perl -cw _filename_
実行:
perl -X _filename_
結果
AC  
実行時間 983 ms / 2,000 ms
+ 794µs
コード長 128 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 5 ms
コンパイル使用メモリ 5,888 KB
実行使用メモリ 9,088 KB
最終ジャッジ日時 2026-08-02 07:38:58
合計ジャッジ時間 11,509 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 37
権限があれば一括ダウンロードができます
コンパイルメッセージ
Unquoted string "a" may clash with future reserved word at Main.pl line 1.
Unquoted string "c" may clash with future reserved word at Main.pl line 1.
Useless use of a variable in void context at Main.pl line 1.
Unquoted string "inf" may clash with future reserved word at Main.pl line 1.
Main.pl syntax OK

ソースコード

diff #
raw source code

<>;/ /?map$d[$_+$']+=$-=$d[$_]+$`-$d[$_+$'],sort{1}0..@d:${/^/;${(a..c)[$_<=>$']}||=$i-1,$i++for@d}for<>;print$a+1||1,$/,$b||inf
0