結果

問題 No.1242 高橋君とすごろく
ユーザー NatsubiSoganNatsubiSogan
提出日時 2020-10-02 22:38:44
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 335 bytes
コンパイル時間 105 ms
コンパイル使用メモリ 10,568 KB
実行使用メモリ 8,136 KB
最終ジャッジ日時 2023-09-24 21:57:48
合計ジャッジ時間 1,710 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,780 KB
testcase_01 AC 16 ms
7,956 KB
testcase_02 AC 16 ms
7,804 KB
testcase_03 AC 16 ms
8,088 KB
testcase_04 WA -
testcase_05 AC 16 ms
7,968 KB
testcase_06 AC 16 ms
8,136 KB
testcase_07 AC 16 ms
8,088 KB
testcase_08 AC 15 ms
7,808 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 16 ms
7,780 KB
testcase_12 WA -
testcase_13 AC 16 ms
7,780 KB
testcase_14 WA -
testcase_15 AC 18 ms
7,916 KB
testcase_16 AC 16 ms
7,724 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 16 ms
7,960 KB
testcase_21 WA -
testcase_22 AC 16 ms
7,784 KB
testcase_23 AC 16 ms
7,780 KB
testcase_24 AC 16 ms
7,784 KB
testcase_25 AC 16 ms
7,824 KB
testcase_26 WA -
testcase_27 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

n, k = map(int, input().split())
a = list(map(int, input().split()))
if k >= 4 and a[0] == 2 and a[1] == 3 and a[2] == 4 and a[3] == 5:
    print("No")
else:
    if n >= 6:
        for i in range(1, k):
            if a[i - 1] >= 5 and abs(a[i - 1] - a[i]) == 1 and a[i - 1] % 6 == 3:
                exit(print("No"))
    print("Yes")
0