結果
問題 | No.185 和風 |
ユーザー | mazeppa1108 |
提出日時 | 2015-06-24 18:01:21 |
言語 | Haskell (9.8.2) |
結果 |
AC
|
実行時間 | 12 ms / 1,000 ms |
コード長 | 390 bytes |
コンパイル時間 | 9,678 ms |
コンパイル使用メモリ | 168,300 KB |
実行使用メモリ | 11,640 KB |
最終ジャッジ日時 | 2023-09-22 00:33:51 |
合計ジャッジ時間 | 1,584 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 7 ms
11,032 KB |
testcase_01 | AC | 12 ms
11,524 KB |
testcase_02 | AC | 3 ms
7,776 KB |
testcase_03 | AC | 3 ms
7,780 KB |
testcase_04 | AC | 12 ms
11,640 KB |
testcase_05 | AC | 4 ms
8,580 KB |
testcase_06 | AC | 12 ms
11,384 KB |
コンパイルメッセージ
Loaded package environment from /home/judge/.ghc/x86_64-linux-9.6.1/environments/default [1 of 2] Compiling Main ( Main.hs, Main.o ) [2 of 2] Linking a.out
ソースコード
import Data.List import Control.Applicative import Control.Monad main = do n <- readLn c <- (map . map) (read :: String -> Int) . map words <$> replicateM n getLine let c' = map (\x -> x !! 1 - x !! 0) c print $ if and $ map (== (head c')) c' then if head c' <= 0 then -1 else head c' else -1