結果

問題 No.277 根掘り葉掘り
ユーザー %20%20
提出日時 2018-07-30 06:05:57
言語 Perl
(5.38.2)
結果
AC  
実行時間 777 ms / 3,000 ms
コード長 191 bytes
コンパイル時間 358 ms
コンパイル使用メモリ 5,336 KB
実行使用メモリ 91,724 KB
最終ジャッジ日時 2023-09-28 12:32:26
合計ジャッジ時間 9,591 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
4,640 KB
testcase_01 AC 2 ms
4,624 KB
testcase_02 AC 3 ms
4,700 KB
testcase_03 AC 3 ms
4,620 KB
testcase_04 AC 3 ms
4,568 KB
testcase_05 AC 3 ms
4,680 KB
testcase_06 AC 3 ms
4,572 KB
testcase_07 AC 3 ms
4,536 KB
testcase_08 AC 3 ms
4,568 KB
testcase_09 AC 648 ms
87,068 KB
testcase_10 AC 634 ms
91,724 KB
testcase_11 AC 717 ms
88,412 KB
testcase_12 AC 747 ms
88,932 KB
testcase_13 AC 777 ms
88,768 KB
testcase_14 AC 724 ms
88,816 KB
testcase_15 AC 687 ms
88,444 KB
testcase_16 AC 718 ms
88,768 KB
testcase_17 AC 684 ms
88,564 KB
testcase_18 AC 684 ms
88,488 KB
testcase_19 AC 688 ms
88,572 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #

$N=<>;
/ /,++$_[$`],++$_[$'],push@{$`},$'+!push@{$'+0},$`for<>;
@q=(1,grep!($L[$_]=$_[$_]-1&&$N),2..$N);
push@q,grep{$L[$_]-=$-=$L[$_]-$L[$q]-1;$-}@$q while$q=shift@q;
print$_,$/for@L[1..$N]
0