結果
| 問題 |
No.773 コンテスト
|
| コンテスト | |
| ユーザー |
情報学生
|
| 提出日時 | 2019-08-21 23:26:18 |
| 言語 | Haskell (9.10.1) |
| 結果 |
CE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 599 bytes |
| コンパイル時間 | 307 ms |
| コンパイル使用メモリ | 149,120 KB |
| 最終ジャッジ日時 | 2024-11-14 21:35:50 |
| 合計ジャッジ時間 | 726 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、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:3: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.
|
3 | import Data.Set (Set)
| ^^^^^^^^^^^^^^^^^^^^^
Main.hs:4: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.
|
4 | import qualified Data.Set as S
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ソースコード
import Control.Applicative ((<$>))
import Data.List (unfoldr)
import Data.Set (Set)
import qualified Data.Set as S
import Data.Char (isSpace)
import Data.ByteString.Char8 (ByteString)
import qualified Data.ByteString.Char8 as B
readIntList :: IO [Int]
readIntList = unfoldr f <$> B.getLine
where
f s = do
(n, s') <- B.readInt s
return (n, B.dropWhile isSpace s')
main :: IO ()
main = print =<< solve <$> readIntList
solve :: [Int] -> Int
solve [a, b] = S.size s
where
s = S.difference (S.fromDistinctAscList [23..25]) (S.fromDistinctAscList [a..b])
情報学生