結果
| 問題 | No.1380 Borderline |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-02-07 20:54:30 |
| 言語 | Haskell (9.10.1) |
| 結果 |
CE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 3,092 bytes |
| 記録 | |
| コンパイル時間 | 4,090 ms |
| コンパイル使用メモリ | 157,056 KB |
| 最終ジャッジ日時 | 2024-07-05 17:03:52 |
| 合計ジャッジ時間 | 4,380 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
コンパイルメッセージ
Loaded package environment from /home/judge/.ghc/x86_64-linux-9.8.2/environments/default
[1 of 2] Compiling Main ( Main.hs, Main.o )
Main.hs:68:1: error: [GHC-87110]
Could not load module ‘Data.Set’.
It is a member of the hidden package ‘containers-0.6.8’.
Use -v to see a list of the files searched for.
|
68 | import qualified Data.Set as S
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ソースコード
{-# LANGUAGE
BangPatterns
, BlockArguments
, DataKinds
, DeriveGeneric
, DerivingStrategies
, DerivingVia
, FlexibleContexts
, FlexibleInstances
, FunctionalDependencies
, GADTs
, GeneralizedNewtypeDeriving
, KindSignatures
, LambdaCase
, MultiParamTypeClasses
, MultiWayIf
, NPlusKPatterns
, NamedFieldPuns
, NegativeLiterals
, OverloadedLabels
, OverloadedStrings
, ParallelListComp
, PolyKinds
, RankNTypes
, RecordWildCards
, ScopedTypeVariables
, StrictData
, TupleSections
, TypeApplications
, TypeFamilies
, TypeOperators
, UndecidableInstances
, ViewPatterns
#-}
module Main where
import Control.Applicative
import Control.Arrow
import Control.Monad
import Control.Monad.ST
import qualified Data.ByteString.Char8 as BS
import Data.Char
import Data.Foldable
import Data.Functor
import Data.Int
import Data.List
import Data.Maybe
import Data.Monoid
import Data.Ord
import Data.Semigroup ( Max(..)
, Min(..)
, All(..)
, Arg(..)
)
import Data.Ratio
-- import Data.Vector.Unboxing.Mutable ( Unboxable )
-- import qualified Data.Vector.Unboxing.Mutable as V
import System.IO
import Data.Proxy
import GHC.TypeLits
import GHC.Generics ( Generic )
import Data.Function
-- import Data.List.HT ( mapAdjacent
-- , isAscending
-- )
-- import Control.Monad.Primitive ( PrimMonad(PrimState) )
import qualified Data.Set as S
-- import qualified Data.Vector.Algorithms.Radix as VA
-- import Text.Parsec.ByteString
import GHC.OverloadedLabels
-- import Control.Monad.Extra
-- #if defined(LOCAL_ZER0STAR)
-- {-# ANN module ("Hlint: ignore Unused LANGUAGE pragma" :: String) #-}
-- {-# ANN module ("Hlint: ignore Reduce duplication" :: String) #-}
-- #endif
twice :: (a -> a -> b) -> a -> b
twice f x = f x x
both :: Arrow a => a b c -> a (b, b) (c, c)
both = twice (***)
both2 f (a1, b1) (a2, b2) = (f a1 a2, f b1 b2)
readsLn :: Read a => IO [a]
readsLn = mapM readIO . words =<< getLine
getInt :: IO Int
getInt = fst . fromJust . BS.readInt <$> BS.getLine
getInts :: IO [Int]
getInts = map (fst . fromJust . BS.readInt) . BS.words <$> BS.getLine
getInteger :: IO Integer
getInteger = fst . fromJust . BS.readInteger <$> BS.getLine
getIntegers :: IO [Integer]
getIntegers = map (fst . fromJust . BS.readInteger) . BS.words <$> BS.getLine
main = do
[n, k] <- getInts
p <- getInts
print
. maximum
. filter (<= k)
. map (length . flip filter p . (<=))
$ [0 .. 401]