結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,216 KB
testcase_01 AC 603 ms
76,844 KB
testcase_02 WA -
testcase_03 AC 581 ms
76,876 KB
testcase_04 AC 600 ms
76,476 KB
testcase_05 WA -
testcase_06 AC 609 ms
76,864 KB
testcase_07 AC 608 ms
76,796 KB
testcase_08 AC 71 ms
71,220 KB
testcase_09 AC 603 ms
77,036 KB
testcase_10 AC 779 ms
76,468 KB
testcase_11 AC 98 ms
76,312 KB
testcase_12 AC 796 ms
76,804 KB
testcase_13 AC 97 ms
76,304 KB
testcase_14 AC 782 ms
76,792 KB
testcase_15 AC 96 ms
76,336 KB
testcase_16 WA -
testcase_17 AC 804 ms
77,000 KB
testcase_18 AC 812 ms
76,832 KB
testcase_19 AC 803 ms
76,908 KB
testcase_20 WA -
testcase_21 AC 788 ms
76,964 KB
testcase_22 AC 98 ms
76,276 KB
testcase_23 AC 100 ms
75,952 KB
testcase_24 AC 98 ms
75,932 KB
testcase_25 AC 98 ms
76,164 KB
testcase_26 AC 890 ms
76,556 KB
testcase_27 AC 579 ms
76,800 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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