結果
問題 |
No.208 王将
|
ユーザー |
![]() |
提出日時 | 2019-05-01 09:52:13 |
言語 | Haskell (9.10.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 536 bytes |
コンパイル時間 | 4,590 ms |
コンパイル使用メモリ | 174,208 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-12-31 12:12:44 |
合計ジャッジ時間 | 2,717 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 21 WA * 2 |
コンパイルメッセージ
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
ソースコード
main :: IO () main = do input_line <- getLine let king = map read (words input_line) :: [Int] let kingx = king !! (0) let kingy = king !! (1) input_line2 <- getLine let destinaion = map read (words input_line2) :: [Int] let destinaionx = destinaion !! (0) let destinaiony = destinaion !! (1) putStrLn $ show (moving kingx kingy destinaionx destinaiony) return () moving :: Int -> Int -> Int -> Int -> Int moving a b c d | a == b && c == d = a + 1 | otherwise = max a b