結果

問題 No.1238 選抜クラス
ユーザー first_vilfirst_vil
提出日時 2020-09-26 10:26:14
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 347 bytes
コンパイル時間 183 ms
コンパイル使用メモリ 10,912 KB
実行使用メモリ 33,408 KB
最終ジャッジ日時 2023-09-11 06:01:24
合計ジャッジ時間 36,927 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 52 ms
8,480 KB
testcase_01 AC 72 ms
8,908 KB
testcase_02 AC 175 ms
9,764 KB
testcase_03 AC 35 ms
8,488 KB
testcase_04 AC 35 ms
8,484 KB
testcase_05 AC 35 ms
8,544 KB
testcase_06 AC 36 ms
8,480 KB
testcase_07 AC 129 ms
9,352 KB
testcase_08 AC 180 ms
9,784 KB
testcase_09 AC 263 ms
10,592 KB
testcase_10 AC 144 ms
9,516 KB
testcase_11 AC 263 ms
10,440 KB
testcase_12 AC 196 ms
10,064 KB
testcase_13 AC 196 ms
10,032 KB
testcase_14 AC 178 ms
9,888 KB
testcase_15 AC 282 ms
10,432 KB
testcase_16 AC 255 ms
10,516 KB
testcase_17 AC 1,774 ms
29,596 KB
testcase_18 AC 1,748 ms
27,496 KB
testcase_19 AC 1,843 ms
31,504 KB
testcase_20 AC 1,687 ms
29,316 KB
testcase_21 AC 1,682 ms
28,692 KB
testcase_22 AC 1,778 ms
24,412 KB
testcase_23 AC 1,901 ms
24,480 KB
testcase_24 WA -
testcase_25 AC 1,752 ms
24,396 KB
testcase_26 AC 1,749 ms
29,488 KB
testcase_27 AC 1,828 ms
33,408 KB
testcase_28 AC 1,934 ms
28,852 KB
testcase_29 AC 1,743 ms
27,988 KB
testcase_30 AC 550 ms
13,328 KB
testcase_31 AC 1,064 ms
18,348 KB
testcase_32 AC 1,461 ms
24,664 KB
testcase_33 AC 122 ms
9,404 KB
testcase_34 AC 1,642 ms
24,708 KB
testcase_35 AC 695 ms
14,880 KB
testcase_36 AC 336 ms
11,356 KB
testcase_37 AC 623 ms
13,812 KB
testcase_38 AC 1,711 ms
27,552 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

m=10**9+7
n,k=map(int,input().split())
a=list(map(int,input().split()))
for i in range(n):
  a[i]-=k
dp=[[0]*20001 for _ in range(n+1)]
dp[0][0]=1
for i in range(n):
  for j in range(-10000,10001):
    dp[i][j]%=m
    if -10000<=j+a[i] and j+a[i]<=10000:
      dp[i+1][j]+=dp[i][j]
      dp[i+1][j+a[i]]+=dp[i][j]
print((sum(dp[n][:10000])-1+m)%m)
0