結果

問題 No.1242 高橋君とすごろく
ユーザー NatsubiSoganNatsubiSogan
提出日時 2020-10-04 14:30:20
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 250 bytes
コンパイル時間 293 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-07-20 02:55:33
合計ジャッジ時間 1,744 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 23 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

I,P,E=input,print,exit;n,k=map(int,I().split());a=list(map(int,I().split()));s,l=set(a),[2,3,5,8,10]
for i in a:
 if i+1 in s:
  if i not in l:E(P("No"))
 if i+3 in s:
  if i not in [2,5]:E(P("No"))
 if i+5 in s:
  if i-1 not in l:E(P("No"))
P("Yes")
0