結果

問題 No.1682 Unfair Game
ユーザー とりゐとりゐ
提出日時 2021-09-17 23:12:19
言語 PyPy3
(7.3.13)
結果
WA  
実行時間 -
コード長 236 bytes
コンパイル時間 341 ms
コンパイル使用メモリ 87,076 KB
実行使用メモリ 76,412 KB
最終ジャッジ日時 2023-09-12 09:14:07
合計ジャッジ時間 3,336 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 80 ms
76,148 KB
testcase_01 AC 79 ms
76,032 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 88 ms
76,044 KB
testcase_08 WA -
testcase_09 AC 91 ms
76,096 KB
testcase_10 WA -
testcase_11 AC 85 ms
76,040 KB
testcase_12 AC 86 ms
76,116 KB
testcase_13 WA -
testcase_14 AC 78 ms
76,260 KB
testcase_15 AC 78 ms
76,260 KB
testcase_16 AC 78 ms
76,124 KB
testcase_17 AC 80 ms
76,176 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 89 ms
76,076 KB
testcase_21 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
a=list(map(int,input().split()))
dp=[0]*10001
dp[5000]=1
mod=10**9+7
for i in a:
  j=i-50
  dp2=dp.copy()
  for k in range(0,10001):
    if 0<=j+k<=10000:
      dp[k+j]+=dp2[k]
      dp[k+j]%=mod
print(sum(dp[5001:])%mod)
0