結果

問題 No.129 お年玉(2)
ユーザー aaaaaaiuaaaaaaiu
提出日時 2019-08-24 02:51:58
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
MLE  
(最新)
AC  
(最初)
実行時間 -
コード長 369 bytes
コンパイル時間 2,998 ms
コンパイル使用メモリ 193,988 KB
実行使用メモリ 536,228 KB
最終ジャッジ日時 2024-04-21 16:00:49
合計ジャッジ時間 10,909 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 23 ms
30,592 KB
testcase_01 AC 348 ms
433,280 KB
testcase_02 AC 1 ms
5,376 KB
testcase_03 AC 1 ms
5,376 KB
testcase_04 AC 2 ms
5,376 KB
testcase_05 AC 145 ms
187,136 KB
testcase_06 AC 228 ms
287,744 KB
testcase_07 AC 276 ms
349,312 KB
testcase_08 AC 190 ms
242,944 KB
testcase_09 AC 256 ms
322,688 KB
testcase_10 AC 284 ms
363,008 KB
testcase_11 AC 184 ms
233,472 KB
testcase_12 AC 236 ms
300,800 KB
testcase_13 AC 245 ms
314,112 KB
testcase_14 AC 241 ms
303,744 KB
testcase_15 AC 201 ms
252,160 KB
testcase_16 AC 227 ms
285,184 KB
testcase_17 AC 266 ms
342,912 KB
testcase_18 AC 256 ms
323,840 KB
testcase_19 AC 273 ms
344,576 KB
testcase_20 AC 270 ms
342,016 KB
testcase_21 MLE -
testcase_22 AC 194 ms
244,864 KB
testcase_23 AC 296 ms
371,968 KB
testcase_24 AC 283 ms
357,888 KB
testcase_25 AC 187 ms
234,752 KB
testcase_26 AC 191 ms
240,256 KB
testcase_27 AC 186 ms
233,344 KB
testcase_28 MLE -
testcase_29 AC 2 ms
5,376 KB
testcase_30 AC 1 ms
5,376 KB
testcase_31 AC 2 ms
5,376 KB
testcase_32 AC 2 ms
5,376 KB
testcase_33 AC 5 ms
7,808 KB
testcase_34 AC 2 ms
5,376 KB
testcase_35 AC 4 ms
7,296 KB
testcase_36 AC 5 ms
8,060 KB
testcase_37 AC 6 ms
9,216 KB
testcase_38 AC 41 ms
56,960 KB
testcase_39 AC 65 ms
83,200 KB
testcase_40 AC 173 ms
218,880 KB
testcase_41 AC 108 ms
137,728 KB
testcase_42 AC 49 ms
64,000 KB
testcase_43 AC 46 ms
62,976 KB
testcase_44 MLE -
testcase_45 AC 26 ms
38,144 KB
testcase_46 AC 71 ms
92,160 KB
testcase_47 MLE -
testcase_48 AC 204 ms
255,744 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