結果

問題 No.1242 高橋君とすごろく
ユーザー neetotoneetoto
提出日時 2020-10-26 12:30:01
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 630 bytes
コンパイル時間 1,099 ms
コンパイル使用メモリ 10,684 KB
実行使用メモリ 815,564 KB
最終ジャッジ日時 2023-09-29 02:32:53
合計ジャッジ時間 4,786 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

import sys

N, K = map(int, input().split())
Alist = list(map(int, input().split()))

Mass = []

if len(Alist) != K:
    print("system error")
    sys.exit()

for setmass in range(1, N+1):
    Mass.append(setmass)

for j in range(0, K):
    Mass.remove(Alist[j])


for mass in Mass:
    for i in range(1, 4):
        Conv = []
        for j in range(0, K):
            Conv.append(mass + i)
            Conv.append(mass + (7 - i))
            if mass + (7 - i) > N:
                continue
            if set(Conv) & set(Mass) == set():
                print("NO")
                sys.exit()
            Conv = []


print("Yes")
0