結果

問題 No.615 集合に分けよう
ユーザー %20%20
提出日時 2017-12-15 00:11:39
言語 Perl
(5.38.2)
結果
AC  
実行時間 201 ms / 2,000 ms
コード長 113 bytes
コンパイル時間 576 ms
コンパイル使用メモリ 5,428 KB
実行使用メモリ 20,988 KB
最終ジャッジ日時 2023-08-21 05:00:14
合計ジャッジ時間 4,169 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 6 ms
5,220 KB
testcase_01 AC 6 ms
5,220 KB
testcase_02 AC 6 ms
5,180 KB
testcase_03 AC 5 ms
5,188 KB
testcase_04 AC 6 ms
5,064 KB
testcase_05 AC 6 ms
5,092 KB
testcase_06 AC 6 ms
5,268 KB
testcase_07 AC 7 ms
5,172 KB
testcase_08 AC 6 ms
5,096 KB
testcase_09 AC 6 ms
5,224 KB
testcase_10 AC 6 ms
5,188 KB
testcase_11 AC 6 ms
5,212 KB
testcase_12 AC 6 ms
5,064 KB
testcase_13 AC 8 ms
5,216 KB
testcase_14 AC 10 ms
5,376 KB
testcase_15 AC 43 ms
8,160 KB
testcase_16 AC 184 ms
19,344 KB
testcase_17 AC 197 ms
20,232 KB
testcase_18 AC 198 ms
20,220 KB
testcase_19 AC 197 ms
20,216 KB
testcase_20 AC 201 ms
19,844 KB
testcase_21 AC 196 ms
19,300 KB
testcase_22 AC 194 ms
19,380 KB
testcase_23 AC 130 ms
20,988 KB
testcase_24 AC 197 ms
19,996 KB
testcase_25 AC 6 ms
5,096 KB
testcase_26 AC 6 ms
5,136 KB
testcase_27 AC 111 ms
20,544 KB
testcase_28 AC 112 ms
20,616 KB
testcase_29 AC 117 ms
19,940 KB
testcase_30 AC 114 ms
19,500 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #

($N,$K)=glob<>;
@a=sort{$a<=>$b}glob<>;
$%+=$_ for(sort{$a<=>$b}map$a[$_+1]-$a[$_],0..$N-2)[0..$N-$K-1];
print$%
0