結果
問題 |
No.269 見栄っ張りの募金活動
|
ユーザー |
![]() |
提出日時 | 2020-02-21 15:09:23 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 430 bytes |
コンパイル時間 | 644 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 78,464 KB |
最終ジャッジ日時 | 2024-10-08 19:47:09 |
合計ジャッジ時間 | 7,087 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 6 WA * 16 |
ソースコード
import sys import math from collections import deque import copy import bisect MOD = 10 ** 9 + 7 N, S, K = map(int, input().split()) dp = [[0 for _ in range(S + 10)] for _ in range(N + 10)] dp[0][0] = 1 if N*N*K/2 > S: print(0) sys.exit() for i in range(0, N + 1): for l in range(1, S + 1): if (l - (N - i)) >= 0: dp[i][l] = (dp[i - 1][l - (N - i)] + dp[i][l - (N - i)]) % MOD print(dp[N - 1][S])