結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
71,424 KB
testcase_01 AC 75 ms
71,220 KB
testcase_02 AC 78 ms
71,304 KB
testcase_03 AC 82 ms
75,456 KB
testcase_04 AC 80 ms
75,532 KB
testcase_05 AC 76 ms
71,312 KB
testcase_06 TLE -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
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 #

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):
                #print(v-x)
                if v-x >= 1:
                    s.append(v-x)
                    X.add(v-x)
                    A.append(v-x)

#print(X)
#print(X)
if 1 in X:
    print('No')
else:
    print('Yes')
0