Language: C++

# include <bits/stdc++.h>
using namespace std;
#define ll long long;
ll mod = 1000000007;
ll power(ll m,ll n){
    ll 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:17: error: declaration does not declare anything [-fpermissive]
    3 | #define ll long long;
      |                 ^~~~
a.cc:4:1: note: in expansion of macro 'll'
    4 | ll mod = 1000000007;
      | ^~
a.cc:4:4: error: 'mod' does not name a type
    4 | ll mod = 1000000007;
      |    ^~~
a.cc:3:17: error: declaration does not declare anything [-fpermissive]
    3 | #define ll long long;
      |                 ^~~~
a.cc:5:1: note: in expansion of macro 'll'
    5 | ll power(ll m,ll n){
      | ^~
a.cc:3:21: error: expected ')' before ';' token
    3 | #define ll long long;
      |                     ^
a.cc:5:10: note: in expansion of macro 'll'
    5 | ll power(ll m,ll n){
      |          ^~
a.cc:5:9: note: to match this '('
    5 | ll power(ll m,ll n){
      |         ^
a.cc:3:21: error: expected constructor, destructor, or type conversion before ';' token
    3 | #define ll long long;
      |                     ^
a.cc:5:10: note: in expansion of macro 'll'
    5 | ll power(ll m,ll n){
      |          ^~
a.cc:5:13: error: 'm' does not name a type; did you mean 'tm'?
    5 | ll power(ll m,ll n){
      |             ^
      |             tm
a.cc:5:18: error: 'n' does not name a type
    5 | ll 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:24:82: error: 'mod' was not declared in this scope; did you mean 'modf'?
   24 |   for(int i = 2;i < 3000;i++)factorial[i] = factorial[i - 1] * i,factorial[i] %= mod;
      |                                                                                  ^~~
      |                                                                                  modf
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;
      |        ^~~
a.cc:30:40: error: 'mod' was not declared in this scope; did you mean 'modf'?
   30 |     res *= factorial[n - k + 1],res %= mod;
      |                                        ^~~
      |                                        modf
a.cc:32:12: error: 'power' was not declared in this scope
   32 |     res *= power(factorial[i],mod - 2),res %= mod;
      |            ^~~~~