結果

問題 No.2155 みちらcolor
ユーザー terasaterasa
提出日時 2022-12-09 21:59:59
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 94 ms / 2,000 ms
コード長 729 bytes
コンパイル時間 235 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 71,808 KB
最終ジャッジ日時 2024-04-22 22:07:56
合計ジャッジ時間 7,645 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 87 ms
71,424 KB
testcase_01 AC 86 ms
70,656 KB
testcase_02 AC 86 ms
70,912 KB
testcase_03 AC 90 ms
71,168 KB
testcase_04 AC 88 ms
71,040 KB
testcase_05 AC 87 ms
71,168 KB
testcase_06 AC 87 ms
71,040 KB
testcase_07 AC 87 ms
70,400 KB
testcase_08 AC 86 ms
71,168 KB
testcase_09 AC 87 ms
71,424 KB
testcase_10 AC 87 ms
70,912 KB
testcase_11 AC 87 ms
70,656 KB
testcase_12 AC 94 ms
71,424 KB
testcase_13 AC 86 ms
69,120 KB
testcase_14 AC 89 ms
71,296 KB
testcase_15 AC 84 ms
69,888 KB
testcase_16 AC 88 ms
70,912 KB
testcase_17 AC 79 ms
70,144 KB
testcase_18 AC 84 ms
71,680 KB
testcase_19 AC 84 ms
71,040 KB
testcase_20 AC 85 ms
71,040 KB
testcase_21 AC 81 ms
71,296 KB
testcase_22 AC 84 ms
71,424 KB
testcase_23 AC 85 ms
71,296 KB
testcase_24 AC 84 ms
71,552 KB
testcase_25 AC 86 ms
71,808 KB
testcase_26 AC 86 ms
71,296 KB
testcase_27 AC 86 ms
71,680 KB
testcase_28 AC 86 ms
71,680 KB
testcase_29 AC 86 ms
71,424 KB
testcase_30 AC 87 ms
71,680 KB
testcase_31 AC 86 ms
71,808 KB
testcase_32 AC 90 ms
71,808 KB
testcase_33 AC 86 ms
71,168 KB
testcase_34 AC 92 ms
71,552 KB
testcase_35 AC 88 ms
71,296 KB
testcase_36 AC 90 ms
71,296 KB
testcase_37 AC 91 ms
71,168 KB
testcase_38 AC 85 ms
71,552 KB
testcase_39 AC 85 ms
71,296 KB
testcase_40 AC 87 ms
71,680 KB
testcase_41 AC 89 ms
71,808 KB
testcase_42 AC 84 ms
70,784 KB
testcase_43 AC 79 ms
68,992 KB
testcase_44 AC 81 ms
68,480 KB
testcase_45 AC 79 ms
68,224 KB
testcase_46 AC 75 ms
67,456 KB
testcase_47 AC 83 ms
70,016 KB
testcase_48 AC 84 ms
70,016 KB
testcase_49 AC 80 ms
68,736 KB
testcase_50 AC 87 ms
70,528 KB
testcase_51 AC 81 ms
70,272 KB
testcase_52 AC 81 ms
70,144 KB
testcase_53 AC 81 ms
69,760 KB
testcase_54 AC 85 ms
70,272 KB
testcase_55 AC 81 ms
68,736 KB
testcase_56 AC 85 ms
70,272 KB
testcase_57 AC 81 ms
69,760 KB
testcase_58 AC 83 ms
70,784 KB
testcase_59 AC 79 ms
69,504 KB
testcase_60 AC 78 ms
69,120 KB
testcase_61 AC 80 ms
69,504 KB
testcase_62 AC 82 ms
70,272 KB
testcase_63 AC 80 ms
70,144 KB
testcase_64 AC 82 ms
70,144 KB
testcase_65 AC 79 ms
69,248 KB
testcase_66 AC 80 ms
70,144 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from typing import List, Tuple, Callable, TypeVar, Optional
import sys
import itertools
import heapq
import bisect
import math
from collections import deque, defaultdict
from functools import lru_cache, cmp_to_key

input = sys.stdin.readline

if __file__ != 'prog.py':
    sys.setrecursionlimit(10 ** 6)


def readints(): return map(int, input().split())
def readlist(): return list(readints())
def readstr(): return input()[:-1]


N, M, L = readints()
A = readlist()

K = 1000
dp = [False] * (K + 10)
dp[L] = True
for a in A:
    ndp = [False] * (K + 10)
    for j in range(K + 1):
        if dp[j]:
            nxt = (j + a) >> 1
            ndp[nxt] = True
        ndp[j] |= dp[j]
    dp = ndp
print('Yes' if dp[M] else 'No')
0