結果
| 問題 |
No.779 Heisei
|
| コンテスト | |
| ユーザー |
torus711
|
| 提出日時 | 2019-01-26 14:00:51 |
| 言語 | Haskell (9.10.1) |
| 結果 |
CE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 951 bytes |
| コンパイル時間 | 331 ms |
| コンパイル使用メモリ | 151,424 KB |
| 最終ジャッジ日時 | 2024-11-14 20:48:07 |
| 合計ジャッジ時間 | 742 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、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:25:1: error: [GHC-87110]
Could not load module ‘Data.Time.Calendar’.
It is a member of the hidden package ‘time-1.12.2’.
Use -v to see a list of the files searched for.
|
25 | import Data.Time.Calendar
| ^^^^^^^^^^^^^^^^^^^^^^^^^
ソースコード
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE BinaryLiterals #-}
{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE NumDecimals #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TupleSections #-}
import Control.Applicative
import Control.Arrow
import Control.Monad
import Control.Monad.ST
import Data.Char
import Data.List
import Data.Maybe
import qualified Data.ByteString.Char8 as B
import Data.Array.ST.Safe
import Data.STRef
import Debug.Trace
import Text.Printf
import Data.Time.Calendar
readInt = readLn :: IO Int
readInts = map ( fst . fromJust . B.readInt ) . B.words <$> B.getLine
readNInts = readInt >>= flip replicateM readInt
which a b f = if f then a else b
mp [ a, b ] = ( a, b )
main = do
[ y, m, d ] <- readInts
let
heisei_begin = fromGregorian 1989 1 8
heisei_end = fromGregorian 2019 4 30
now = fromGregorian ( fromIntegral y ) m d
putStrLn $ which "Yes" "No" $ 0 <= diffDays now heisei_begin && 0 <= diffDays heisei_end now
torus711