competitive-programming-templates

This documentation is automatically generated by online-judge-tools/verification-helper

View the Project on GitHub Misuki743/competitive-programming-templates

:heavy_check_mark: combi/stirling_first_kind.cpp

Verified with

Code

//#include<modint/Montgomery_modint.cpp>
//#include<poly/NTTmint.cpp>
//#include<poly/FPS.cpp>

template<class Mint>
FPS<Mint> stirling_first_kind(int n) {
  vector<FPS<Mint>> fs(n, {0, 1});
  for(int i = 0; i < n; i++)
    fs[i][0] = -i;
  return FPS<Mint>::allProd(fs);
}
#line 1 "combi/stirling_first_kind.cpp"
//#include<modint/Montgomery_modint.cpp>
//#include<poly/NTTmint.cpp>
//#include<poly/FPS.cpp>

template<class Mint>
FPS<Mint> stirling_first_kind(int n) {
  vector<FPS<Mint>> fs(n, {0, 1});
  for(int i = 0; i < n; i++)
    fs[i][0] = -i;
  return FPS<Mint>::allProd(fs);
}
Back to top page