結果

問題 No.1238 選抜クラス
ユーザー naniwazunaniwazu
提出日時 2020-09-25 21:54:52
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 319 bytes
コンパイル時間 388 ms
コンパイル使用メモリ 86,728 KB
実行使用メモリ 77,684 KB
最終ジャッジ日時 2023-09-10 15:23:14
合計ジャッジ時間 5,218 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
75,884 KB
testcase_01 AC 76 ms
75,980 KB
testcase_02 AC 80 ms
75,740 KB
testcase_03 AC 74 ms
75,736 KB
testcase_04 AC 74 ms
75,716 KB
testcase_05 AC 77 ms
75,660 KB
testcase_06 AC 73 ms
75,904 KB
testcase_07 AC 74 ms
75,880 KB
testcase_08 AC 79 ms
76,048 KB
testcase_09 AC 79 ms
75,804 KB
testcase_10 AC 78 ms
75,684 KB
testcase_11 AC 80 ms
75,872 KB
testcase_12 AC 78 ms
75,868 KB
testcase_13 AC 76 ms
75,832 KB
testcase_14 AC 82 ms
75,820 KB
testcase_15 AC 79 ms
75,828 KB
testcase_16 AC 77 ms
75,896 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 107 ms
77,556 KB
testcase_20 WA -
testcase_21 AC 100 ms
77,504 KB
testcase_22 WA -
testcase_23 AC 101 ms
76,420 KB
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 AC 108 ms
77,540 KB
testcase_28 WA -
testcase_29 WA -
testcase_30 AC 81 ms
75,828 KB
testcase_31 WA -
testcase_32 AC 90 ms
76,432 KB
testcase_33 AC 77 ms
75,824 KB
testcase_34 WA -
testcase_35 WA -
testcase_36 AC 80 ms
75,952 KB
testcase_37 WA -
testcase_38 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

mod = 10**9+7
N,K = map(int,input().split())
A = [x-K for x in map(int,input().split())]
dp = [0]*21000
dp[10500] = 1
for a in A:
    if a >= 0:
        for i in range(100,20900)[::-1]:
            dp[i+a] += dp[i]
    else:
        for i in range(100,20900):
            dp[i+a] += dp[i]
print(sum(dp[10500:])-1 % mod)
0