結果
問題 |
No.1242 高橋君とすごろく
|
ユーザー |
![]() |
提出日時 | 2021-01-25 21:43:28 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 826 bytes |
コンパイル時間 | 134 ms |
コンパイル使用メモリ | 82,232 KB |
実行使用メモリ | 53,560 KB |
最終ジャッジ日時 | 2024-06-22 18:15:42 |
合計ジャッジ時間 | 2,103 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 WA * 1 |
other | AC * 23 WA * 1 |
ソースコード
# coding:UTF-8 import sys MOD = 10 ** 9 + 7 INF = float('inf') N, K = list(map(int, input().split())) # スペース区切り連続数字 A = list(map(int, input().split())) # スペース区切り連続数字 nums = set(A) for a in A: if a == 2: if 1 not in nums and 7 in nums: print("No") exit() elif a == 3: if 2 not in nums and 8 in nums: print("No") exit() if 1 not in nums and 6 in nums: print("No") exit() else: if a - 1 not in nums and a + 5 in nums: print("No") exit() if a - 2 not in nums and a + 3 in nums: print("No") exit() if a - 3 not in nums and a + 1 in nums: print("No") exit() print("Yes")