結果

問題 No.615 集合に分けよう
ユーザー ducktailducktail
提出日時 2017-12-15 23:36:34
言語 Scheme
(Gauche-0.9.14)
結果
AC  
実行時間 406 ms / 2,000 ms
コード長 296 bytes
コンパイル時間 532 ms
コンパイル使用メモリ 7,096 KB
実行使用メモリ 33,468 KB
最終ジャッジ日時 2023-08-21 06:50:19
合計ジャッジ時間 7,168 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
11,856 KB
testcase_01 AC 17 ms
11,764 KB
testcase_02 AC 18 ms
11,720 KB
testcase_03 AC 18 ms
11,872 KB
testcase_04 AC 17 ms
11,864 KB
testcase_05 AC 18 ms
11,672 KB
testcase_06 AC 17 ms
11,768 KB
testcase_07 AC 18 ms
11,928 KB
testcase_08 AC 18 ms
11,912 KB
testcase_09 AC 18 ms
11,816 KB
testcase_10 AC 18 ms
11,788 KB
testcase_11 AC 18 ms
11,924 KB
testcase_12 AC 17 ms
11,764 KB
testcase_13 AC 20 ms
12,036 KB
testcase_14 AC 22 ms
12,324 KB
testcase_15 AC 101 ms
17,728 KB
testcase_16 AC 404 ms
33,176 KB
testcase_17 AC 405 ms
33,364 KB
testcase_18 AC 406 ms
33,192 KB
testcase_19 AC 401 ms
33,272 KB
testcase_20 AC 403 ms
33,376 KB
testcase_21 AC 405 ms
33,376 KB
testcase_22 AC 401 ms
33,184 KB
testcase_23 AC 263 ms
30,480 KB
testcase_24 AC 382 ms
32,792 KB
testcase_25 AC 18 ms
11,860 KB
testcase_26 AC 17 ms
11,772 KB
testcase_27 AC 252 ms
30,412 KB
testcase_28 AC 251 ms
30,608 KB
testcase_29 AC 344 ms
33,336 KB
testcase_30 AC 347 ms
33,468 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

(define (main args)
  (let* ([n (read)]
         [k (read)]
         [_ (read-line)]
         [ls (map string->number (string-split (read-line) char-whitespace?))])
    (print
     (let ([sls (sort ls)])
       (apply + (drop (sort (map (lambda (x y) (- x y)) (cdr sls) sls) >) (- k 1))))))
  0)
0