結果

問題 No.1242 高橋君とすごろく
ユーザー brthyyjpbrthyyjp
提出日時 2020-10-02 21:50:53
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 437 bytes
コンパイル時間 316 ms
コンパイル使用メモリ 87,076 KB
実行使用メモリ 76,584 KB
最終ジャッジ日時 2023-09-23 04:43:42
合計ジャッジ時間 6,480 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,136 KB
testcase_01 AC 71 ms
71,312 KB
testcase_02 AC 71 ms
71,320 KB
testcase_03 AC 72 ms
71,180 KB
testcase_04 AC 72 ms
70,992 KB
testcase_05 AC 73 ms
71,312 KB
testcase_06 AC 79 ms
76,584 KB
testcase_07 AC 80 ms
76,416 KB
testcase_08 AC 71 ms
71,140 KB
testcase_09 AC 75 ms
75,672 KB
testcase_10 WA -
testcase_11 AC 76 ms
76,296 KB
testcase_12 WA -
testcase_13 AC 76 ms
75,660 KB
testcase_14 WA -
testcase_15 AC 76 ms
75,620 KB
testcase_16 AC 78 ms
76,300 KB
testcase_17 AC 77 ms
76,320 KB
testcase_18 AC 78 ms
76,296 KB
testcase_19 AC 76 ms
76,296 KB
testcase_20 AC 77 ms
76,296 KB
testcase_21 WA -
testcase_22 AC 77 ms
76,488 KB
testcase_23 AC 76 ms
76,176 KB
testcase_24 AC 78 ms
76,392 KB
testcase_25 AC 77 ms
76,388 KB
testcase_26 TLE -
testcase_27 -- -
権限があれば一括ダウンロードができます

ソースコード

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, 7):
        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