結果

問題 No.1238 選抜クラス
ユーザー titiatitia
提出日時 2020-09-25 21:48:13
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 329 bytes
コンパイル時間 843 ms
コンパイル使用メモリ 10,628 KB
実行使用メモリ 9,216 KB
最終ジャッジ日時 2023-09-10 15:12:17
合計ジャッジ時間 24,045 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 43 ms
8,540 KB
testcase_01 AC 53 ms
8,624 KB
testcase_02 AC 122 ms
8,660 KB
testcase_03 AC 30 ms
8,632 KB
testcase_04 AC 31 ms
8,516 KB
testcase_05 AC 31 ms
8,536 KB
testcase_06 AC 31 ms
8,504 KB
testcase_07 AC 88 ms
8,604 KB
testcase_08 AC 122 ms
8,608 KB
testcase_09 AC 181 ms
8,772 KB
testcase_10 AC 102 ms
8,656 KB
testcase_11 AC 170 ms
8,616 KB
testcase_12 AC 136 ms
8,620 KB
testcase_13 AC 136 ms
8,700 KB
testcase_14 AC 124 ms
8,664 KB
testcase_15 AC 179 ms
8,620 KB
testcase_16 AC 167 ms
8,624 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 1,166 ms
9,080 KB
testcase_20 WA -
testcase_21 AC 1,079 ms
9,016 KB
testcase_22 WA -
testcase_23 AC 1,171 ms
8,632 KB
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 AC 1,187 ms
9,072 KB
testcase_28 WA -
testcase_29 WA -
testcase_30 AC 372 ms
8,648 KB
testcase_31 WA -
testcase_32 AC 918 ms
8,968 KB
testcase_33 AC 87 ms
8,660 KB
testcase_34 WA -
testcase_35 WA -
testcase_36 AC 233 ms
8,676 KB
testcase_37 WA -
testcase_38 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

N,K=map(int,input().split())
A=list(map(int,input().split()))
A=[a-K for a in A]            

DP=[0]*20010
DP[10005]=1

import copy

for a in A:
    NDP=copy.deepcopy(DP)

    for i in range(20010):
        if 0<=i+a<20010:
            NDP[i+a]+=DP[i]

    DP=NDP

print(sum(DP[10005:])-1)
0