結果
問題 | No.2424 Josouzai |
ユーザー |
|
提出日時 | 2023-08-20 17:32:04 |
言語 | Haskell (9.10.1) |
結果 |
AC
|
実行時間 | 68 ms / 2,000 ms |
コード長 | 572 bytes |
コンパイル時間 | 10,733 ms |
コンパイル使用メモリ | 180,912 KB |
実行使用メモリ | 24,992 KB |
最終ジャッジ日時 | 2024-11-30 21:00:53 |
合計ジャッジ時間 | 13,113 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 33 |
コンパイルメッセージ
Loaded package environment from /home/judge/.ghc/x86_64-linux-9.8.2/environments/default [1 of 2] Compiling Main ( Main.hs, Main.o ) [2 of 2] Linking a.out
ソースコード
importControl.ApplicativeimportControl.MonadimportData.ByteString.CharByteStringimportqualifiedData.ByteString.CharasBimportData.ListimportData.CharisSpacemain::IO()main = do[n, k] <- funwords <$> map show <$> solve k <$> f >>= putStrLnwheref = readil B.readInt <$> B.getLinesolve::Int->Int->Intsolve k as = [length l, k - last l]wherel = takeWhile (<= k) $ scanl1 (+) $ sort asreadil::Integrala=>ByteString->MaybeaByteString->ByteString->areadil f = unfoldr $ f . B.dropWhile isSpace