結果

問題 No.2155 みちらcolor
ユーザー DrDrpilotDrDrpilot
提出日時 2022-12-14 17:07:25
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 68 ms / 2,000 ms
コード長 992 bytes
コンパイル時間 74 ms
コンパイル使用メモリ 12,928 KB
実行使用メモリ 12,288 KB
最終ジャッジ日時 2024-04-25 21:19:01
合計ジャッジ時間 4,833 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 63 ms
12,160 KB
testcase_01 AC 53 ms
11,904 KB
testcase_02 AC 49 ms
11,776 KB
testcase_03 AC 49 ms
11,904 KB
testcase_04 AC 47 ms
11,904 KB
testcase_05 AC 54 ms
11,904 KB
testcase_06 AC 39 ms
11,648 KB
testcase_07 AC 37 ms
11,648 KB
testcase_08 AC 49 ms
11,904 KB
testcase_09 AC 51 ms
12,032 KB
testcase_10 AC 46 ms
11,776 KB
testcase_11 AC 43 ms
11,904 KB
testcase_12 AC 52 ms
12,032 KB
testcase_13 AC 32 ms
11,520 KB
testcase_14 AC 57 ms
12,160 KB
testcase_15 AC 33 ms
11,520 KB
testcase_16 AC 42 ms
11,776 KB
testcase_17 AC 36 ms
11,520 KB
testcase_18 AC 55 ms
11,904 KB
testcase_19 AC 55 ms
12,032 KB
testcase_20 AC 62 ms
12,288 KB
testcase_21 AC 67 ms
12,032 KB
testcase_22 AC 55 ms
12,032 KB
testcase_23 AC 56 ms
12,032 KB
testcase_24 AC 62 ms
12,160 KB
testcase_25 AC 62 ms
12,160 KB
testcase_26 AC 61 ms
12,032 KB
testcase_27 AC 62 ms
12,032 KB
testcase_28 AC 56 ms
12,288 KB
testcase_29 AC 58 ms
12,032 KB
testcase_30 AC 61 ms
12,032 KB
testcase_31 AC 60 ms
12,160 KB
testcase_32 AC 62 ms
12,160 KB
testcase_33 AC 60 ms
12,032 KB
testcase_34 AC 64 ms
12,160 KB
testcase_35 AC 60 ms
12,032 KB
testcase_36 AC 64 ms
12,032 KB
testcase_37 AC 63 ms
12,032 KB
testcase_38 AC 58 ms
12,032 KB
testcase_39 AC 64 ms
12,160 KB
testcase_40 AC 68 ms
12,160 KB
testcase_41 AC 63 ms
12,288 KB
testcase_42 AC 45 ms
12,160 KB
testcase_43 AC 31 ms
11,392 KB
testcase_44 AC 30 ms
11,392 KB
testcase_45 AC 31 ms
11,520 KB
testcase_46 AC 33 ms
11,520 KB
testcase_47 AC 37 ms
11,648 KB
testcase_48 AC 36 ms
11,520 KB
testcase_49 AC 34 ms
11,392 KB
testcase_50 AC 35 ms
11,520 KB
testcase_51 AC 35 ms
11,520 KB
testcase_52 AC 34 ms
11,520 KB
testcase_53 AC 34 ms
11,520 KB
testcase_54 AC 34 ms
11,648 KB
testcase_55 AC 32 ms
11,520 KB
testcase_56 AC 35 ms
11,648 KB
testcase_57 AC 33 ms
11,648 KB
testcase_58 AC 32 ms
11,520 KB
testcase_59 AC 31 ms
11,392 KB
testcase_60 AC 32 ms
11,520 KB
testcase_61 AC 32 ms
11,520 KB
testcase_62 AC 34 ms
11,520 KB
testcase_63 AC 34 ms
11,520 KB
testcase_64 AC 31 ms
11,648 KB
testcase_65 AC 30 ms
11,520 KB
testcase_66 AC 31 ms
11,520 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def I():return int(input())
def MAP():return map(int,input().split())
def MAPs():return map(str,input().split())
def LI(): return list(map(int,input().split()))
def TPL(): return tuple(map(int,input().split()))
def S():return input()
from collections import defaultdict,Counter,deque
from copy import deepcopy
from heapq import heapify,heappop,heappush
from bisect import bisect_left,bisect_right
from itertools import accumulate,product,permutations,combinations,combinations_with_replacement
from math import gcd,ceil,floor,factorial,sqrt,pi,sin,cos,tan,radians,exp
from functools import lru_cache
import time
import random
inf=float('inf');mod=998244353;Mod=10**9+7
dydx=[(1,0),(0,1),(-1,0),(0,-1)]

n,m,l=MAP()
a=LI()
width=max(l,max(a),m)
dp=[[0]*(width+1) for _ in range(n+1)]
dp[0][l]=1
for i in range(n):
    color=a[i]
    for j in range(1,width+1):
        if dp[i][j]==0:
            continue
        dp[i+1][j]=1
        dp[i+1][(j+color)//2]=1
print('Yes' if dp[-1][m] else 'No')
0