結果
問題 | No.240 ナイト散歩 |
ユーザー |
![]() |
提出日時 | 2018-02-17 22:12:12 |
言語 | Haskell (9.10.1) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 383 bytes |
コンパイル時間 | 9,377 ms |
コンパイル使用メモリ | 174,720 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-06-24 12:20:44 |
合計ジャッジ時間 | 10,425 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 30 |
コンパイルメッセージ
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
ソースコード
importControl.MonadreplicateMimportData.Listfoldrdx = [(-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) getLinelet can = any (any ((== (x, y)) . foldr (+++) (0, 0)) . flip replicateM dx) [1..3]putStrLn $ if can then "YES" else "NO"