結果

問題 No.9005 実行時間/使用メモリテスト(テスト用)
ユーザー maimai
提出日時 2018-08-05 11:40:09
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 3,000 ms
コード長 667 bytes
コンパイル時間 2,023 ms
コンパイル使用メモリ 199,528 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-19 22:03:15
合計ジャッジ時間 2,720 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,348 KB
testcase_01 AC 2 ms
4,348 KB
testcase_02 AC 2 ms
4,348 KB
testcase_03 AC 2 ms
4,348 KB
testcase_04 AC 2 ms
4,348 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];

    constexpr 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;
        }
    }

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

constexpr StaticCombination<2500, 2500, 1000000007ll> sc();

int main(){
    cout << 0 << endl;
    return 0;
}
0