criyle/codenet-compile-errors huggingface dataset:
Language: Java


import java.util.Arrays;
import java.util.Scanner;

public class D {
    private static final int MOD = 1000000007;

    public static void main(final String[] args) {
        final Scanner scanner = new Scanner(System.in);
        final int n = scanner.nextInt();
        final int k = scanner.nextInt();

        final long[][] table = createPascalsTriangle(n);

        for (int i = 1; i < k + 1; i++) {
            if (i == 1) {
                System.out.println(n - k + 1);
                continue;
            }

            final long blueSplitCombination = table[k - 1][i - 1] % MOD;
            final long redSplitCombination = table[n - k + 1][i] % MOD;

            System.out.println((blueSplitCombination * redSplitCombination) % MOD);

        }
    }

    private static long[][] createPascalsTriangle(final int scale) {
        final long[][] table = new long[scale + 1][scale + 1];
        table[0][0] = 1;
        for (int i = 1; i <= scale; i++) {
            for (int j = 0; j <= i; j++) {
                if (j == 0 || j == i) {
                    table[i][j] = 1;
                    continue;
                }

                table[i][j] = table[i - 1][j] + table[i - 1][j - 1];
            }
        }

        return table;
    }

    /*
    public static void main(String[] args) {
        final Scanner scanner = new Scanner(System.in);
        final int n = scanner.nextInt();
        final int k = scanner.nextInt();

        for (int i = 1; i < k + 1; i++) {
            if (i == 1) {
                System.out.println(n - k + 1);
                continue;
            }

            final int hashi0K = kumiawase(k - 1, i - 1);
            final int hashi0R = recursive(1, i - 1, n - k);
            final int hashi1R = recursive(1, i, n - k);
            final int hashi2R = recursive(1, i + 1, n - k);

            final int res = (hashi0K * hashi0R + 2 * hashi0K * hashi1R + hashi0K * hashi2R) % MOD;
            System.out.println(res);
        }
    }

    private static int recursive(final int depth, final int selectable, final int amount) {
        if (selectable == 1) {
            return 1;
        }

        if (depth == selectable - 1) {
            return amount - 1;
        }

        final int nokori = selectable - depth + 1;
        if (amount < nokori) {
            return 0;
        }

        int accum = 0;
        for (int i = 1; i < amount; i++) {
            accum += recursive(depth + 1, selectable, amount - i);
            accum %= MOD;
        }

        return accum;
    }

    private static int kumiawase(final int a, final int b) {
        int ue = 1;
        int sita = 1;

        for (int i = 0; i < b; i++) {
            ue *= a - i;
            ue %= MOD;
            sita *= i + 1;
            sita %= MOD;
        }

        return ue / sita;
    }

     */
}


Compiler output:
Main.java:5: error: class D is public, should be declared in a file named D.java
public class D {
       ^
1 error
Language: C++

#include <cstring>
#include <cstdlib>
#pragma warning(disable:4996)
using namespace std;
 
long long dp[2005][2005];
const int MOD = 1e9 + 7;
 
 
long long combi(int i, int j)
{
	long long &ret = dp[i][j];
	if (ret != -1)return ret;
	if (j > i)return 0;
	if (j == 0)return 1;
	
	return ret = (combi(i - 1, j - 1) + combi(i - 1, j)) % MOD;
	
}
 
int main()
{
	int N, K;
	scanf("%d %d", &N, &K);
	int blue = K;
	int red = N - K;
	memset(dp, -1, sizeof(dp));
	for (int i = 1; i <= K; i++) 
		cout << (combi(blue - 1, i - 1)*combi(red + 1, i))%MOD << '\n';
	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:9: error: 'scanf' was not declared in this scope
   24 |         scanf("%d %d", &N, &K);
      |         ^~~~~
a.cc:29:17: error: 'cout' was not declared in this scope
   29 |                 cout << (combi(blue - 1, i - 1)*combi(red + 1, i))%MOD << '\n';
      |                 ^~~~
a.cc:3:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include <cstdlib>
  +++ |+#include <iostream>
    3 | #pragma warning(disable:4996)
Language: C++

#include<bits/stdc++.h>
#define ls(x) (x)<<1
#define rs(x) (x)<<1|1
#define lson l,m,rt<<1
#define rson m+1,r,rt<<1|1
#define ll rt<<1
#define rr rt<<1|1
#define PI acos(-1)
#define MM int m=(l+r)>>1;
#define fu(i,r,t) for(int i=r;i<=t;i++)
#define fd(i,r,t) for(int i=r;i>=t;i--)
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define int long long
#define endl '\n'
#define lcm(a,b) (a*b)/__gcd(a,b)
#define Case(i,ans) cout<<"Case "<<i<<": "<<ans<<endl;
#define cp(i,ans) printf("%.if",ans);
#define cpp(i,ans) cout<<setprecision(i)<<fixed<<ans<<endl;
#define ppb pop_back
#define ppf pop_front
#define pb push_back
#define pf push_front
#define pq priority_queue
#define lowbit(x) (x)&(-x)
#define all(V) V.begin(),V.end()
#define ms multiset
#define mod(x) (x)%mo_num
#define vc vector
#define vct vector<int>
#define fa(i,V) for(auto i:V)
#define out(i) cout<<(i)<<endl;
#define fi first
#define sc second
#define fun(i) fu(i,1,n)
#define fut(i) fu(i,1,t)
#define fum(i) fu(i,1,m)
#define ld long double
//#define P pair<int,int>
using namespace std;
const int INF=LLONG_MAX;
const int maxn=1e6+5;
const int mo_num=1e9+7;
int n,m,a[maxn],b[maxn],ans;
int jc[100005];
int ext_gcd(int a,int b,int &x,int &y){
    if(b==0){x=1;y=0;return a;}
    int q=a/b, g=ext_gcd(b,a-q*b,x,y), z=x-q*y;
    x=y; y=z;
    return g;
}
int inv(int a){
    int x,y;
    ext_gcd(a,mo_num,x,y);
    return (x+mo_num)%mo_num;
}
void init(int *x, int len){
    x[0]=1;
    for(int i=1;i<len;i++)x[i]=(x[i-1]*i)%mo_num;
}

int C(int r,int n){
    if(n<0 or n<r or r<0)return 0;
    return (jc[n]*inv(jc[r])%mo_num)*inv(jc[n-r])%mo_num;
}

int32_t main(){
    cin>>n>>m;
    init(jc,2001);
    fum(i)out(C(i,n-k+1)*C(i-1,k-1)%mo_num)
    return 0;
}


Compiler output:
a.cc: In function 'int32_t main()':
a.cc:69:21: error: 'k' was not declared in this scope
   69 |     fum(i)out(C(i,n-k+1)*C(i-1,k-1)%mo_num)
      |                     ^
a.cc:31:23: note: in definition of macro 'out'
   31 | #define out(i) cout<<(i)<<endl;
      |                       ^
Language: C++

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

double nCr(int n, int r) {
    double ans = 1;
    for (int i = n; i > n - r; --i) {
        ans = ans*i;
    }
    for (int i = 1 ; i < r + 1; ++i) {
        ans = ans / i;
    }
    return ans;
}

int main(void){
    // Your code here!
    int n,k;
    cin>>n>>k;
    long long a[k+1];
    for(int i=1;i<k+1;i++){
        a[i]=(nCr(n-k+1,i)*nCr(k-1,i-1))%1000000007;
        cout<<a[i]<<endl;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:41: error: invalid operands of types 'double' and 'int' to binary 'operator%'
   21 |         a[i]=(nCr(n-k+1,i)*nCr(k-1,i-1))%1000000007;
      |              ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
      |                           |              |
      |                           double         int
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigInteger;

public class Test4{
	public static void main(String[] args) throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] dataStr = br.readLine().split(" ");
		int n = Integer.parseInt(dataStr[0]);
		int k = Integer.parseInt(dataStr[1]);
		
		for(int i=1; i<=k; i++)
			System.out.println(combination(new BigInteger(Integer.toString(k-1)), new BigInteger(Integer.toString(i-1))).multiply(combination(new BigInteger(Integer.toString(n-k+1)), new BigInteger(Integer.toString(i)))).remainder(new BigInteger("1000000007")));
	}
	
	private static BigInteger combination(BigInteger n, BigInteger r){
		BigInteger result = BigInteger.ONE;
		BigInteger i;
		for(i=BigInteger.ZERO; i.compareTo(r) < 0; i.add(BigInteger.ONE))
			result = result.multiply(n.subtract(i));
		for(i=new BigInteger("2"); i.compareTo(r) <= 0; i.add(BigInteger.ONE))
			result = result.divide(i);
		return result;
	}
}


Compiler output:
Main.java:6: error: class Test4 is public, should be declared in a file named Test4.java
public class Test4{
       ^
1 error
Language: C++

#include<bits/sdtc++.h>

using namespace std;
const int mod = 1e9 + 7;

int64_t cnt[2005][2005];
int n, k;

int main()
{
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> k;
  for (int i=1; i<=n; i++)
  {
    cnt[i][0] = 1;
    for (int j=1; j<=i; j++)
    {
      cnt[i][j] = (cnt[i - 1][j] + cnt[i - 1][j])%mod;
    }
  }
  for (int i=1; i<=k; i++)
  {
    cout << (cnt[k - 1][i - 1]*cnt[n - k + 1][i])%mod << '\n';
  }
  return 0;
}

Compiler output:
a.cc:1:9: fatal error: bits/sdtc++.h: No such file or directory
    1 | #include<bits/sdtc++.h>
      |         ^~~~~~~~~~~~~~~
compilation terminated.
Language: C++

include<iostream>
using namespace std;

class ModInt{
  static const int default_mod = 1e9 + 7;
public:
  ModInt(long long val, int mod)
    : val(val % mod), mod(mod)
  {
  }
  ModInt(long long val)
    : ModInt(val, default_mod)
  {
  }
  ModInt operator* (const ModInt& another){
    return ModInt(val * another.val);
  }
  ModInt& operator*=(const long long rhs){
    this->val *= rhs;
    this->val %= mod;
    return *this;
  }
  
  ModInt pow(long long exponent){
    exponent %= mod;
    if(exponent == 0){
      return ModInt(1, mod);
    }else{
      if(exponent % 2){
        return ((*this) * (*this)).pow(exponent / 2) * (*this);
      }else{
        return ((*this) * (*this)).pow(exponent / 2);
      }
    }
  }
  ModInt inv(){
    return this->pow(mod - 2);
  }
  static ModInt fact(long long n, int mod){
    n %= mod;
    auto ret = ModInt(1, mod);
    while(n > 1){
      ret *= n;
      n--;
    }
    return ret;
  }
  static ModInt fact(long long n){
    return ModInt::fact(n, default_mod);
  }
  static ModInt comb(long long n, long long r, int mod){
    return ModInt::fact(n) * ModInt::fact(r).inv() * ModInt::fact(n - r).inv();
  }
  static ModInt comb(long long n, long long r){
    return ModInt::comb(n, r, default_mod);
  }

  friend ostream& operator<< (ostream& os, const ModInt& modint){
    os << modint.val;
    return os;
  }
  friend istream& operator>>(istream& is, ModInt& modint){
    long long val;
    cin >> val;
    modint.val = val % modint.mod;
  }
private:
  long long val;
  int mod;
};


int main(){
  int N, K;
  cin >> N >> K;

  for(int i = 1; i <= K; i++){
    ModInt blue_comb = ModInt::comb(K - 1, i - 1);
    ModInt red_comb = ModInt::comb(N - K + 1, i);
    cout << blue_comb * red_comb << endl;
  }

}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<iostream>
      | ^~~~~~~
a.cc:58:10: error: 'ostream' does not name a type
   58 |   friend ostream& operator<< (ostream& os, const ModInt& modint){
      |          ^~~~~~~
a.cc:62:10: error: 'istream' does not name a type
   62 |   friend istream& operator>>(istream& is, ModInt& modint){
      |          ^~~~~~~
a.cc: In function 'int main()':
a.cc:75:3: error: 'cin' was not declared in this scope
   75 |   cin >> N >> K;
      |   ^~~
a.cc:80:5: error: 'cout' was not declared in this scope
   80 |     cout << blue_comb * red_comb << endl;
      |     ^~~~
a.cc:80:37: error: 'endl' was not declared in this scope
   80 |     cout << blue_comb * red_comb << endl;
      |                                     ^~~~
Language: C++

#include <iostream>
using namespace std;
typedef long long ll;
const int MAX = 510000;
const int MOD = 1e9+7;

long long fac[MAX], finv[MAX], inv[MAX];

// テーブルを作る前処理
void COMinit() {
    fac[0] = fac[1] = 1;
    finv[0] = finv[1] = 1;
    inv[1] = 1;
    for (int i = 2; i < MAX; i++){
        fac[i] = fac[i - 1] * i % MOD;
        inv[i] = MOD - inv[MOD%i] * (MOD / i) % MOD;
        finv[i] = finv[i - 1] * inv[i] % MOD;
    }
}

// 二項係数計算
long long COM(int n, int k){
    if (n < k) return 0;
    if (n < 0 || k < 0) return 0;
    return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}

int main() {
    // 前処理
    COMinit();

    // 計算例
    // cout << COM(10, 3) << endl;

    int n,k;
    cin >> n >> k;

    REP(i, 1, k+1) {
        // if (i > k || n-k < i-1 ) break;
        // ll kuroamari = COM(k-1, i-1);
        // ll siroamari = COM(w+1, i);
        ll ans = ((COM(k-1, i-1)%MOD) * (COM(n-k+1, i)%MOD))%MOD;

        // 計算例
        cout << ans << endl;

        i++;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:38:9: error: 'i' was not declared in this scope
   38 |     REP(i, 1, k+1) {
      |         ^
a.cc:38:5: error: 'REP' was not declared in this scope
   38 |     REP(i, 1, k+1) {
      |     ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define ft first
#define sd second
#define fr(i,n) for(int i=0;i<(n);++i)
#define Fr(i,n) for(int i=1;i<=(n);++i)
#define ifr(i,n) for(int i=(n)-1;i>=0;--i)
#define iFr(i,n) for(int i=(n);i>0;--i)

struct modint{
    ll a;
    const ll MOD=1e9+7;
    modint(ll a_=0){
        a=((a_%MOD)+MOD)%MOD;
    }
    modint inv()const{
        ll n=1,m=MOD-2,A=a;
        while(m){
            if(m&1)(n*=A)%=MOD;
            (A*=A)%=MOD;
            m>>=1;
        }
        modint y(n);
        return y;
    }
    bool operator==(const modint& x){
        return a==x.a;
    }
    bool operator!=(const modint& x){
        return a!=x.a;
    }
    modint& operator=(const modint& x){
        a=x.a;
        return *this;
    }
    modint operator+(const modint& x){
        modint y(a+x.a);
        return y;
    }
    modint operator-(const modint& x){
        modint y(a-x.a);
        return y;
    }
    modint operator*(const modint& x){
        modint y(a*x.a);
        return y;
    }
    modint operator/(const modint& x){
        return *this * x.inv();
    }
    modint& operator+=(const modint& x){
        *this=*this+x;
        return *this;
    }
    modint& operator-=(const modint& x){
        *this=*this-x;
        return *this;
    }
    modint& operator*=(const modint& x){
        *this=*this*x;
        return *this;
    }
    modint& operator/=(const modint& x){
        *this=*this/x;
        return *this;
    }
};
istream& operator>>(istream &in,modint& x){
    ll a_;
    in>>a_;
    modint y(a_);
    x=y;
    return in;
}
ostream& operator<<(ostream &out,const modint& x){
    out<<x.a;
    return out;
}
modint pwr(ll a,ll b){
    modint n(1),A(a);
    while(b){
        if(b&1) n*=A;
        A*=A;
        b>>=1;
    }
    return n;
}

vector<modint> fc;
modint fct(ll x) {
    if(fc.empty()) fc.resize(2010);
    if(x==0) return 1;
    if(fc[x]==0) fc[x]=fct(x - 1)*x;
    return fc[x];
}

vector<modint> ifc;
modint ifct(ll x) {
    if(ifc.empty()) ifc.resize(2010);
    if(x==2010-1) return ifc[x]=fct(x).inv();
    if(ifc[x] == 0) ifc[x]=ifct(x+1)*(x+1);
    return ifc[x];
}

modint comb(ll n, ll r) {
    if (n < 0 || r < 0 || n < r) return 0;
    return fct(n)*ifct(r)*ifct(n-r);
}

class DBlueAndRedBalls {
public:
    void solve(istream& in, ostream& out) {
        cin.tie(nullptr);
        ios::sync_with_stdio(false);
        int k,n;
        in>>n>>k;
        Fr(i,k) out<<comb(k-1,i-1)*comb(n-k+1,i)<<endl;
    }
};

Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

#include<iostream>
#include<vector>
#include<algorithm>

using namespace std;
const int rest=1000000007;
long kaijo(int a){
  long ans;
  ans=a;
  if(a==0) return 1;
  else{
  for(int i=1;i<a;i++){
    ans=ans*i;
  }
  }
  return ans;
}
long combi(int a,int b){
  long ans;
  ans=kaijo(a);
  ans=ans/kaijo(a-b);
  ans=ans/kaijo(b);
  ans=ans%rest;
  return ans;
}

int main(){
  int n,k;
  cin>>n>>k;
  vector<vector<long long>> comb(n+1,vector<long long>(k+1));
  /*  comb[0][0]=1;
  comb[1][0]=1;
  comb[1][1]=1;*/
  int max=0;
  for(int i=0;i<=n;i++){
    if(i>k) max=k;
    else max=i;
    for(int j=0;j<=max;j++){
      if(j==0||j==i){
	comb[i][j]=1;
      }
      else{
	comb[i][j]=comb[i-1][j-1]+comb[i-1][j];
      }
      if(comb[i][j]>rest){
	comb[i][j]=comb[i][j]%rest;
      }
    }
  }
  /*  for(int i=0;i<k;i++){
    for(int j=i;j<k;j++){
      combi[i][j]=comb(i,j);
    }}*/
  
  vector<int> ans(k+1);
  for(int i=1;i<k+1;i++){
    //    ans[i]=combi[n-k+1][i-1]*combi[k-1][i-1];
    ans[i]=comb[n-k+1][i]*comb[k-1][i-1];
    ans=ans%rest;
    cout<<ans[i]<<endl;
  }
  //  cout<<kaijo(n)<<endl;
  //  cout<<kaijo(k)<<endl;
  //  cout<<comb(n,k)<<endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:59:12: error: no match for 'operator%' (operand types are 'std::vector<int>' and 'const int')
   59 |     ans=ans%rest;
      |         ~~~^~~~~
      |         |   |
      |         |   const int
      |         std::vector<int>
Language: C++

#include <iostream>
#include <algorithm>
#include <queue>
#include <iterator>
#include <set>

const int MAX = 510000;
const int MOD = 1000000007;

long long fac[MAX], finv[MAX], inv[MAX];

// テーブルを作る前処理
void COMinit() {
    fac[0] = fac[1] = 1;
    finv[0] = finv[1] = 1;
    inv[1] = 1;
    for (int i = 2; i < MAX; i++){
        fac[i] = fac[i - 1] * i % MOD;
        inv[i] = MOD - inv[MOD%i] * (MOD / i) % MOD;
        finv[i] = finv[i - 1] * inv[i] % MOD;
    }
}

// 二項係数計算
long long COM(int n, int k){
    if (n < k) return 0;
    if (n < 0 || k < 0) return 0;
    return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}

int main()
{
    int n, k;
    cin >> n >> k;
    COMinit();
    for (int i = 0; i < k; ++i) {
        cout << COM(k-1, i) * COM(n-k+1, i+1) << endl;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:34:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   34 |     cin >> n >> k;
      |     ^~~
      |     std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:37:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   37 |         cout << COM(k-1, i) * COM(n-k+1, i+1) << endl;
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:37:50: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   37 |         cout << COM(k-1, i) * COM(n-k+1, i+1) << endl;
      |                                                  ^~~~
      |                                                  std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Test4{
	public static void main(String[] args) throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] dataStr = br.readLine().split(" ");
		int n = Integer.parseInt(dataStr[0]);
		int k = Integer.parseInt(dataStr[1]);
		
		for(int i=1; i<=k; i++)
			System.out.println((int)((combination(k-1, (i-1)) * combination(n-k-1,i))%(Math.pow(10, 9)+7)));
	}
	
	private static long combination(long n, long r){
		long result = 1;
		int i;
		for(i=0; i<r; i++)
			result *= n-i;
		for(i=2; i<=r; i++)
			result /= i;
		return result;
	}
}


Compiler output:
Main.java:5: error: class Test4 is public, should be declared in a file named Test4.java
public class Test4{
       ^
1 error
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Test4{
	public static void main(String[] args) throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] dataStr = br.readLine().split(" ");
		int n = Integer.parseInt(dataStr[0]);
		int k = Integer.parseInt(dataStr[1]);
		
		for(int i=1; i<=k; i++)
			System.out.println((int)((combination(k-1, (i-1)) * combination(n-k+1,i))%(Math.pow(10, 9)+7)));
	}
	
	private static long combination(long n, long r){
		long result = 1;
		int i;
		for(i=0; i<r; i++)
			result *= n-i;
		for(i=2; i<=r; i++)
			result /= i;
		return result;
	}
}


Compiler output:
Main.java:5: error: class Test4 is public, should be declared in a file named Test4.java
public class Test4{
       ^
1 error
Language: C++

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

typedef long long ll;

const ll mod = 1e9 + 7;

#define ff(i,n) for(int i=1;i<=n;i++)

ll C[4005][4005], n, k;

ll solve(int i, int total)
{
	if(total < i) return 0;
	if(i==0 && total > 0) return 0;
	if(i==0 && total == 0) return 1;
	if(i<0) return 0;
	total -= i;
	return C[i-1][total+i-1];
}

int main() {
	C[0][0] = 1;
	for(int i = 1; i <= 4000; i++)
	{
		C[0][i] = C[i][i] = 1;
		for(int j = 1; j < i; j++) 
		{
			C[j][i] = (C[j][i-1] + C[j-1][i-1])%mod;
		}
	}
	ll tmp = solve(i,k);
	cin >> n >> k;
	for(int i = 1; i <= k; i++) cout <<  (tmp * (solve(i-1,n-k) + 2*solve(i,n-k) + solve(i+1,n-k))%mod)%mod << endl;
}
//hahahahahahahahahhahahahahahaahahahahhahahahahahahah


Compiler output:
a.cc: In function 'int main()':
a.cc:32:24: error: 'i' was not declared in this scope
   32 |         ll tmp = solve(i,k);
      |                        ^
Language: C++

#include <iostream>
#include <cstdio>
#include <string>
#include <algorithm>
#include <cmath>
#include <vector>
#define rep(i, n) for(int i = 0; i < n; i++)
using namespace std;
typedef long long ll;
ll mod = 1000000007;

//aのp乗を求めるアルゴリズム。計算量はO(logp)
ll modpow(ll a, int p) {
    if(p == 0) {
        return 1;
    }
    if(p%2 == 0) {
        //pが偶数の時
        int halfP = p/2;
        ll half = modpow(a, halfP);
        //a^(p/2)をhalfとして、half*halfを計算
        return half * half % mod;
    }
    else {
        //pが奇数の時は、pを偶数にするために1減らす
        return a * modpow(a, p-1) % mod;
    }
}

ll Comb(int a, int b) {
    if(b > a-b) {
        return Comb(a, a-b);
    }

    ll ansMul = 1;
    ll ansDiv = 1;
    rep(i, b) {
        ansMul *= (a-i);
        ansDiv *= (i+1);
        ansMul %= mod;
        ansDiv %= mod;
    }
    // ansMul/ansDivをやりたい
    // ansDivの逆元を使って求めよう
    ll ans = ansMul * modpow(ansDiv, mod-2) % mod;

    return ans; 
}

int n, k;
ll f[k+1];

int main() {
    cin >> n >> k;
    
    for(int i = 1; i <= k; i++) {
        f[i] = Comb(n-k+1, i)*Comb(k-1, i-1)%mod;
        cout << f[i] << "\n";
    }
    
    return 0;
}

Compiler output:
a.cc:51:7: error: size of array 'f' is not an integral constant-expression
   51 | ll f[k+1];
      |      ~^~
Language: C++

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

typedef long long ll;
typedef vector<int> vi;
typedef pair<int,int> ii;
typedef vector<ii> vii;

#define minimum(a)					*min_element(a.begin(), a.end())
#define maximum(a)					*max_element(a.begin(), a.end())
#define all(v)                      v.begin(), v.end()
//#define debug(x) cout << '>' << #x << ':' << x << endl;
#define mp make_pair
#define ll   long long
#define trace1(x)                cerr<<#x<<": "<<x<<endl
#define trace2(x, y)             cerr<<#x<<": "<<x<<" | "<<#y<<": "<<y<<endl
#define trace3(x, y, z)          cerr<<#x<<":" <<x<<" | "<<#y<<": "<<y<<" | "<<#z<<": "<<z<<endl
#define trace4(a, b, c, d)       cerr<<#a<<": "<<a<<" | "<<#b<<": "<<b<<" | "<<#c<<": "<<c<<" | "<<#d<<": "<<d<<endl
#define trace5(a, b, c, d, e)    cerr<<#a<<": "<<a<<" | "<<#b<<": "<<b<<" | "<<#c<<": "<<c<<" | "<<#d<<": "<<d<<" | "<<#e<< ": "<<e<<endl
#define trace6(a, b, c, d, e, f) cerr<<#a<<": "<<a<<" | "<<#b<<": "<<b<<" | "<<#c<<": "<<c<<" | "<<#d<<": "<<d<<" | "<<#e<< ": "<<e<<" | "<<#f<<": "<<f<<endl

vector<vector<int> > ncr;

const int mod = 1000000007;

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int n,k;
    cin>>n>>k;
    ncr = vector<vector<int> > (n+2, vector<int>(n+2, 1));
    for(int i = 1; i<n+2; i++){
        for(int j = 1; j<i; j++){
            ncr[i][j] = (ncr[i-1][j] + ncr[i-1][j-1])%mod;
        }
    }
    int max1 = __min(k, n-k + 1);
    int i = 1;
    while(i <= max1){
        ll temp = (ncr[n-k + 1][i]*ncr[k-1][i-1])%mod;
        cout<<temp<<"\n";
        i++;
    }
    while(i <= k){
        cout<<0<<"\n";
        i++;
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:37:16: error: '__min' was not declared in this scope; did you mean '__sin'?
   37 |     int max1 = __min(k, n-k + 1);
      |                ^~~~~
      |                __sin
Language: C++

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

typedef long long ll;
typedef vector<int> vi;
typedef pair<int,int> ii;
typedef vector<ii> vii;

#define minimum(a)					*min_element(a.begin(), a.end())
#define maximum(a)					*max_element(a.begin(), a.end())
#define all(v)                      v.begin(), v.end()
//#define debug(x) cout << '>' << #x << ':' << x << endl;
#define mp make_pair
#define ll   long long
#define trace1(x)                cerr<<#x<<": "<<x<<endl
#define trace2(x, y)             cerr<<#x<<": "<<x<<" | "<<#y<<": "<<y<<endl
#define trace3(x, y, z)          cerr<<#x<<":" <<x<<" | "<<#y<<": "<<y<<" | "<<#z<<": "<<z<<endl
#define trace4(a, b, c, d)       cerr<<#a<<": "<<a<<" | "<<#b<<": "<<b<<" | "<<#c<<": "<<c<<" | "<<#d<<": "<<d<<endl
#define trace5(a, b, c, d, e)    cerr<<#a<<": "<<a<<" | "<<#b<<": "<<b<<" | "<<#c<<": "<<c<<" | "<<#d<<": "<<d<<" | "<<#e<< ": "<<e<<endl
#define trace6(a, b, c, d, e, f) cerr<<#a<<": "<<a<<" | "<<#b<<": "<<b<<" | "<<#c<<": "<<c<<" | "<<#d<<": "<<d<<" | "<<#e<< ": "<<e<<" | "<<#f<<": "<<f<<endl

vector<vector<int> > ncr;

const int mod = 1000000007;

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int n,k;
    cin>>n>>k;
    ncr = vector<vector<int> > (n+2, vector<int>(n+2, 1));
    for(int i = 1; i<n+2; i++){
        for(int j = 1; j<i; j++){
            ncr[i][j] = (ncr[i-1][j] + ncr[i-1][j-1])%mod;
        }
    }
    int max1 = __min(k, n-k + 1);
    int i = 1;
    while(i <= max1){
        ll temp = (ncr[n-k + 1][i]*ncr[k-1][i-1])%mod;
        cout<<temp<<"\n";
        i++;
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:37:16: error: '__min' was not declared in this scope; did you mean '__sin'?
   37 |     int max1 = __min(k, n-k + 1);
      |                ^~~~~
      |                __sin
Language: Java

import java.io.*;
import java.util.*;

public class  zz{
	static int mod=(int)1e9+7;
	static long[][]comb;
	static void nCr2(int N)		// O(N * N)
	{
		comb = new long[N][N];
		comb[0][0] = 1;
		for (int i = 1; i < N; i++)
		{
			comb[i][0] = 1;
			for (int j = 1; j <= i; j++)
				comb[i][j] = (comb[i-1][j] + comb[i-1][j-1])%mod;		//may use mod
		}
	}
    public static void main(String[] args) throws Exception{
        //MScanner sc = new MScanner("chess.in");
        MScanner sc = new MScanner(System.in);
        PrintWriter pw=new PrintWriter(System.out);
        //int n=sc.nextInt();int[]in=new int[n];
        //for(int i=0;i<n;i++)in[i]=sc.nextInt();
        int n=sc.nextInt();int b=sc.nextInt();int r=n-b;
        for(int i=1;i<=b;i++) {
        	long ans=(comb[r+1][i]*comb[b-1][i-1])%mod;
        	pw.println(ans);
        }
        pw.flush();
    }
    static class tri implements Comparable<tri>{
    	int type;int x;int y;
    	tri(int t,int a,int b){
    		type=t;x=a;y=b;
    	}
		@Override
		public int compareTo(tri o) {
			if(type!=o.type)
				return type-o.type;
			return o.x-x;
		}
		public String toString() {
			return "("+x+" "+y+")";
		}
    }
    static class MScanner {
		StringTokenizer st;
		BufferedReader br;
 
		public MScanner(InputStream system) {
			br = new BufferedReader(new InputStreamReader(system));
		}
 
		public MScanner(String file) throws Exception {
			br = new BufferedReader(new FileReader(file));
		}
 
		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}
 
		public String nextLine() throws IOException {
			return br.readLine();
		}
 
		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}
 
		public double nextDouble() throws IOException {
			return Double.parseDouble(next());
		}
 
		public char nextChar() throws IOException {
			return next().charAt(0);
		}
 
		public Long nextLong() throws IOException {
			return Long.parseLong(next());
		}
 
		public boolean ready() throws IOException {
			return br.ready();
		}
 
		public void waitForInput() throws InterruptedException {
			Thread.sleep(3000);
		}
	}
}

Compiler output:
Main.java:4: error: class zz is public, should be declared in a file named zz.java
public class  zz{
       ^
1 error
Language: C++

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

const int64_t mod=1e9+7;

int64_t modinv(int64_t x, int64_t m) {
  int64_t y=m, u=1, v=0;
  while(y) {
    int64_t t=x/y;
    x -= t*y;
    swap(x,y);
    u -= t*v;
    swap(u,v);
  }
  u %= m;
  if(u<0)
    u+=m;
  return u;
}

int64_t cm(int n, int k) {
  int i;
  int64_t r=1,x=1,y=1;
  if(n<k)
    return 0;
  else if(n==K)
    return 1;
  else if(k==1)
    return n;
  if(k>n-k)
    k=n-k;
  for(i=0; i<k; i++) {
    x*=n-i;
    y*=k-i;
    x%=mod;
    y%=mod;
  }
  return (x*modinv(y,mod))%mod;
}

int main() {
  int N,K,i;
  cin >> N >> K;
  for(i=0; i<K; i++)
    cout << cm(N-K+1, i+1)*cm(K-1, i) << endl;
}

Compiler output:
a.cc: In function 'int64_t cm(int, int)':
a.cc:26:14: error: 'K' was not declared in this scope
   26 |   else if(n==K)
      |              ^
Language: C++

#include<bits/stdc++.h>
#define me(a,x) memset(a,x,sizeof(a))
#define sc scanf
#define itn int
using namespace std;
const int N=1e6;
const long long mod=1e9+7;
const int oo=0x7fffffff;
const int sup=0x80000000;
typedef long long ll;
typedef unsigned long long ull;
template <typename it>void db(it *begin,it *end){while(begin!=end)cout<<(*begin++)<<" ";puts("");}
template <typename it>
string to_str(it n){string s="";while(n)s+=n%10+'0',n/=10;reverse(s.begin(),s.end());return s;}
template <typename it>int o(it a){cout<<a<<endl;return 0;}
ll mul(ll a,ll b,ll c){ll ans=0;for(;b;b>>=1,a=(a+a)%c)if(b&1)ans=(ans+a)%c;return ans;}
ll ksm(ll a,ll b,ll c){ll ans=1;for(;b;b>>=1,a=mul(a,a,c))if(b&1)ans=mul(ans,a,c);return ans;}
int n,k;
ll dp[3005][3005];
int main(){
	for(int i=1;i<3005;i++)dp[i][0]=1;
	for(int i=1;i<3005;i++){
	for(int j=1;j<=i;j++)dp[i][j]=(dp[i-1][j]+dp[i-1][j-1])%mod;
	cin>>n>>k;
	for(itn i=0;i<k;i++)o(dp[k-1][i]*dp[n-k+1][i+1]%mod);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:26:2: error: expected '}' at end of input
   26 | }
      |  ^
a.cc:20:11: note: to match this '{'
   20 | int main(){
      |           ^
Language: Java

public class Main {
	private static final int C = 1000000007;
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int K = sc.nextInt();
		
		if (K == 1) {
			System.out.println(N-K+1);
			return;
		}
		
		int[] pa = {1, 1};
		int[] blues = new int[0];
		int[] reds = new int[0];
		int R = N - K + 1;
		
		for (int i = 3; i <= N; i++) {
			int[] tmp = new int[i];
			tmp[0] = 1;
			tmp[i-1] = 1;
			
			for (int j = 1; j < pa.length; j++) {
				tmp[j] = pa[j]%C + pa[j-1]%C;
			}
			
			if (i == K) { blues = tmp; }
			if (i == R + 1) { reds = tmp; }
			pa=tmp;
		}
		
		for (int i = 0; i < K; i++) {
			System.out.println((blues[i]%C)*(reds[i+1]%C));
		}
		sc.close();
	}
}

Compiler output:
Main.java:4: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:4: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		                 ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: C++

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

//関数名：mod_pow
//概要：modつき指数関数
//第一引数a：指数の底
//第二引数b：指数
//第三引数mod：法となる値
//戻り値：a^b(m mod)
long long mod_pow(long long a, long long b, long long mod){
    if(b == 0) return 1;
    if(b % 2 == 0){
        long long d = mod_pow(a,b/2,mod);
        return (d*d)%mod;
    }else return a%mod*mod_pow(a,b-1,mod)%mod;
}

//関数名：mod_combination
//概要：modつき二項係数
//第一引数n：組み合わせの全体
//第二引数r：何個取り出すか
//第三引数mod：法となる値
//戻り値：nCr(m mod)
long long mod_combination(long long n,long long r,long long mod){
    if(r > n) return 0;
    if(n == r || r == 0) return 1;
    long long fact1 = 1,fact2 = 1;
    for(long long i = n; i >= n-r+1; i--) fact1 = fact1*i%mod;
    for(long long i = r; i >= 1; i--) fact2 = fact2*i%mod;
    return fact1*mod_pow(fact2,mod-2,mod)%mod;
}

int main(){
    long long n,k; cin >> n >> k;
    for(long long i = 1; i <= k; i++) cout << mod_combination(n-k+1,i,1e9+7)*mod_combination(k-1,i-1,1e9+7)%(1e9+7) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:35:108: error: invalid operands of types 'long long int' and 'double' to binary 'operator%'
   35 |     for(long long i = 1; i <= k; i++) cout << mod_combination(n-k+1,i,1e9+7)*mod_combination(k-1,i-1,1e9+7)%(1e9+7) << endl;
      |                                               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
      |                                                                             |                                   |
      |                                                                             long long int                       double
Language: C++

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

//関数名：mod_pow
//概要：modつき指数関数
//第一引数a：指数の底
//第二引数b：指数
//第三引数mod：法となる値
//戻り値：a^b(m mod)
long long mod_pow(long long a, long long b, long long mod){
    if(b == 0) return 1;
    if(b % 2 == 0){
        long long d = mod_pow(a,b/2,mod);
        return (d*d)%mod;
    }else return a%mod*mod_pow(a,b-1,mod)%mod;
}

//関数名：mod_combination
//概要：modつき二項係数
//第一引数n：組み合わせの全体
//第二引数r：何個取り出すか
//第三引数mod：法となる値
//戻り値：nCr(m mod)
long long mod_combination(long long n,long long r,long long mod){
    if(r > n) return 0;
    if(n == r || r == 0) return 1;
    long long fact1 = 1,fact2 = 1;
    for(long long i = n; i >= n-r+1; i--) fact1 = fact1*i%mod;
    for(long long i = r; i >= 1; i--) fact2 = fact2*i%mod;
    return fact1*mod_pow(fact2,mod-2,mod)%mod;
}

int main(){
    ll n,k; cin >> n >> k;
    for(long long i = 1; i <= k; i++) cout << mod_combination(n-k+1,i,1e9+7)*mod_combination(k-1,i-1,1e9+7)%(1e9+7) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:34:5: error: 'll' was not declared in this scope
   34 |     ll n,k; cin >> n >> k;
      |     ^~
a.cc:34:20: error: 'n' was not declared in this scope; did you mean 'yn'?
   34 |     ll n,k; cin >> n >> k;
      |                    ^
      |                    yn
a.cc:34:25: error: 'k' was not declared in this scope
   34 |     ll n,k; cin >> n >> k;
      |                         ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
unsigned long long int mod = 1000000000 + 7;
 
void comb(vector<vector<unsigned long long int>> &vs){
    
  for(int i = 0 ; i < vs.size() ;i++){
    vs[i][0] = 1;
    vs[i][i] = 1;
  }
  
  for(int i = 1; i < vs.size(); i++){
      for(int j = 1; j < i ; j++){
        vs[i][j] = (vs[i-1][j-1] +vs[i-1][j]) % mod;
      }
  }
 
  return vs;
}
 
int main(){
  unsigned long long int N, K;
  cin >> N >> K;
  vector<vector<unsigned long long int>> vs(N + 1, vector<unsigned long long int>(N + 1, 0));

  comb(vs);
  
  for(int i = 1; i <= K ;i++){   
   auto c = vs[K-1][i-1] % mod;
   auto c1 = vs[N-K+1][i]%mod;
   cout <<c * c1 << endl;
  }
  
  return 0;
}


Compiler output:
a.cc: In function 'void comb(std::vector<std::vector<long long unsigned int> >&)':
a.cc:18:10: error: return-statement with a value, in function returning 'void' [-fpermissive]
   18 |   return vs;
      |          ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
unsigned long long int mod = 1000000000 + 7;
 
void comb(vector<vector<unsigned long long int>> &vs){
    
  for(int i = 0 ; i < vs.size() ;i++){
    vs[i][0] = 1;
    vs[i][i] = 1;
  }
  
  for(int i = 1; i < vs.size(); i++){
      for(int j = 1; j < i ; j++){
        vs[i][j] = (vs[i-1][j-1] +vs[i-1][j]) % mod;
      }
  }
 
  return vs;
}
 
int main(){
  unsigned long long int N, K;
  cin >> N >> K;
  vector<vector<unsigned long long int>> vs(N + 1, vector<unsigned long long int>(N + 1, 0));

  comb(vs);
  
  for(int i = 1; i <= K ;i++){   
   auto c = v[K-1][i-1] % mod;
   auto c1 = v[N-K+1][i]%mod;
   cout <<c * c1 << endl;
  }
  
  return 0;
}


Compiler output:
a.cc: In function 'void comb(std::vector<std::vector<long long unsigned int> >&)':
a.cc:18:10: error: return-statement with a value, in function returning 'void' [-fpermissive]
   18 |   return vs;
      |          ^~
a.cc: In function 'int main()':
a.cc:29:13: error: 'v' was not declared in this scope
   29 |    auto c = v[K-1][i-1] % mod;
      |             ^
Language: C++

//
// Created by kz_morita on 2019-07-02.
//

#include <iostream>
#include <vector>

using namespace std;

unsigned long long combination(int n, int k) {

    unsigned long long numerator = 1;
    unsigned long long denominator = 1;

    int count = k;

    for (int i = 0; i < count; ++i) {
        numerator *= n--;
        denominator *= k--;
    }

    return numerator / denominator;
}

int main() {

    int n, k;
    cin >> n >> k;

    unsigned long long = 1000000000 + 7;


    int numOfSeparate = n-k+1;
    for (int i = 1; i <= k; ++i) {
        if (i > numOfSeparate) {
            cout << 0 << endl;
            continue;
        }

        unsigned long long result = combination(numOfSeparate, i) * combination(k-1, i-1) % 1000000007;
        cout << result << endl;
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:24: error: expected unqualified-id before '=' token
   30 |     unsigned long long = 1000000000 + 7;
      |                        ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
unsinged long long int mod = 1000000007;

unsigned long long int comp(float n, float i){
  unsigned long long int ans = 1;unsigned long long int
  for(int a = 0; a < i ;a++){
    ans *= ((n-a) / (i-a)) % mod ;
  }
  
  return ans;
}
 
int main(){
  int N, K;
  cin >> N >> K;
  
  int blue = K;
  int red = N - K;
  
  for(int i = 1; i <= K ;i++){   
   unsigned long long int pat = comp(K-1,i-1) * comp(red + 1,i);
  
   cout <<pat << endl;
  }
  
  return 0;
}

Compiler output:
a.cc:3:1: error: 'unsinged' does not name a type; did you mean 'unsigned'?
    3 | unsinged long long int mod = 1000000007;
      | ^~~~~~~~
      | unsigned
a.cc: In function 'long long unsigned int comp(float, float)':
a.cc:7:3: error: expected unqualified-id before 'for'
    7 |   for(int a = 0; a < i ;a++){
      |   ^~~
a.cc:7:18: error: 'a' was not declared in this scope
    7 |   for(int a = 0; a < i ;a++){
      |                  ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
long long int comp(float n, float i){
  long double ans = 1;
  for(int a = 0; a < i ;a++){
    ans *= (n-a) / (i-a);
  }
  
  return ans;
}
 
int main(){
  int N, K;
  cin >> N >> K;
  
  int blue = K;
  int red = N - K;
  
  for(int i = 1; i <= K ;i++){
      
     unsigned long long int pat = (comp(K-1,i-1) * comp(red + 1,i)) % (pow(10,9) + 7) ;
    /* if(pat < 0){
       cout << "OVER FLOW" <<endl;
       cout <<comp(K-1,i-1)<<endl;
       cout << comp(red + 1,i) <<endl;
       
     }*/
    
   cout <<pat << endl;
  }
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:69: error: invalid operands of types 'long long int' and '__gnu_cxx::__promote<double>::__type' {aka 'double'} to binary 'operator%'
   22 |      unsigned long long int pat = (comp(K-1,i-1) * comp(red + 1,i)) % (pow(10,9) + 7) ;
      |                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~
      |                                                  |                               |
      |                                                  long long int                   __gnu_cxx::__promote<double>::__type {aka double}
Language: C++

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

typedef unsigned long long ll;

const ll MOD = 1e9+7;

ll ModPow(ll base,ll exp,ll mod){
  ll ret = 1;
  base %= mod;
  while(exp>0){
    if(exp&1) ret = (ret*base)%mod;
    base = (base*base)%mod;
    exp >>= 1;
  }
  return ret;
}

ll ModInv(ll base,ll mod){
  return ModPow(base,mod-2,mod);
}

ll Comb(ll n, ll r,ll fct[][2003]){
  assert(n<=2000);
  return fct[0][n]*(fct[1][r]*fct[1][n-r]%MOD)%MOD;
}

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

  ll fct[2][2020];
  fct[0][0] = fct[0][1] = 1;
  for(ll i=2; i<=n+19; fct[0][i]%=MOD,i++)
    fct[0][i] = fct[0][i-1]*(i%MOD);

  for(ll i=0; i<=n+19; i++)
    fct[1][i] = ModPow(fct[0][i],MOD-2,MOD);

  for(ll i=0; i<k; i++)
    cout << (Comb(k-1,i,fct)*Comb(n-k+1,i+1,fct))%MOD << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:41:25: error: cannot convert 'll (*)[2020]' {aka 'long long unsigned int (*)[2020]'} to 'll (*)[2003]' {aka 'long long unsigned int (*)[2003]'}
   41 |     cout << (Comb(k-1,i,fct)*Comb(n-k+1,i+1,fct))%MOD << endl;
      |                         ^~~
      |                         |
      |                         ll (*)[2020] {aka long long unsigned int (*)[2020]}
a.cc:24:23: note:   initializing argument 3 of 'll Comb(ll, ll, ll (*)[2003])'
   24 | ll Comb(ll n, ll r,ll fct[][2003]){
      |                    ~~~^~~~~~~~~~~
a.cc:41:45: error: cannot convert 'll (*)[2020]' {aka 'long long unsigned int (*)[2020]'} to 'll (*)[2003]' {aka 'long long unsigned int (*)[2003]'}
   41 |     cout << (Comb(k-1,i,fct)*Comb(n-k+1,i+1,fct))%MOD << endl;
      |                                             ^~~
      |                                             |
      |                                             ll (*)[2020] {aka long long unsigned int (*)[2020]}
a.cc:24:23: note:   initializing argument 3 of 'll Comb(ll, ll, ll (*)[2003])'
   24 | ll Comb(ll n, ll r,ll fct[][2003]){
      |                    ~~~^~~~~~~~~~~
Language: C++

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

typedef unsigned long long ll;

const ll MOD = 1e9+7;

ll ModPow(ll base,ll exp,ll mod){
  ll ret = 1;
  base %= mod;
  while(exp>0){
    if(exp&1) ret = (ret*base)%mod;
    base = (base*base)%mod;
    exp >>= 1;
  }
  return ret;
}

ll ModInv(ll base,ll mod){
  return ModPow(base,mod-2,mod);
}

ll Comb(ll n, ll r,ll fct[][2001]){
  assert(n<=2000);
  return fct[0][n]*(fct[1][r]*fct[1][n-r]%MOD)%MOD;
}

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

  ll fct[2][2003];
  fct[0][0] = fct[0][1] = 1;
  for(ll i=2; i<=n+1; fct[0][i]%=MOD,i++)
    fct[0][i] = fct[0][i-1]*(i%MOD);

  for(ll i=0; i<=n+1; i++)
    fct[1][i] = ModPow(fct[0][i],MOD-2,MOD);

  for(ll i=0; i<k; i++)
    cout << (Comb(k-1,i,fct)*Comb(n-k+1,i+1,fct))%MOD << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:41:25: error: cannot convert 'll (*)[2003]' {aka 'long long unsigned int (*)[2003]'} to 'll (*)[2001]' {aka 'long long unsigned int (*)[2001]'}
   41 |     cout << (Comb(k-1,i,fct)*Comb(n-k+1,i+1,fct))%MOD << endl;
      |                         ^~~
      |                         |
      |                         ll (*)[2003] {aka long long unsigned int (*)[2003]}
a.cc:24:23: note:   initializing argument 3 of 'll Comb(ll, ll, ll (*)[2001])'
   24 | ll Comb(ll n, ll r,ll fct[][2001]){
      |                    ~~~^~~~~~~~~~~
a.cc:41:45: error: cannot convert 'll (*)[2003]' {aka 'long long unsigned int (*)[2003]'} to 'll (*)[2001]' {aka 'long long unsigned int (*)[2001]'}
   41 |     cout << (Comb(k-1,i,fct)*Comb(n-k+1,i+1,fct))%MOD << endl;
      |                                             ^~~
      |                                             |
      |                                             ll (*)[2003] {aka long long unsigned int (*)[2003]}
a.cc:24:23: note:   initializing argument 3 of 'll Comb(ll, ll, ll (*)[2001])'
   24 | ll Comb(ll n, ll r,ll fct[][2001]){
      |                    ~~~^~~~~~~~~~~
Language: C++

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

typedef long long ll;

const ll MOD = 1e9+7;

ll ModPow(ll base,ll exp,ll mod){
  ll ret = 1;
  base %= mod;
  while(exp>0){
    if(exp&1) ret = (ret*base)%mod;
    base = (base*base)%mod;
    exp >>= 1;
  }
  return ret;
}

ll ModInv(ll base,ll mod){
  return ModPow(base,mod-2,mod);
}

ll Comb(ll n, ll r,ll fct[][2001]){
  return fct[0][n]*(fct[1][r]*fct[1][n-r]%MOD)%MOD;
}

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

  ll fct[2][4001];
  fct[0][0] = fct[0][1] = 1;
  for(ll i=2; i<=n; fct[0][i]%=MOD,i++)
    fct[0][i] = fct[0][i-1]*(i%MOD);

  for(ll i=0; i<=n; i++)
    fct[1][i] = ModPow(fct[0][i],MOD-2,MOD);

  for(ll i=0; i<k; i++)
    cout << (Comb(k-1,i,fct)*Comb(n-k+1,i+1,fct))%MOD << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:39:25: error: cannot convert 'll (*)[4001]' {aka 'long long int (*)[4001]'} to 'll (*)[2001]' {aka 'long long int (*)[2001]'}
   39 |     cout << (Comb(k-1,i,fct)*Comb(n-k+1,i+1,fct))%MOD << endl;
      |                         ^~~
      |                         |
      |                         ll (*)[4001] {aka long long int (*)[4001]}
a.cc:23:23: note:   initializing argument 3 of 'll Comb(ll, ll, ll (*)[2001])'
   23 | ll Comb(ll n, ll r,ll fct[][2001]){
      |                    ~~~^~~~~~~~~~~
a.cc:39:45: error: cannot convert 'll (*)[4001]' {aka 'long long int (*)[4001]'} to 'll (*)[2001]' {aka 'long long int (*)[2001]'}
   39 |     cout << (Comb(k-1,i,fct)*Comb(n-k+1,i+1,fct))%MOD << endl;
      |                                             ^~~
      |                                             |
      |                                             ll (*)[4001] {aka long long int (*)[4001]}
a.cc:23:23: note:   initializing argument 3 of 'll Comb(ll, ll, ll (*)[2001])'
   23 | ll Comb(ll n, ll r,ll fct[][2001]){
      |                    ~~~^~~~~~~~~~~
Language: C++

#include <iostream>
#include <vector>
using namespace std;

uint64_t gcd(uint64_t a, uint64_t b)
{
    uint64_t r;
    while ((r = a % b) != 0) {
        a = b;
        b = r;
    }

    return b;
}

uint64_t binomial(uint64_t n, uint64_t r)
{
    r = (r > n / 2) ? n - r : r;
    uint64_t result = 1;

    for (uint64_t i = 1; i <= r; i++, n--) {
        int d = gcd(result, i);

        result /= d;
        result *= n / (i / d);
    }

    return result;
}

int main(){
    int N, K;
    cin >> N >> K;
    int ans;
    
    for(int i=1; i<=K; i++){
        ans = binomial(N-K+1, i) * binomial(K-1, i-1);
        ans = ans % int(1E9 + 7);
        cout << ans << endl;
    }
}

Compiler output:
a.cc:5:1: error: 'uint64_t' does not name a type
    5 | uint64_t gcd(uint64_t a, uint64_t b)
      | ^~~~~~~~
a.cc:3:1: note: 'uint64_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
    2 | #include <vector>
  +++ |+#include <cstdint>
    3 | using namespace std;
a.cc:16:1: error: 'uint64_t' does not name a type
   16 | uint64_t binomial(uint64_t n, uint64_t r)
      | ^~~~~~~~
a.cc:16:1: note: 'uint64_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
a.cc: In function 'int main()':
a.cc:37:15: error: 'binomial' was not declared in this scope
   37 |         ans = binomial(N-K+1, i) * binomial(K-1, i-1);
      |               ^~~~~~~~