結果
問題 |
No.240 ナイト散歩
|
ユーザー |
|
提出日時 | 2019-07-02 16:19:44 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 31 ms / 2,000 ms |
コード長 | 369 bytes |
コンパイル時間 | 401 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-07-23 17:53:05 |
合計ジャッジ時間 | 2,375 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 30 |
ソースコード
l = [(-2,-1),(-2,1),(-1,-2),(-1,2),(1,-2),(1,2),(2,-1),(2,1)] ansl = [] for li in l: ansl.append(li) for lli in l: ansl.append((li[0]+lli[0],li[1]+lli[1])) for llli in l: ansl.append((li[0]+lli[0]+llli[0],li[1]+lli[1]+llli[1])) # print(ansl) x, y = map(int,input().split()) if (x, y) in ansl: print("YES") else: print("NO")