結果

問題 No.269 見栄っ張りの募金活動
ユーザー startcppstartcpp
提出日時 2015-08-22 13:08:22
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 10 ms / 5,000 ms
コード長 267 bytes
コンパイル時間 207 ms
コンパイル使用メモリ 26,716 KB
実行使用メモリ 10,732 KB
最終ジャッジ日時 2023-09-23 01:10:02
合計ジャッジ時間 1,261 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 AC 1 ms
4,380 KB
testcase_02 AC 1 ms
4,380 KB
testcase_03 AC 2 ms
4,380 KB
testcase_04 AC 5 ms
7,024 KB
testcase_05 AC 2 ms
4,384 KB
testcase_06 AC 2 ms
4,376 KB
testcase_07 AC 10 ms
10,732 KB
testcase_08 AC 1 ms
4,380 KB
testcase_09 AC 2 ms
4,376 KB
testcase_10 AC 2 ms
4,380 KB
testcase_11 AC 2 ms
4,380 KB
testcase_12 AC 2 ms
4,376 KB
testcase_13 AC 3 ms
6,060 KB
testcase_14 AC 2 ms
4,380 KB
testcase_15 AC 2 ms
4,376 KB
testcase_16 AC 1 ms
4,380 KB
testcase_17 AC 1 ms
4,376 KB
testcase_18 AC 5 ms
8,120 KB
testcase_19 AC 3 ms
5,768 KB
testcase_20 AC 1 ms
4,376 KB
testcase_21 AC 2 ms
4,376 KB
testcase_22 AC 2 ms
4,376 KB
testcase_23 AC 1 ms
4,380 KB
testcase_24 AC 2 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<stdio.h>
#define I int
I n,s,k,f[101][20001];I F(I N,I M){return f[N][M]*(M>=0);}I main(){scanf("%d%d%d",&n,&s,&k);s -= k * n * (n - 1)/2;	f[0][0] = 1;for(I N=1;N<=n;N++)for(I M = 0;M<=s;M++)f[N][M]=(F(N,M-N)+F(N-1,M))%1000000007;I t=!printf("%d\n",F(n,s));}
0