Language: C++

#include<bits/stdc++.h>
#include<boost/multiprecision/cpp_int.hpp>
using namespace std;
using namespace boost::multiprecision;
#define BEGIN ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define END return EXIT_SUCCESS
#define rep(I,N) for(auto I=0;I<(N);++I)
#define up(I,A,B) for(auto I=(A);I<=(B);++I)
#define dw(I,A,B) for(auto I=(A);I>=(B);--I)
#define all(C) (C).begin(),(C).end()
#define rall(C) (C).rbegin(),(C).rend()
#define ft first
#define sd second
#define mp make_pair
#define mt make_tuple
#define pf push_front
#define pb push_back
#define pt pop_front
#define pk pop_back
#define eb emplace_back
#define lb lower_bound
#define ub upper_bound
#define rs resize
template<class T> T count_bit(T p){
  if(typeid(p)==typeid(int))return __builtin_popcount(p);
  else if(typeid(p)==typeid(long))return __builtin_popcountl(p);
  else return __builtin_popcountll(p);
}
template<class T>inline bool chmax(T& a,T b){if(a<b){a=b;return true;}return false;}
template<class T>inline bool chmin(T& a,T b){if(a>b){a=b;return true;}return false;}
template<class T>inline void                                      in(T &p){cin>>p;}
template<class T1,class T2>inline void                            in(T1 &p1,T2 &p2){cin>>p1>>p2;}
template<class T1,class T2,class T3>inline void                   in(T1 &p1,T2 &p2,T3 &p3){cin>>p1>>p2>>p3;}
template<class T1,class T2,class T3,class T4>inline void          in(T1 &p1,T2 &p2,T3 &p3,T4 &p4){cin>>p1>>p2>>p3>>p4;}
template<class T1,class T2,class T3,class T4,class T5>inline void in(T1 &p1,T2 &p2,T3 &p3,T4 &p4,T5 &p5){cin>>p1>>p2>>p3>>p4>>p5;}
template<class T>inline void                                      ins(T &p){for_each(all(p),in<decltype(p[0])>);}
template<class T>inline void                             out(T p){cout<<p<<endl;}
template<class T1,class T2>inline void                   out(T1 p1,T2 p2){cout<<p1<<" "<<p2<<endl;}
template<class T1,class T2,class T3>inline void          out(T1 p1,T2 p2,T3 p3){cout<<p1<<" "<<p2<<" "<<p3<<endl;}
template<class T1,class T2,class T3,class T4>inline void out(T1 p1,T2 p2,T3 p3,T4 p4){cout<<p1<<" "<<p2<<" "<<p3<<" "<<p4<<endl;}
inline                                              void out(double p){printf("%.10f\n",p);}
template<class T>inline                             void outs(T p){for_each(all(p),out<decltype(p[0])>);}
class math{
private:
  long MOD;
public:
  math(){
    MOD=1000000007;
  }
  math(long mod){
    MOD=mod;
  }
  template<class T>inline
  T mod_add(T a,T b){
    a%=MOD;
    a+=b;
    if(a>=MOD)a-=MOD;
    return a;
  }
  template<class T>inline
  T mod_sub(T a,T b){
    a%=MOD;
    a-=b;
    if(a<0)a+=MOD;
    return a;
  }
  template<class T>inline
  T mod_mul(T a,T b){
    a%=MOD;
    a*=b;
    if(a>=MOD)a%=MOD;
    return a;
  }
  template<class T>inline
  T mod_div(T a,T b){
    a%=MOD;
    a/=b;
    return a;
  }
  template<class T>inline
  T mod_pow(T a,T n){
    T r=1;
    while(n)r=r*((n%2)?a:1)%MOD,a=a*a%MOD,n>>=1;
    return r;
  }
  template<class T>inline
  T nCr(T n,T r){
    if(n<0||r<0||r>n)return 0;
    T p=1,q=1;
    r=min(r,n-r);
    for(T i=1;i<=r;i++,n--)p=p*n%MOD,q=q*i%MOD;
    return p*mod_pow(q,MOD-2)%MOD;
  }
  template<class T>inline
  T nHr(T n,T r){return (n==0&&r==0)?1:nCr(n+r-1,r);}
  template<class T>inline
  map<T,T> prime_decomp(T n){
    map<T,T> m;
    for(T i=2;i*i<=n;i++){
      while(n%i==0){
        m[i]++;
        n/=i;
      }
    }
    if(n>1)m[n]++;
    return m;
  }
  template<class T>inline
  bool is_prime(T n) {
    if(n<=1)return false;
    for(T i=2;i*i<=n;i++){
      if(n%i==0)return false;
    }
    return true;
  }
  template<class T>inline
  vector<T> divisor(T n){
    vector<T>res;
    for(T i=1;i*i<=n;i++){
      if(n%i==0){
        res.push_back(i);
        if(i!=n/i)res.push_back(n/i);
      }
    }
    return res;
  }
  template<class T>inline T calc_gcd(T a,T b){if(b==0)return a;return calc_gcd(b,a%b);}
  template<class T>inline T calc_lcm(T a,T b){return a*b/calc_gcd(a,b);}
  template<class T>inline
  T fact(T n){
    T res=1;
    for(T i=1;i<=n;i++)res*=i;
    return res;
  }
  template<class T>inline
  T sum(T n){return n*(n+1)/2;}
  template<class T>inline
  bool ccw(T ax,T ay,T bx,T by,T cx,T cy,T dx,T dy){
    T ta = (cx - dx) * (ay - cy) + (cy - dy) * (cx - ax);
    T tb = (cx - dx) * (by - cy) + (cy - dy) * (cx - bx);
    T tc = (ax - bx) * (cy - ay) + (ay - by) * (ax - cx);
    T td = (ax - bx) * (dy - ay) + (ay - by) * (ax - dx);
    return tc * td < 0 && ta * tb < 0;// 端点を含まない場合
    // return tc * td <= 0 && ta * tb <= 0; // 端点を含む場合
  }
}math;
void partitions(int n, int max_n, vector<int>& v, vector<vector<int> >& vv)
{
    if (n == 0) {
        vv.push_back(v);
        return;
    }
    for (int i = min(n, max_n); i > 0; i--) {
        v.push_back(i);
        partitions(n - i, i, v, vv);
        v.pop_back();
    }
}
cpp_int dp[2005][2005];
cpp_int fact[2005];
inline void solve(void){
  long N,K;
  in(N,K);
  dp[0][0]=1;
  long mod=1e9+7;
  up(i,1,K){
    up(j,0,K){
      if(j-i>=0)dp[i][j]=(dp[i-1][j]+dp[i][j-i])%mod;
      else dp[i][j]=dp[i-1][j];
    }
  }
  fact[0]=1;
  up(i,1,K)fact[i]=fact[i-1]*i;
  vector<vector<int>> vv;
  partitions(K,K,vector<int>(),vv);
  up(i,1,K){
    if(i==1||i==K)out((math.nCr(N-K+1,(long)i)%mod);
    else {
      cpp_int cnt=0;
      for(auto&& v:vv){
        if(v.size()!=i)continue;
        cpp_int cnt2=fact[i];
        map<long,long>m;
        for(auto&& e:v)m[e]++;
        cpp_int cnt3=1;
        for(auto&& e:m)cnt3*=fact[e.sd];
        cnt+=cnt2/cnt3;
      }
      out((math.nCr(N-K+1,(long)i)%mod)*(dp[i][K]-dp[i-1][K])%mod*cnt%mod);
    }
  }
}
int main(int argc,char**argv){
  BEGIN;
  solve();
  END;
}


Compiler output:
a.cc:2:9: fatal error: boost/multiprecision/cpp_int.hpp: No such file or directory
    2 | #include<boost/multiprecision/cpp_int.hpp>
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.