algo — C++23 日本語リファレンス GitHub

test/yosupo/enumerative_conbinatorics/stirling_number_of_the_first_kind_fixed_k.test.cpp

AC · 最終更新 2026-09-07 · GitHub

問題: https://judge.yosupo.jp/problem/stirling_number_of_the_first_kind_fixed_k

依存するヘッダ(12)
実装
// competitive-verifier: PROBLEM https://judge.yosupo.jp/problem/stirling_number_of_the_first_kind_fixed_k
#include <iostream>
#include "combinatorics/stirling.hpp"

using Mint = modint998;

int main(void) {
    int n, k;
    std::cin >> n >> k;
    auto ans = stirling1_fixed_k<Mint>(n, k);
    for (int i = k; i <= n; ++i) std::cout << ans[i] << " \n"[i == n];

    return 0;
}