結果
| 問題 | No.632 穴埋め門松列 | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2019-04-12 01:01:11 | 
| 言語 | Haskell (9.10.1) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 1,000 ms | 
| コード長 | 393 bytes | 
| コンパイル時間 | 3,294 ms | 
| コンパイル使用メモリ | 173,184 KB | 
| 実行使用メモリ | 5,376 KB | 
| 最終ジャッジ日時 | 2024-07-21 07:04:26 | 
| 合計ジャッジ時間 | 3,915 ms | 
| ジャッジサーバーID (参考情報) | judge3 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 6 | 
コンパイルメッセージ
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
ソースコード
kadomatsu :: String -> [String] -> [Int]
kadomatsu n ["?", b, c] = map read [n, b, c]
kadomatsu n [a, "?", c] = map read [a, n, c]
kadomatsu n [a, b, "?"] = map read [a, b, n]
solve n ts
    | (b < a && b < c) || (b > a && b > c)  = n
    | otherwise         = ""
    where
        [a, b, c] = kadomatsu n ts
main = do
    ts <- words <$> getLine
    putStrLn $ solve "1" ts ++ solve "4" ts
            
            
            
        