結果

問題 No.240 ナイト散歩
ユーザー syunsukesyunsuke
提出日時 2020-09-18 21:16:41
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 95 ms / 2,000 ms
コード長 353 bytes
コンパイル時間 1,002 ms
コンパイル使用メモリ 86,648 KB
実行使用メモリ 71,756 KB
最終ジャッジ日時 2023-09-04 09:13:12
合計ジャッジ時間 5,266 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 93 ms
71,420 KB
testcase_01 AC 92 ms
71,516 KB
testcase_02 AC 93 ms
71,460 KB
testcase_03 AC 92 ms
71,588 KB
testcase_04 AC 93 ms
71,444 KB
testcase_05 AC 91 ms
71,548 KB
testcase_06 AC 93 ms
71,628 KB
testcase_07 AC 92 ms
71,748 KB
testcase_08 AC 93 ms
71,688 KB
testcase_09 AC 93 ms
71,600 KB
testcase_10 AC 92 ms
71,380 KB
testcase_11 AC 93 ms
71,532 KB
testcase_12 AC 91 ms
71,532 KB
testcase_13 AC 92 ms
71,480 KB
testcase_14 AC 91 ms
71,632 KB
testcase_15 AC 92 ms
71,372 KB
testcase_16 AC 90 ms
71,448 KB
testcase_17 AC 93 ms
71,552 KB
testcase_18 AC 92 ms
71,756 KB
testcase_19 AC 93 ms
71,448 KB
testcase_20 AC 90 ms
71,652 KB
testcase_21 AC 90 ms
71,420 KB
testcase_22 AC 93 ms
71,520 KB
testcase_23 AC 91 ms
71,688 KB
testcase_24 AC 92 ms
71,616 KB
testcase_25 AC 92 ms
71,476 KB
testcase_26 AC 93 ms
71,688 KB
testcase_27 AC 91 ms
71,456 KB
testcase_28 AC 95 ms
71,524 KB
testcase_29 AC 93 ms
71,660 KB
testcase_30 AC 94 ms
71,492 KB
testcase_31 AC 93 ms
71,456 KB
testcase_32 AC 94 ms
71,472 KB
testcase_33 AC 93 ms
71,528 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

D={}
D[(0,0)]=1

d={}
X=[0,1,1,-1,-1,2,2,-2,-2]
Y=[0,2,-2,2,-2,1,-1,1,-1]

import copy

for i in range(3):
    for k,v in D.items():
        k0,k1=k
        for xy in range(9):
            d[(k0+X[xy],k1+Y[xy])]=1
    D=copy.deepcopy(d)
    d={}
#print(len(D))

X,Y=map(int,input().split())
if (X,Y) in D:
    print("YES")
else:
    print("NO")
        
0