結果
問題 |
No.290 1010
|
ユーザー |
|
提出日時 | 2015-10-21 20:41:53 |
言語 | Haskell (9.10.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 297 bytes |
コンパイル時間 | 5,161 ms |
コンパイル使用メモリ | 170,880 KB |
実行使用メモリ | 58,624 KB |
最終ジャッジ日時 | 2024-07-22 11:23:39 |
合計ジャッジ時間 | 6,272 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 24 |
コンパイルメッセージ
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
ソースコード
import Control.Applicative main :: IO () main = do n <- read <$> getLine s <- getLine print $ if solve n s then "YES" else "NO" solve :: Int -> String -> Bool solve n s | length s > 3 = True | length s == 1 = False | s `elem` ["01", "10", "010", "101"] = False | otherwise = True