結果

問題 No.1242 高橋君とすごろく
ユーザー brthyyjpbrthyyjp
提出日時 2020-10-02 21:48:51
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 437 bytes
コンパイル時間 281 ms
コンパイル使用メモリ 86,996 KB
実行使用メモリ 76,860 KB
最終ジャッジ日時 2023-09-23 04:40:17
合計ジャッジ時間 4,242 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,108 KB
testcase_01 AC 74 ms
71,108 KB
testcase_02 AC 73 ms
71,252 KB
testcase_03 AC 73 ms
71,216 KB
testcase_04 AC 73 ms
71,480 KB
testcase_05 AC 75 ms
71,436 KB
testcase_06 AC 98 ms
76,392 KB
testcase_07 AC 81 ms
76,332 KB
testcase_08 AC 72 ms
71,448 KB
testcase_09 AC 78 ms
75,760 KB
testcase_10 WA -
testcase_11 AC 77 ms
76,328 KB
testcase_12 WA -
testcase_13 AC 78 ms
75,480 KB
testcase_14 WA -
testcase_15 AC 75 ms
75,580 KB
testcase_16 AC 78 ms
76,396 KB
testcase_17 AC 78 ms
76,428 KB
testcase_18 AC 78 ms
76,364 KB
testcase_19 AC 78 ms
76,396 KB
testcase_20 AC 78 ms
76,176 KB
testcase_21 WA -
testcase_22 AC 80 ms
76,240 KB
testcase_23 AC 84 ms
76,148 KB
testcase_24 AC 77 ms
76,344 KB
testcase_25 AC 80 ms
76,228 KB
testcase_26 WA -
testcase_27 AC 74 ms
71,180 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,k = map(int, input().split())
A = list(map(int, input().split()))

s = []
for a in A:
    s.append(a)

X = set(A)
while s:
    v = s.pop()
    for x in range(1, 6):
        for a in A:
            if v-x == a-(7-x):
                if v-x >= 1:
                    s.append(v-x)
                    X.add(v-x)

#print(X)
for x in range(1, 7):
    if 1+x in X and 1+(7-x) in X:
        print('No')
        exit()
else:
    print('Yes')
0