結果
問題 |
No.240 ナイト散歩
|
ユーザー |
|
提出日時 | 2022-03-24 22:47:08 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 322 bytes |
コンパイル時間 | 301 ms |
コンパイル使用メモリ | 82,432 KB |
実行使用メモリ | 52,352 KB |
最終ジャッジ日時 | 2024-10-13 06:28:33 |
合計ジャッジ時間 | 2,388 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 WA * 2 |
other | AC * 19 WA * 11 |
ソースコード
X,Y = map(int,input().split()) s = set() s.add((0,0)) d = [] for i in (2,-2): for j in range(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')