結果

問題 No.2155 みちらcolor
ユーザー mkawa2mkawa2
提出日時 2022-12-09 21:31:22
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 72 ms / 2,000 ms
コード長 959 bytes
コンパイル時間 406 ms
コンパイル使用メモリ 87,148 KB
実行使用メモリ 75,972 KB
最終ジャッジ日時 2023-08-04 22:31:43
合計ジャッジ時間 8,006 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
75,836 KB
testcase_01 AC 70 ms
75,580 KB
testcase_02 AC 68 ms
75,864 KB
testcase_03 AC 68 ms
75,912 KB
testcase_04 AC 69 ms
75,848 KB
testcase_05 AC 70 ms
75,860 KB
testcase_06 AC 67 ms
75,844 KB
testcase_07 AC 71 ms
75,788 KB
testcase_08 AC 70 ms
75,756 KB
testcase_09 AC 70 ms
75,780 KB
testcase_10 AC 69 ms
75,788 KB
testcase_11 AC 70 ms
75,700 KB
testcase_12 AC 70 ms
75,804 KB
testcase_13 AC 69 ms
75,716 KB
testcase_14 AC 70 ms
75,760 KB
testcase_15 AC 69 ms
75,816 KB
testcase_16 AC 69 ms
75,788 KB
testcase_17 AC 68 ms
75,756 KB
testcase_18 AC 69 ms
75,852 KB
testcase_19 AC 69 ms
75,884 KB
testcase_20 AC 69 ms
75,756 KB
testcase_21 AC 69 ms
75,532 KB
testcase_22 AC 70 ms
75,588 KB
testcase_23 AC 71 ms
75,584 KB
testcase_24 AC 70 ms
75,952 KB
testcase_25 AC 70 ms
75,804 KB
testcase_26 AC 71 ms
75,732 KB
testcase_27 AC 69 ms
75,588 KB
testcase_28 AC 70 ms
75,912 KB
testcase_29 AC 70 ms
75,788 KB
testcase_30 AC 70 ms
75,712 KB
testcase_31 AC 70 ms
75,752 KB
testcase_32 AC 70 ms
75,884 KB
testcase_33 AC 70 ms
75,788 KB
testcase_34 AC 70 ms
75,784 KB
testcase_35 AC 69 ms
75,888 KB
testcase_36 AC 69 ms
75,844 KB
testcase_37 AC 70 ms
75,788 KB
testcase_38 AC 70 ms
75,756 KB
testcase_39 AC 70 ms
75,800 KB
testcase_40 AC 68 ms
75,800 KB
testcase_41 AC 70 ms
75,972 KB
testcase_42 AC 67 ms
75,704 KB
testcase_43 AC 68 ms
75,628 KB
testcase_44 AC 67 ms
75,496 KB
testcase_45 AC 68 ms
75,652 KB
testcase_46 AC 65 ms
71,116 KB
testcase_47 AC 69 ms
75,912 KB
testcase_48 AC 68 ms
75,776 KB
testcase_49 AC 69 ms
75,744 KB
testcase_50 AC 69 ms
75,944 KB
testcase_51 AC 68 ms
75,968 KB
testcase_52 AC 69 ms
75,784 KB
testcase_53 AC 69 ms
75,968 KB
testcase_54 AC 69 ms
75,876 KB
testcase_55 AC 66 ms
75,660 KB
testcase_56 AC 68 ms
75,808 KB
testcase_57 AC 69 ms
75,848 KB
testcase_58 AC 69 ms
75,808 KB
testcase_59 AC 67 ms
75,660 KB
testcase_60 AC 70 ms
75,404 KB
testcase_61 AC 68 ms
75,820 KB
testcase_62 AC 69 ms
75,820 KB
testcase_63 AC 69 ms
75,932 KB
testcase_64 AC 70 ms
75,868 KB
testcase_65 AC 68 ms
75,524 KB
testcase_66 AC 72 ms
75,948 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys

# sys.setrecursionlimit(200005)
int1 = lambda x: int(x)-1
pDB = lambda *x: print(*x, end="\n", file=sys.stderr)
p2D = lambda x: print(*x, sep="\n", end="\n\n", file=sys.stderr)
def II(): return int(sys.stdin.readline())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def LI1(): return list(map(int1, sys.stdin.readline().split()))
def LLI1(rows_number): return [LI1() for _ in range(rows_number)]
def SI(): return sys.stdin.readline().rstrip()

dij = [(0, 1), (-1, 0), (0, -1), (1, 0)]
# dij = [(0, 1), (-1, 0), (0, -1), (1, 0), (1, 1), (1, -1), (-1, 1), (-1, -1)]
inf = (1 << 63)-1
# inf = (1 << 31)-1
# md = 10**9+7
md = 998244353

n, m, l = LI()
aa = LI()
lim = 1001

dp = [0]*lim
dp[l] = 1

for a in aa:
    ndp = [0]*lim
    for i in range(lim):
        if dp[i]:
            ndp[i] = 1
            ndp[(i+a)//2] = 1
    dp = ndp

print("Yes" if dp[m] else "No")
0