結果

問題 No.156 キャンディー・ボックス
ユーザー regeregeregerege
提出日時 2016-06-26 20:24:34
言語 F#
(.NET 7)
結果
AC  
実行時間 98 ms / 2,000 ms
コード長 243 bytes
コンパイル時間 5,442 ms
コンパイル使用メモリ 154,524 KB
実行使用メモリ 25,320 KB
最終ジャッジ日時 2023-09-19 03:11:18
合計ジャッジ時間 9,855 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 96 ms
23,280 KB
testcase_01 AC 96 ms
25,276 KB
testcase_02 AC 95 ms
23,136 KB
testcase_03 AC 95 ms
21,164 KB
testcase_04 AC 95 ms
23,292 KB
testcase_05 AC 97 ms
23,368 KB
testcase_06 AC 97 ms
23,228 KB
testcase_07 AC 96 ms
23,128 KB
testcase_08 AC 96 ms
23,380 KB
testcase_09 AC 96 ms
25,236 KB
testcase_10 AC 98 ms
25,240 KB
testcase_11 AC 97 ms
25,320 KB
testcase_12 AC 95 ms
21,300 KB
testcase_13 AC 96 ms
23,208 KB
testcase_14 AC 97 ms
25,256 KB
testcase_15 AC 97 ms
23,196 KB
testcase_16 AC 97 ms
23,296 KB
testcase_17 AC 98 ms
25,248 KB
testcase_18 AC 96 ms
23,212 KB
testcase_19 AC 96 ms
23,316 KB
testcase_20 AC 97 ms
23,304 KB
testcase_21 AC 97 ms
23,284 KB
testcase_22 AC 96 ms
23,320 KB
testcase_23 AC 96 ms
23,188 KB
testcase_24 AC 92 ms
25,052 KB
testcase_25 AC 92 ms
23,120 KB
testcase_26 AC 95 ms
21,256 KB
testcase_27 AC 96 ms
23,272 KB
testcase_28 AC 96 ms
23,172 KB
testcase_29 AC 98 ms
23,144 KB
testcase_30 AC 97 ms
23,276 KB
testcase_31 AC 95 ms
21,324 KB
testcase_32 AC 96 ms
25,228 KB
testcase_33 AC 95 ms
23,216 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) F# Compiler version 11.0.0.0 for F# 5.0
Copyright (c) Microsoft Corporation. All Rights Reserved.

ソースコード

diff #

let I() = stdin.ReadLine().Split(' ') |> Array.map int
let N,M = let a = I() in a.[0],a.[1]
I() |> Seq.sort
|> Seq.scan (fun (c,s) n -> if M>=s+n then c+1,s+n else c,M+1) (0,0)
|> Seq.takeWhile (snd>>((>=)M))
|> Seq.last |> fst
|> printfn "%d"
0