結果
| 問題 | No.240 ナイト散歩 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-07-10 22:39:01 |
| 言語 | PyPy2 (7.3.20) |
| 結果 |
AC
不安定
|
| 実行時間 | 60 ms / 2,000 ms |
| + 65µs | |
| コード長 | 356 bytes |
| 記録 | |
| コンパイル時間 | 1,159 ms |
| コンパイル使用メモリ | 62,176 KB |
| 実行使用メモリ | 62,364 KB |
| 最終ジャッジ日時 | 2026-10-28 17:08:29 |
| 合計ジャッジ時間 | 4,977 ms |
|
ジャッジサーバーID (参考情報) |
judge5_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 31 |
ソースコード
able = set([(0, 0)])
for loop in xrange(3):
nable = able.copy()
for (x, y) in able:
for (nx, ny) in (x-2,y-1),(x-2,y+1),(x-1,y-2),(x-1,y+2),(x+1,y-2),(x+1,y+2),(x+2,y-1),(x+2,y+1):
nable.add((nx, ny))
able = nable
X, Y = map(int, raw_input().split())
print "YES" if (X, Y) in able else "NO"