結果

問題 No.9005 実行時間/使用メモリテスト(テスト用)
ユーザー maimai
提出日時 2018-08-05 11:44:31
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 21 ms / 3,000 ms
コード長 670 bytes
コンパイル時間 2,119 ms
コンパイル使用メモリ 201,360 KB
実行使用メモリ 52,584 KB
最終ジャッジ日時 2023-10-19 22:04:04
合計ジャッジ時間 2,632 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 20 ms
52,584 KB
testcase_01 AC 21 ms
52,584 KB
testcase_02 AC 20 ms
52,584 KB
testcase_03 AC 20 ms
52,584 KB
testcase_04 AC 20 ms
52,584 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

template<int MaxN, int MaxR, long long Mod>
struct StaticCombination {
    using value_type = long long;
    value_type table[MaxN+1][MaxR+1];

    StaticCombination() :table() {
        for (int n = 0; n < MaxN; ++n) {
            table[n][0] = 1;
            for (int r = 0; r <= n && r < MaxR; ++r)
                table[n + 1][r + 1] = (table[n][r + 1] + table[n][r]) % Mod;
        }
    }

    inline value_type operator()(int n, int r) const {
        return table[n][r];
    }
};

StaticCombination<2500, 2500, 1000000007ll> sc;

int main(){
    cerr << sc(2500,2500) << endl;
    cout << 0 << endl;
    return 0;
}
0