結果

問題 No.2155 みちらcolor
ユーザー 👑 timitimi
提出日時 2022-12-09 22:03:42
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 70 ms / 2,000 ms
コード長 430 bytes
コンパイル時間 290 ms
コンパイル使用メモリ 82,728 KB
実行使用メモリ 76,288 KB
最終ジャッジ日時 2024-04-22 22:11:35
合計ジャッジ時間 5,219 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 68 ms
76,156 KB
testcase_01 AC 63 ms
75,896 KB
testcase_02 AC 55 ms
71,040 KB
testcase_03 AC 57 ms
72,960 KB
testcase_04 AC 56 ms
72,320 KB
testcase_05 AC 62 ms
75,776 KB
testcase_06 AC 52 ms
68,480 KB
testcase_07 AC 50 ms
64,640 KB
testcase_08 AC 63 ms
76,032 KB
testcase_09 AC 68 ms
76,032 KB
testcase_10 AC 55 ms
69,376 KB
testcase_11 AC 51 ms
69,504 KB
testcase_12 AC 61 ms
75,904 KB
testcase_13 AC 35 ms
53,504 KB
testcase_14 AC 62 ms
75,904 KB
testcase_15 AC 35 ms
54,144 KB
testcase_16 AC 50 ms
68,736 KB
testcase_17 AC 41 ms
62,208 KB
testcase_18 AC 54 ms
71,936 KB
testcase_19 AC 54 ms
73,984 KB
testcase_20 AC 66 ms
76,032 KB
testcase_21 AC 64 ms
75,776 KB
testcase_22 AC 62 ms
76,256 KB
testcase_23 AC 61 ms
76,160 KB
testcase_24 AC 66 ms
76,288 KB
testcase_25 AC 64 ms
76,004 KB
testcase_26 AC 60 ms
75,904 KB
testcase_27 AC 70 ms
76,032 KB
testcase_28 AC 64 ms
75,904 KB
testcase_29 AC 62 ms
76,032 KB
testcase_30 AC 64 ms
76,160 KB
testcase_31 AC 65 ms
75,648 KB
testcase_32 AC 63 ms
75,776 KB
testcase_33 AC 68 ms
75,776 KB
testcase_34 AC 65 ms
76,160 KB
testcase_35 AC 61 ms
75,648 KB
testcase_36 AC 62 ms
75,904 KB
testcase_37 AC 67 ms
76,288 KB
testcase_38 AC 61 ms
75,776 KB
testcase_39 AC 66 ms
75,904 KB
testcase_40 AC 63 ms
76,032 KB
testcase_41 AC 61 ms
75,904 KB
testcase_42 AC 38 ms
60,544 KB
testcase_43 AC 34 ms
53,760 KB
testcase_44 AC 34 ms
53,504 KB
testcase_45 AC 35 ms
53,120 KB
testcase_46 AC 34 ms
53,504 KB
testcase_47 AC 46 ms
64,512 KB
testcase_48 AC 47 ms
64,256 KB
testcase_49 AC 35 ms
53,504 KB
testcase_50 AC 46 ms
64,000 KB
testcase_51 AC 46 ms
64,384 KB
testcase_52 AC 46 ms
63,360 KB
testcase_53 AC 44 ms
63,360 KB
testcase_54 AC 46 ms
63,872 KB
testcase_55 AC 36 ms
53,248 KB
testcase_56 AC 48 ms
64,512 KB
testcase_57 AC 35 ms
53,760 KB
testcase_58 AC 37 ms
54,016 KB
testcase_59 AC 37 ms
53,504 KB
testcase_60 AC 36 ms
53,120 KB
testcase_61 AC 35 ms
54,016 KB
testcase_62 AC 45 ms
63,744 KB
testcase_63 AC 41 ms
60,800 KB
testcase_64 AC 39 ms
60,160 KB
testcase_65 AC 36 ms
53,504 KB
testcase_66 AC 41 ms
60,288 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,M,L=map(int, input().split())
A=list(map(int, input().split()))
D={}
D[L]=1
from collections import deque
d=deque()
d.append(L)
for i in range(N):
  nd=deque()
  DD={}
  while d:
    now=d.popleft()
    nex=(now+A[i])//2 
    if nex not in D:
      D[nex]=1
    if nex not in DD:
      DD[nex]=1
      nd.append(nex)
    if now not in DD:
      DD[now]=1
      nd.append(now)
  d=nd
if M in D:
  print('Yes')
else:
  print('No')
0