結果
| 問題 | No.240 ナイト散歩 |
| コンテスト | |
| ユーザー |
tottoripaper
|
| 提出日時 | 2018-02-17 22:12:12 |
| 言語 | Haskell (9.14.1) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 2,000 ms |
| コード長 | 383 bytes |
| 記録 | |
| コンパイル時間 | 4,660 ms |
| コンパイル使用メモリ | 193,024 KB |
| 実行使用メモリ | 7,844 KB |
| 最終ジャッジ日時 | 2026-03-10 15:33:04 |
| 合計ジャッジ時間 | 2,334 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 30 |
コンパイルメッセージ
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.Monad (replicateM) import Data.List (foldr) dx = [(-2, 1), (-1, 2), (1, 2), (2, 1), (-2, -1), (-1, -2), (1, -2), (2, -1)] (x, y) +++ (x', y') = (x + x', y + y') main = do [x, y] <- fmap (map read . words) getLine let can = any (any ((== (x, y)) . foldr (+++) (0, 0)) . flip replicateM dx) [1..3] putStrLn $ if can then "YES" else "NO"
tottoripaper