結果

問題 No.1238 選抜クラス
ユーザー komkompikomkompi
提出日時 2020-10-17 22:12:08
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 356 bytes
コンパイル時間 273 ms
コンパイル使用メモリ 87,232 KB
実行使用メモリ 189,800 KB
最終ジャッジ日時 2023-09-28 08:41:59
合計ジャッジ時間 18,112 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
75,864 KB
testcase_01 AC 76 ms
75,968 KB
testcase_02 AC 84 ms
76,088 KB
testcase_03 AC 70 ms
75,856 KB
testcase_04 AC 73 ms
75,940 KB
testcase_05 AC 71 ms
76,148 KB
testcase_06 AC 69 ms
75,692 KB
testcase_07 AC 80 ms
75,888 KB
testcase_08 AC 82 ms
75,892 KB
testcase_09 AC 91 ms
75,820 KB
testcase_10 AC 83 ms
76,016 KB
testcase_11 AC 89 ms
75,872 KB
testcase_12 AC 84 ms
75,976 KB
testcase_13 AC 81 ms
75,992 KB
testcase_14 AC 75 ms
76,064 KB
testcase_15 AC 82 ms
75,812 KB
testcase_16 AC 86 ms
75,820 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 942 ms
177,236 KB
testcase_20 WA -
testcase_21 AC 770 ms
125,568 KB
testcase_22 WA -
testcase_23 AC 863 ms
158,596 KB
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 AC 982 ms
189,172 KB
testcase_28 WA -
testcase_29 WA -
testcase_30 AC 132 ms
76,428 KB
testcase_31 WA -
testcase_32 AC 466 ms
83,780 KB
testcase_33 AC 75 ms
75,848 KB
testcase_34 WA -
testcase_35 WA -
testcase_36 AC 93 ms
76,404 KB
testcase_37 WA -
testcase_38 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

# coding: utf-8
# Your code here!
N,K=map(int,input().split())
A=list(map(int,input().split()))

ans=0
dp=[[0]*10001 for i in range(N+1)]
dp[0][0]=1

for a in A:
    for n in range(N)[::-1]:
        for i in range(10001)[::-1]:
            if a+i<=10000:
                dp[n+1][a+i]+=dp[n][i]

for n in range(1,N+1):
    ans+=sum(dp[n][n*K:])

print(ans)
0