結果
| 問題 |
No.1943 消えたAGCT(1)
|
| コンテスト | |
| ユーザー |
sanao10000
|
| 提出日時 | 2022-05-21 09:13:09 |
| 言語 | Haskell (9.10.1) |
| 結果 |
CE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 5,076 bytes |
| コンパイル時間 | 4,734 ms |
| コンパイル使用メモリ | 158,592 KB |
| 最終ジャッジ日時 | 2024-11-15 02:17:58 |
| 合計ジャッジ時間 | 5,707 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:66:1: error: [GHC-87110]
Could not load module ‘Data.Map.Strict’.
It is a member of the hidden package ‘containers-0.6.8’.
Use -v to see a list of the files searched for.
|
66 | import qualified Data.Map.Strict as Map
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Main.hs:67:1: error: [GHC-87110]
Could not load module ‘Data.IntMap’.
It is a member of the hidden package ‘containers-0.6.8’.
Use -v to see a list of the files searched for.
|
67 | import qualified Data.IntMap as MI
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Main.hs:70:1: error: [GHC-87110]
Could not load module ‘Data.Sequence’.
It is a member of the hidden package ‘containers-0.6.8’.
Use -v to see a list of the files searched for.
|
70 | import qualified Data.Sequence as Seq
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Main.hs:71: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.
|
71 | import qualified Data.Set as Set
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ソースコード
-- -------------------------------------------------------------------------
-- ハ,,ハ
-- ( ゚ω゚ ) WAお断りします
-- / \
-- ((⊂ ) ノ\つ))
-- (_⌒ヽ
-- ヽ ヘ }
-- ε≡Ξ ノノ `J
-- ------------------------------------------------------------------------
{-# LANGUAGE BlockArguments #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE MultiWayIf #-}
-- {-# LANGUAGE NegativeLiterals #-}
-- {-# LANGUAGE OverloadedLists #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# OPTIONS_GHC -Wno-deferred-type-errors #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE Strict #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE MagicHash #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE ForeignFunctionInterface, GHCForeignImportPrim, MagicHash, UnboxedTuples, UnliftedFFITypes #-}
{-# LANGUAGE ViewPatterns #-}
{-# OPTIONS_GHC -O0 #-}
{-# OPTIONS_GHC -O2 #-}
{-# OPTIONS_GHC -Wno-deferred-type-errors #-}
{-# OPTIONS_GHC -Wno-missing-import-lists #-}
{-# OPTIONS_GHC -Wno-unused-imports #-}
{-# OPTIONS_GHC -Wno-incomplete-patterns #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE UndecidableInstances#-}
{-# OPTIONS_GHC -Wno-overlapping-patterns #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# OPTIONS_GHC -Wno-unrecognised-pragmas #-}
{-# HLINT ignore "Use camelCase" #-}
module Main where
import Data.Bool
import Control.Applicative
import Data.Ord
import Control.Monad.State
import qualified Control.Monad as CM
import qualified Control.Monad.ST as ST
import qualified Data.Array as A
import qualified Data.Array.IO as AIO
import qualified Data.Array.ST as AST
import qualified Data.Array.Unboxed as AU
import qualified Data.Bits as Bits
import qualified Data.ByteString.Char8 as BS
import qualified Data.Char as Char
import qualified Data.Complex as Comp
import Data.Function(fix)
import qualified Data.IORef as IO
import qualified Data.List as L
import qualified Data.Map.Strict as Map
import qualified Data.IntMap as MI
import qualified Data.Maybe as May
import qualified Data.STRef as STR
import qualified Data.Sequence as Seq
import qualified Data.Set as Set
import qualified Data.Vector as V
import qualified Data.Vector.Generic as G
import qualified Data.Vector.Mutable as VM
import qualified Data.Vector.Unboxed as VU
import qualified Data.Vector.Unboxed.Mutable as VUM
import Prelude hiding(print)
mod' = 1000000007
main = do
n <- readLn @Int
as <- getLine
print$solve$filter
(liftM2(||)('A' ==)
(liftM2 (||)('G' ==)
(liftM2 (||) ('C' ==)
('T' ==))) . snd)
$zip [1..] as
solve xs
| length xs == 0 = 0
| otherwise = fst $ last xs
-----------------------------------------------------------
type Moji = BS.ByteString
type LV = V.Vector
type SV = VU.Vector
cin::Sanao a=>IO a
cin=sanao<$>BS.getLine
print :: Show a => a -> IO ()
print x=BS.putStrLn $ BS.pack $ show x
class Sanao a where
sanao :: Moji -> a
{-# MINIMAL sanao #-}
instance Sanao Moji where
sanao = id
instance Sanao Integer where
sanao = read.BS.unpack
instance Sanao Int where
sanao x = case BS.readInt x of
Nothing -> error "ここはInt"
Just (a,_) -> a
instance Sanao Double where
sanao x = case BS.readInt x of
Nothing -> error "ここはDouble"
Just (a,_) -> realToFrac a
instance Sanao [Moji] where
sanao = BS.words
instance Sanao [Int] where
sanao = map sanao. BS.words
instance Sanao(Int,Int) where
sanao= (\[a, b]->(a, b)) . map sanao . BS.words
instance Sanao(Int, Int, Int) where
sanao= (\[a, b, c]->(a, b, c)) . map sanao . BS.words
instance Sanao(Int, Int, Int, Int) where
sanao= (\[a, b, c, d]->(a, b, c, d)) . map sanao . BS.words
instance Sanao(Double,Double) where
sanao= (\[a, b]->(a, b)) . map sanao . BS.words
instance Sanao(Double,Double, Double) where
sanao= (\[a, b, c]->(a, b, c)) . map sanao . BS.words
instance Sanao(Double,Double, Double, Double) where
sanao= (\[a, b, c, d]->(a, b, c, d)) . map sanao . BS.words
instance Sanao(Moji,Int) where
sanao= (\[a, b]->(a,sanao b)) . BS.words
instance Sanao(Moji,Int, Int) where
sanao= (\[a, b, c]->(a,sanao b, sanao c)) . BS.words
instance Sanao(Int,Moji) where
sanao= (\[a, b]->(sanao a,b)) . BS.words
instance Sanao(Moji,Double) where
sanao= (\[a, b]->(a,sanao b)) . BS.words
instance Sanao(Double,Moji) where
sanao= (\[a, b]->(sanao a,b)) . BS.words
sanao10000