結果
| 問題 | No.290 1010 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-10-21 20:41:53 |
| 言語 | Haskell (9.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 297 bytes |
| 記録 | |
| コンパイル時間 | 1,008 ms |
| コンパイル使用メモリ | 198,400 KB |
| 実行使用メモリ | 61,056 KB |
| 最終ジャッジ日時 | 2026-04-03 08:48:10 |
| 合計ジャッジ時間 | 2,342 ms |
|
ジャッジサーバーID (参考情報) |
judge5_1 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 24 |
コンパイルメッセージ
Loaded package environment from /home/judge/.ghc/x86_64-linux-9.14.1/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