結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 79 ms
71,640 KB
testcase_01 TLE -
testcase_02 -- -
testcase_03 -- -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
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 #

import sys
input = sys.stdin.readline
N, K = map(int, input().split())
a = set(map(int, input().split()))
for _ in range(1000):
  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