結果
| 問題 | No.240 ナイト散歩 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-03-24 22:52:52 |
| 言語 | PyPy3 (7.3.23 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 27 ms / 2,000 ms |
| + 165µs | |
| コード長 | 319 bytes |
| 記録 | |
| コンパイル時間 | 71 ms |
| コンパイル使用メモリ | 81,024 KB |
| 実行使用メモリ | 54,912 KB |
| 最終ジャッジ日時 | 2026-09-15 11:39:50 |
| 合計ジャッジ時間 | 2,674 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 30 |
ソースコード
X,Y = map(int,input().split())
s = set()
s.add((0,0))
d = []
for i in (2,-2):
for j in (1,-1):
d.append((i,j))
d.append((j,i))
for _ in range(3):
t = set()
for x,y in s:
for dx,dy in d:
t.add((x+dx,y+dy))
s |= t
if (X,Y) in s:
print('YES')
else:
print('NO')