結果

問題 No.1238 選抜クラス
ユーザー 👑 platinumplatinum
提出日時 2020-09-08 00:02:07
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 417 bytes
コンパイル時間 248 ms
コンパイル使用メモリ 82,352 KB
実行使用メモリ 80,148 KB
最終ジャッジ日時 2024-05-07 00:22:32
合計ジャッジ時間 4,596 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 58 ms
76,544 KB
testcase_01 AC 63 ms
76,288 KB
testcase_02 AC 62 ms
76,416 KB
testcase_03 AC 59 ms
75,904 KB
testcase_04 AC 57 ms
76,160 KB
testcase_05 AC 60 ms
76,416 KB
testcase_06 AC 58 ms
76,160 KB
testcase_07 AC 61 ms
76,544 KB
testcase_08 AC 61 ms
76,800 KB
testcase_09 AC 63 ms
77,440 KB
testcase_10 AC 61 ms
77,440 KB
testcase_11 AC 62 ms
77,184 KB
testcase_12 AC 61 ms
77,056 KB
testcase_13 AC 60 ms
77,056 KB
testcase_14 AC 59 ms
76,800 KB
testcase_15 AC 62 ms
76,928 KB
testcase_16 AC 64 ms
76,928 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 93 ms
77,824 KB
testcase_20 WA -
testcase_21 AC 88 ms
77,568 KB
testcase_22 AC 85 ms
76,800 KB
testcase_23 AC 88 ms
77,824 KB
testcase_24 WA -
testcase_25 AC 87 ms
76,544 KB
testcase_26 WA -
testcase_27 AC 89 ms
77,696 KB
testcase_28 WA -
testcase_29 WA -
testcase_30 AC 70 ms
78,080 KB
testcase_31 WA -
testcase_32 AC 82 ms
77,696 KB
testcase_33 AC 60 ms
76,800 KB
testcase_34 WA -
testcase_35 WA -
testcase_36 AC 66 ms
77,568 KB
testcase_37 WA -
testcase_38 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

N, K = map(int,input().split())
A = list(map(int,input().split()))
mod = int(1e9 + 7)

for i in range(N):
	A[i] -= K

dp = [[0 for j in range(20010)] for i in range(105)]
dp[0][10000] = 1
ans = 0

for i in range(N):
	for j in range(20005):
		dp[i+1][j] += dp[i][j]
		if j >= A[i] and j - A[i] < 20005:
			dp[i+1][j] += dp[i][j - A[i]]
		dp[i+1][j] %= mod

for j in range(10005):
	ans += dp[N][j + 10000]

print(ans-1)
0