結果

問題 No.1242 高橋君とすごろく
ユーザー wolgnikwolgnik
提出日時 2020-10-02 22:23:09
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 450 bytes
コンパイル時間 1,775 ms
コンパイル使用メモリ 86,560 KB
実行使用メモリ 81,324 KB
最終ジャッジ日時 2023-09-24 21:23:08
合計ジャッジ時間 27,170 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,420 KB
testcase_01 TLE -
testcase_02 TLE -
testcase_03 TLE -
testcase_04 TLE -
testcase_05 TLE -
testcase_06 TLE -
testcase_07 TLE -
testcase_08 AC 70 ms
71,160 KB
testcase_09 TLE -
testcase_10 TLE -
testcase_11 AC 113 ms
76,184 KB
testcase_12 TLE -
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
input = sys.stdin.readline
N, K = map(int, input().split())
a = set(map(int, input().split()))
for _ in range(500):
  t = set()
  for i in a:
    for j in a:
      if j - i == 1: t.add(i - 3)
      if j - i == 3: t.add(i - 2)
      if j - i == 5: t.add(i - 1)
  a |= t
sa = sorted(a)
for i in range(len(sa)):
  if i + 3 >= len(sa): continue
  if sa[i + 3] - sa[i] == 3:
    print("No")
    exit(0)
if 1 in a: print("No")
else: print("Yes")
0