結果

問題 No.129 お年玉(2)
ユーザー aaaaaaiuaaaaaaiu
提出日時 2019-08-24 02:51:58
言語 C++17
(gcc 13.2.0 + boost 1.83.0)
結果
MLE  
(最新)
AC  
(最初)
実行時間 -
コード長 369 bytes
コンパイル時間 1,962 ms
コンパイル使用メモリ 198,780 KB
実行使用メモリ 774,484 KB
最終ジャッジ日時 2023-08-03 17:52:17
合計ジャッジ時間 10,049 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
40,708 KB
testcase_01 MLE -
testcase_02 AC 2 ms
4,380 KB
testcase_03 AC 2 ms
4,380 KB
testcase_04 AC 1 ms
4,380 KB
testcase_05 AC 106 ms
255,712 KB
testcase_06 AC 167 ms
456,984 KB
testcase_07 MLE -
testcase_08 AC 141 ms
397,988 KB
testcase_09 MLE -
testcase_10 MLE -
testcase_11 AC 134 ms
385,588 KB
testcase_12 MLE -
testcase_13 MLE -
testcase_14 MLE -
testcase_15 AC 142 ms
441,604 KB
testcase_16 AC 165 ms
501,960 KB
testcase_17 MLE -
testcase_18 MLE -
testcase_19 MLE -
testcase_20 MLE -
testcase_21 MLE -
testcase_22 AC 144 ms
428,700 KB
testcase_23 MLE -
testcase_24 MLE -
testcase_25 AC 133 ms
409,892 KB
testcase_26 AC 137 ms
419,100 KB
testcase_27 AC 132 ms
407,048 KB
testcase_28 MLE -
testcase_29 AC 1 ms
4,380 KB
testcase_30 AC 1 ms
4,380 KB
testcase_31 AC 1 ms
4,380 KB
testcase_32 AC 1 ms
4,376 KB
testcase_33 AC 4 ms
7,656 KB
testcase_34 AC 3 ms
5,004 KB
testcase_35 AC 3 ms
7,152 KB
testcase_36 AC 5 ms
7,756 KB
testcase_37 AC 4 ms
9,196 KB
testcase_38 AC 29 ms
85,212 KB
testcase_39 AC 44 ms
131,248 KB
testcase_40 AC 125 ms
379,128 KB
testcase_41 AC 76 ms
229,404 KB
testcase_42 AC 33 ms
96,816 KB
testcase_43 AC 32 ms
95,784 KB
testcase_44 MLE -
testcase_45 AC 19 ms
53,404 KB
testcase_46 AC 49 ms
147,652 KB
testcase_47 MLE -
testcase_48 AC 145 ms
448,652 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

int main() {
    int mod=1e9;
    ll n,m;
    cin>>n>>m;
    n/=1000;
    n%=m;
    ll c[m+1][m+1];
    for (int i=0;i<=m;i++)
        c[i][0]=c[i][i]=1;
    for (int i=2;i<=m;i++)
        for (int j=1;j<i;j++)
            c[i][j]=(c[i-1][j-1]+c[i-1][j])%mod;
    cout<<c[m][n]<<endl;
    return 0;
}
0