結果
問題 |
No.9005 実行時間/使用メモリテスト(テスト用)
|
ユーザー |
|
提出日時 | 2018-08-05 11:44:31 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 49 ms / 3,000 ms |
コード長 | 670 bytes |
コンパイル時間 | 1,949 ms |
コンパイル使用メモリ | 192,040 KB |
最終ジャッジ日時 | 2025-01-06 12:15:41 |
ジャッジサーバーID (参考情報) |
judge5 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 5 |
ソースコード
#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; }