結果

問題 No.1238 選抜クラス
ユーザー marroncastlemarroncastle
提出日時 2020-09-25 21:54:08
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 335 bytes
コンパイル時間 463 ms
コンパイル使用メモリ 87,112 KB
実行使用メモリ 92,092 KB
最終ジャッジ日時 2023-09-10 15:21:48
合計ジャッジ時間 6,052 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 79 ms
76,316 KB
testcase_01 AC 85 ms
76,544 KB
testcase_02 AC 83 ms
77,264 KB
testcase_03 AC 80 ms
76,224 KB
testcase_04 AC 79 ms
76,116 KB
testcase_05 AC 79 ms
76,124 KB
testcase_06 AC 78 ms
76,188 KB
testcase_07 AC 82 ms
76,780 KB
testcase_08 AC 85 ms
77,396 KB
testcase_09 AC 84 ms
78,652 KB
testcase_10 AC 83 ms
77,116 KB
testcase_11 AC 89 ms
78,452 KB
testcase_12 AC 88 ms
77,888 KB
testcase_13 AC 86 ms
77,928 KB
testcase_14 AC 85 ms
77,404 KB
testcase_15 AC 90 ms
78,396 KB
testcase_16 AC 87 ms
78,420 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 108 ms
91,536 KB
testcase_20 WA -
testcase_21 AC 113 ms
90,724 KB
testcase_22 AC 105 ms
91,492 KB
testcase_23 AC 107 ms
92,036 KB
testcase_24 WA -
testcase_25 AC 104 ms
91,788 KB
testcase_26 WA -
testcase_27 AC 110 ms
92,004 KB
testcase_28 WA -
testcase_29 WA -
testcase_30 AC 96 ms
81,064 KB
testcase_31 WA -
testcase_32 AC 104 ms
88,208 KB
testcase_33 AC 83 ms
77,064 KB
testcase_34 WA -
testcase_35 WA -
testcase_36 AC 88 ms
79,036 KB
testcase_37 WA -
testcase_38 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

N, K = map(int, input().split())
A = list(map(lambda x:int(x)-K, input().split()))
dp = [0]*20001
dp[0] = 1
mod = 10**9+7
for i in range(N):
  new_dp = dp[:]
  for j in range(-10000,10000):
    if dp[j]>0:
      new_dp[j+A[i]] += dp[j]
      new_dp[j+A[i]] %= mod
  dp = new_dp
ans = -1
for i in range(10000):
  ans += dp[i]
print(ans)
0