Language: C++

#include<bits/stdc++.h>
using namespace std;

template<long long mod>
class modint{
private:
  long long num;
  long long extgcd(long long a, long long b, long long&x, long long&y){
    long long d = a;
    if(b != 0){d = extgcd(b, a%b, y, x);  y -= (a/b) * x;}
    else{x = 1; y = 0;}
    return d;
  }
  long long modinverse(long long a){
    long long x, y;
    extgcd(a, mod, x, y);
    return (mod + x%mod)%mod;
  }
public:
  modint():num(0){}
  modint(const long long x):num((x < 0?(x+mod):x)%mod ){}
  friend modint operator+(const modint&a, const modint&b)
  {    return modint(a.num + b.num);  }
  friend modint operator-(const modint&a, const modint&b)
  {    return modint(a.num - b.num);  }
  friend modint operator*(const modint&a, const modint&b)
  {    return modint(a.num * b.num);  }
  friend modint operator/(const modint&a, const modint&b)
  {    return modint(a*modinverse(b));  }
  friend ostream& operator<<(ostream&os, const modint&a){
    os << a.num;
    return os;
  }
};


int main(){
  ll n, k;cin >> n >> k;

  ll l = n - k;
  vector<modint>red(l + 1, l + 1);
  for(ll i = 1; i < l + 1; ++i)
    red[i] = (((red[i - 1] * (l+1-i))) / i+1;
  vector<modint>blue(k,1);
  for(ll i = 1; i < k; ++i)
    blue[i] = (((blue[i - 1] * (k-i))) / i;
  for(ll i = 0; i < k; ++i){
    //   debug(red[i]);
    //    debug(blue[i]);
    if(i < l + 1)
      cout << (red[i] * blue[i]) << endl;
    else
      cout << 0 << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:38:3: error: 'll' was not declared in this scope
   38 |   ll n, k;cin >> n >> k;
      |   ^~
a.cc:38:18: error: 'n' was not declared in this scope; did you mean 'yn'?
   38 |   ll n, k;cin >> n >> k;
      |                  ^
      |                  yn
a.cc:38:23: error: 'k' was not declared in this scope
   38 |   ll n, k;cin >> n >> k;
      |                       ^
a.cc:40:5: error: expected ';' before 'l'
   40 |   ll l = n - k;
      |     ^~
      |     ;
a.cc:41:16: error: type/value mismatch at argument 1 in template parameter list for 'template<class _Tp, class _Alloc> class std::vector'
   41 |   vector<modint>red(l + 1, l + 1);
      |                ^
a.cc:41:16: note:   expected a type, got 'modint'
a.cc:41:16: error: template argument 2 is invalid
a.cc:41:21: error: 'l' was not declared in this scope
   41 |   vector<modint>red(l + 1, l + 1);
      |                     ^
a.cc:41:33: error: expression list treated as compound expression in initializer [-fpermissive]
   41 |   vector<modint>red(l + 1, l + 1);
      |                                 ^
a.cc:42:9: error: expected ';' before 'i'
   42 |   for(ll i = 1; i < l + 1; ++i)
      |         ^~
      |         ;
a.cc:42:17: error: 'i' was not declared in this scope
   42 |   for(ll i = 1; i < l + 1; ++i)
      |                 ^
a.cc:43:45: error: expected ')' before ';' token
   43 |     red[i] = (((red[i - 1] * (l+1-i))) / i+1;
      |              ~                              ^
      |                                             )
a.cc:44:16: error: type/value mismatch at argument 1 in template parameter list for 'template<class _Tp, class _Alloc> class std::vector'
   44 |   vector<modint>blue(k,1);
      |                ^
a.cc:44:16: note:   expected a type, got 'modint'
a.cc:44:16: error: template argument 2 is invalid
a.cc:44:25: error: expression list treated as compound expression in initializer [-fpermissive]
   44 |   vector<modint>blue(k,1);
      |                         ^
a.cc:45:9: error: expected ';' before 'i'
   45 |   for(ll i = 1; i < k; ++i)
      |         ^~
      |         ;
a.cc:45:17: error: 'i' was not declared in this scope
   45 |   for(ll i = 1; i < k; ++i)
      |                 ^
a.cc:46:43: error: expected ')' before ';' token
   46 |     blue[i] = (((blue[i - 1] * (k-i))) / i;
      |               ~                           ^
      |                                           )
a.cc:47:9: error: expected ';' before 'i'
   47 |   for(ll i = 0; i < k; ++i){
      |         ^~
      |         ;
a.cc:47:17: error: 'i' was not declared in this scope
   47 |   for(ll i = 0; i < k; ++i){
      |                 ^