結果

問題 No.1242 高橋君とすごろく
ユーザー marroncastlemarroncastle
提出日時 2020-10-02 22:32:43
言語 PyPy3
(7.3.15)
結果
MLE  
実行時間 -
コード長 427 bytes
コンパイル時間 312 ms
コンパイル使用メモリ 87,140 KB
実行使用メモリ 848,104 KB
最終ジャッジ日時 2023-09-24 21:42:59
合計ジャッジ時間 4,682 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 94 ms
71,596 KB
testcase_01 AC 93 ms
71,580 KB
testcase_02 AC 99 ms
71,776 KB
testcase_03 AC 96 ms
71,864 KB
testcase_04 AC 93 ms
71,688 KB
testcase_05 AC 95 ms
71,860 KB
testcase_06 AC 94 ms
71,704 KB
testcase_07 AC 96 ms
71,800 KB
testcase_08 AC 94 ms
71,832 KB
testcase_09 AC 94 ms
71,476 KB
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 #

N, K = map(int, input().split())
A = list(map(int, input().split()))
from collections import defaultdict
d = defaultdict(lambda: [0]*7)
for a in A:
  d[a][0] = 1
while A:
  a = A.pop()
  for i in range(1,7):
    if a-i<=0:
      break
    if d[a-i][0]==1:
      continue
    if d[a-i][7-i]==1:
      d[a-i][0] = 1
      A.append(a-i)
    elif d[a-i][i]==0:
      d[a-i][i] = 1
if d[1][0]==0:
  print('Yes')
else:
  print('No')
0