結果

問題 No.240 ナイト散歩
コンテスト
ユーザー taba
提出日時 2016-04-16 04:42:28
言語 PyPy2
(7.3.15)
結果
AC  
実行時間 82 ms / 2,000 ms
コード長 301 bytes
コンパイル時間 134 ms
コンパイル使用メモリ 77,580 KB
最終ジャッジ日時 2025-12-03 20:24:26
ジャッジサーバーID
(参考情報)
judge3 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 30
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

t=[[0,0]]
u=t[:]
for i in range(3):
	n=[]
	for j in t:
		n+=[[j[0]-2,j[1]-1]]
		n+=[[j[0]-2,j[1]+1]]
		n+=[[j[0]-1,j[1]-2]]
		n+=[[j[0]-1,j[1]+2]]
		n+=[[j[0]+1,j[1]-2]]
		n+=[[j[0]+1,j[1]+2]]
		n+=[[j[0]+2,j[1]-1]]
		n+=[[j[0]+2,j[1]+1]]
	t=n
	u+=t
print["NO","YES"][map(int,raw_input().split())in u]
0