Language: C++

# include <bits/stdc++.h>
using namespace std;
#define ll long long;
long long mod = 1000000007;
long long power(ll m,ll n){
    long long res = 1;
    if(n > 0){
        res = power(m,n / 2);
        if(n % 2 == 0){
            res = (res * res) % mod;
        }
        else{
            res = (((res * res) % mod) * m) % mod;
        }
    }
    return res;
}
int main(){
  ll n,k;
  cin >> n >> k;
  vector<ll> factorial(3000);
  factorial[0] = 1;
  factorial[1] = 1;
  for(int i = 2;i < 3000;i++)factorial[i] = factorial[i - 1] * i,factorial[i] %= mod;
  for(int i = 1;i <= k;i++){
    ll res = 0;
    res = 1;
    if(n - k + 1 < i)res = 0;
    else{
    res *= factorial[n - k + 1],res %= mod;
    //if(i == 50)cout<<res<<endl;
    res *= power(factorial[i],mod - 2),res %= mod;
      //if(i == 50)cout<<res<<endl;
    res *= power(factorial[n - k + 1 - i],mod - 2),res %= mod;
      //if(i == 50)cout<<res<<endl;
    res *= factorial[k - 1],res %= mod;
      //if(i == 50)cout<<res<<endl;
    res *= power(factorial[i - 1],mod - 2),res %= mod;
      //if(i == 50)cout<<res<<endl;
    res *= power(factorial[k - i],mod - 2),res %= mod;
    }
    cout << res << endl;
  }
  return 0;
}


Compiler output:
a.cc:3:21: error: expected ')' before ';' token
    3 | #define ll long long;
      |                     ^
a.cc:5:17: note: in expansion of macro 'll'
    5 | long long power(ll m,ll n){
      |                 ^~
a.cc:5:16: note: to match this '('
    5 | long long power(ll m,ll n){
      |                ^
a.cc:5:20: error: 'm' does not name a type; did you mean 'tm'?
    5 | long long power(ll m,ll n){
      |                    ^
      |                    tm
a.cc:5:25: error: 'n' does not name a type
    5 | long long power(ll m,ll n){
      |                         ^
a.cc: In function 'int main()':
a.cc:3:17: error: declaration does not declare anything [-fpermissive]
    3 | #define ll long long;
      |                 ^~~~
a.cc:19:3: note: in expansion of macro 'll'
   19 |   ll n,k;
      |   ^~
a.cc:19:6: error: 'n' was not declared in this scope; did you mean 'yn'?
   19 |   ll n,k;
      |      ^
      |      yn
a.cc:19:8: error: 'k' was not declared in this scope
   19 |   ll n,k;
      |        ^
a.cc:3:17: error: template argument 1 is invalid
    3 | #define ll long long;
      |                 ^~~~
a.cc:21:10: note: in expansion of macro 'll'
   21 |   vector<ll> factorial(3000);
      |          ^~
a.cc:3:17: error: template argument 2 is invalid
    3 | #define ll long long;
      |                 ^~~~
a.cc:21:10: note: in expansion of macro 'll'
   21 |   vector<ll> factorial(3000);
      |          ^~
a.cc:21:12: error: expected primary-expression before '>' token
   21 |   vector<ll> factorial(3000);
      |            ^
a.cc:21:14: error: 'factorial' was not declared in this scope
   21 |   vector<ll> factorial(3000);
      |              ^~~~~~~~~
a.cc:3:17: error: declaration does not declare anything [-fpermissive]
    3 | #define ll long long;
      |                 ^~~~
a.cc:26:5: note: in expansion of macro 'll'
   26 |     ll res = 0;
      |     ^~
a.cc:26:8: error: 'res' was not declared in this scope
   26 |     ll res = 0;
      |        ^~~