結果
| 問題 |
No.166 マス埋めゲーム
|
| コンテスト | |
| ユーザー |
okaduki
|
| 提出日時 | 2015-03-21 01:36:50 |
| 言語 | Haskell (9.10.1) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 431 bytes |
| コンパイル時間 | 2,408 ms |
| コンパイル使用メモリ | 180,444 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-28 23:48:50 |
| 合計ジャッジ時間 | 3,284 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 20 |
コンパイルメッセージ
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
import Control.Monad
import qualified Data.ByteString.Char8 as B
import Data.Maybe (fromJust)
import Text.Printf
import Debug.Trace
readInts :: B.ByteString -> [Integer]
readInts = map (fst . fromJust . B.readInteger) . B.words
getInts :: IO [Integer]
getInts = liftM readInts B.getLine
main = do
[h,w,n,k] <- getInts
let ans = if h*w `mod` n == k `mod` n then "YES" else "NO"
in putStrLn ans
okaduki