criyle/codenet-compile-errors huggingface dataset:
Language: C++

#include <bits/stdc++.h>
#define fir first
#define sec second
#define mp std::make_pair

typedef long long ll;

const int N = 2005;
const int MOD = 1e9 + 7;

int prim_const( int x){
    vector<bool> prime(x, true);
    prime[0] = prime[1] = false;
    for (int i=2; i * i<=x; ++i){
        if (prime[i]){
            if (i * 1ll * i <= x){
                for (int j=i*i; j<=x; j+=i){
                    prime[j] = false;
                }
            }
        }
    }
    if (prime[x] == true){
        return 1;
    }else{
        return 0;
    }
}
int n, k;
ll c[N][N];
inline void init() {
    for (int i = 0; i <= 2000; i++)
        c[i][0] = 1;
    for (int i = 1; i <= 2000; i++)
     {
        for (int j = 1; j <= i; j++) {
            c[i][j] = (c[i - 1][j] + c[i - 1][j - 1]) % MOD;
        }
    }
}

int main() {
    init();
    std::cin >> n >> k;
    for (int i = 1; i <= k; i++) {
        printf("%lld\n", c[k - 1][i - 1] * c[n - k + 1][i] % MOD);
    }
    return 0;
}


Compiler output:
a.cc: In function 'int prim_const(int)':
a.cc:12:5: error: 'vector' was not declared in this scope
   12 |     vector<bool> prime(x, true);
      |     ^~~~~~
a.cc:12:5: note: suggested alternatives:
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_vector.h:428:11: note:   'std::vector'
  428 |     class vector : protected _Vector_base<_Tp, _Alloc>
      |           ^~~~~~
/usr/include/c++/14/vector:93:13: note:   'std::pmr::vector'
   93 |       using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
      |             ^~~~~~
a.cc:12:12: error: expected primary-expression before 'bool'
   12 |     vector<bool> prime(x, true);
      |            ^~~~
a.cc:13:5: error: 'prime' was not declared in this scope
   13 |     prime[0] = prime[1] = false;
      |     ^~~~~
a.cc:28:1: warning: control reaches end of non-void function [-Wreturn-type]
   28 | }
      | ^
Language: C++

//#pragma GCC optimize(2)
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxnn=1e6+7;
const int mod=1e9+7;
const ll inf=1e18+7;
ll sum[maxnn];
void init()
{
    sum[1]=1ll;
    for(ll i=2;i<=100000;i++)
    {
        sum[i]=sum[i-1]*i;
        sum[i]%=mod;
    }
}
ll ksm(ll a,ll b)
{
    ll ans=1;
    while(b)
    {
        if(b&1)
            ans=(ans*a)%mod;
        a=(a*a)%mod;
        b>>=1;
    }
    return ans%mod;
}
ll ny(ll a,ll b)
{
    return a*ksm(b,mod-2)%mod;
}
ll c(ll n,ll m)
{
    if(n<m) return 0;
    if(m==0||n==m) return 1ll;
    return ny(sum[n],sum[n-m]*sum[m]%mod);
}
ll MOD(ll x)
{
    return (x+mod)%mod;
}
int main()
{
    ll n,k;
    init();
    scanf("%lld %lld",&n,&k);
    for(ll i=1ll;i<=k;i++)
    {
        //printf("%lld %lld\n",c(n-k+1,min(i,n-k+1)),c(k-1,min(i,n-k+1)-1));
        printf("%lld\n",MOD(c(n-k+1,i))*c(k-1,i-1)));
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:52:52: error: expected ';' before ')' token
   52 |         printf("%lld\n",MOD(c(n-k+1,i))*c(k-1,i-1)));
      |                                                    ^
      |                                                    ;
Language: C++

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

#define fi first
#define se second
#define be begin
#define en end
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define ALL(a) (a).be() , (a).en()
#define REP(i,n) for(int (i)=0;(i)<(n);(i)++)        //repeat n times
#define REP2(i,s,n) for(int (i)=(s);(i)<(n);(i)++)   //repeat from s to n 
#define REPD(i,n) for(int (i)=(n);(i)>=0;(i)--)      //repeat from n to 0
#define REPD2(i,s,e) for(int (i)=(s);(i)>=(e);(i)--) //repeat from s to e
#define RANGE(i,v) for(auto &(i):v)                  //repeat range
#define ASIZE(a) (sizeof(a) / sizeof(a[0]))          //array size

using LL = long long;

template<typename T> using V = vector< T >;
using Vi = V<int>;
using Vll = V<LL>;
using Vs = V<string>;

template<typename T1,typename T2> using M = map< T1, T2>;
using Mii = M<int, int>;
using Msi = M<string, int>;
using Mci = M<char, int>;

const LL MOD = 1000000007;

//Bipartite method : x^n
LL BMPow(int x,int n,int m=0){
    LL ans=1;LL p=x;
    if(m==0){ while(n>0){if(n&1==1){ans*=p;} p*=p; n>>=1;}}
    else{ while(n>0){if(n&1==1){ans=(ans*p)%m;} p=(p*p)%m ;n>>=1;}}
    return ans;
}

//x^-1=x^(m-2) mod m
LL modInv(LL x,int m){return BMPow(x,m-2,m);}

class Combination{
    V<LL> fact,fact_inv;
    LL mod;
    public:
        Combination(int n,int m): fact(n+1),fact_inv(n+1) {
            mod = m;
            fact[0] = 1;
            for(int i=1; i<=n; i++) fact[i] = (fact[i-1]*i)%mod;
            fact_inv[n] = modInv(fact[n],mod);
            for(int i=n; i>=1; i--) fact_inv[i-1] = (fact_inv[i]*i)%mod;
        }

        LL operator()(int n,int k){
            if(k<0 || k>n) return 0;
            return (((fact[n]*fact_inv[k])%mod)*fact_inv[n-k])%mod;
        }
};

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

    Combination C(n,MOD);

    REP(i,k){
        cout<<<<(C(n-k+1,i+1)*C(k-1,i))%MOD<<endl;
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:69:15: error: expected primary-expression before '<<' token
   69 |         cout<<<<(C(n-k+1,i+1)*C(k-1,i))%MOD<<endl;
      |               ^~
Language: C++

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

const int MAX = 5000;
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() {
  int N, K;
  cin >> N >> K;
  COMinit();
  
  for(int i=1;i<=K;i++) {
    cout << COM(K-1, i-1) * COM(N-K+1, i) % MOD << endl;
  }

  return 0;
}

Compiler output:
a.cc:1:10: fatal error: ../bits/stdc++.h: No such file or directory
    1 | #include "../bits/stdc++.h"
      |          ^~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for (int i = 0; i < (n); ++i)
std::vector<std::vector<long long>> comb(int n, int r) {
  std::vector<std::vector<long long>> v(n + 1,std::vector<long long>(n + 1, 0));
  for (int i = 0; i < v.size(); i++) {
    v[i][0] = 1;
    v[i][i] = 1;
  }
  for (int j = 1; j < v.size(); j++) {
    for (int k = 1; k < j; k++) {
      v[j][k] = (v[j - 1][k - 1] + v[j - 1][k]);
    }
  }
  return v;
}

int main(){
    int m;
    int k;
    cin>>m>>k;
    vector<vector<long long>> a=comb(m,k);
    vector<vector<long long>> b=comb(k,k);
    if (n==k) cout <<"1"<<endl;
    else{
    for(int i=1;i<k+1;i++){
        long long ans = a[m-k+1][i]*b[k-1][i-1]%1000000007;
        cout << ans<<endl;
    }}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:9: error: 'n' was not declared in this scope
   24 |     if (n==k) cout <<"1"<<endl;
      |         ^
Language: C++

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

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

long long cob(long long a, long long b){
  long long over = 1;
  long long under = 1;
  for(int i = 0; i < b; i++){
    over *= out - i;
    over %= 1000000007;
  }
  for(int i = 1; i < b + 1; i++){
    under *= i;
    under %= 1000000007;
  }
  return over * modinv(under);
}

int main(){
  long long n, k; cin >> n >> k;
  vector<long long> out(k);
  for(int i = 1; i < k + 1; i++){
    if(n - k < i - 1){
      cout << 0 << endl;
      continue;
    }
    long long b = cob(k - 1, i - 1);
    long long r = cob(n - k - 1, i);
    cout << b * r % 1000000007;
  }
}

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

#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define rep(i, n) for (ll i = 0; i < (n); i++)
#define FOR(i,a,b) for(ll i=(a);i<(b);i++)
#define FORR(i,a,b)for(ll i=(a);i<=(b);i++)
#define repR(i,n) for(ll i=n;i>=0;i--)
#define all(v)(v).begin(),(v).end()
#define rall(v)(v).rbegin(),(v).rend()
#define F first
#define S second
#define pb push_back
#define pu push
#define COUT(x) cout<<(x)<<endl
#define PQ priority_queue<ll>
#define PQR priority_queue<ll,vector<ll>,greater<ll>>
#define YES(n) cout << ((n) ? "YES" : "NO"  ) << endl
#define Yes(n) cout << ((n) ? "Yes" : "No"  ) << endl
#define mp make_pair
#define maxs(x,y) (x = max(x,y))
#define mins(x,y) (x = min(x,y))
#define sz(x) (int)(x).size()
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
const ll MOD = 1000000007LL;
const ll INF = 1LL << 60;
using vll = vector<ll>;
using vvll = vector<vll>;
using vstr = vector<string>;
using pll = pair<ll, ll>;
const int MAX = 700000;
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(){
  COMinit();
  ll n,k;
  cin>>n>>k;
  int a=n-k;
  for(int i=1;i<=k;i++){
    int h=k-i+1;
    int hh=COM(h,i-1);
    if(a+1<i) {
      COUT(0);
      continue;
    }
    else if(a>=i+1){
      int d=a-i+1;
      int dd=COM(d,i-1);
      dd=dd*2%MOD;
      int t=a-i;
      int tt=COM(t,i);
      int y=a-i+2;
      int yy=COM(y,i-1);
      COUT((tt*dd)%MOD*hh%MOD*yy%MOD);
    }
    else if(a==i){
      int d=a-i+1;
      int dd=COM(d,i-1);
      dd=dd*2%MOD;
      COUT(dd*hh%MOD);
    }
    else if(a-1==i){
      int y=a-i+2;
      int yy=COM(y,i-1);
      COUT(yy*hh%MOD);
    }
  }
}

Compiler output:
a.cc:32:11: error: conflicting declaration 'const int MOD'
   32 | const int MOD = 1000000007;
      |           ^~~
a.cc:25:10: note: previous declaration as 'const long long int MOD'
   25 | const ll MOD = 1000000007LL;
      |          ^~~
Language: C++

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

typedef long long ll;

const int MOD = 1e9 + 7;
const int N = 2000;
ll nck[N + 5][N + 5];

int main() {
    ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);

    for (int i = 1; i <= N; i++) {
        nck[i][0] = nck[i][i] = 1;        
        for (int j = 1; j < i; j++) {
            nck[i][j] = (nck[i - 1][j] + nck[i - 1][j - 1]) % MOD;
        }
    }

    int n, blue;
    cin >> n >> blue;
    int red = n - blue;
    for (int i = 1; i <= blue; i++) {
        if (i > n - k + 1) {
            cout << 0 << '\n';
            continue;
        }
        ll splitblue = nck[blue - 1][i - 1];
        ll splitred = nck[red + 1][i];
        ll ways = (splitblue*splitred) % MOD;
        cout << ways << '\n';
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:21: error: 'k' was not declared in this scope
   24 |         if (i > n - k + 1) {
      |                     ^
Language: C++

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


const int mod = 1e9+7;
//ll combi[2001][2000];

/*void calc(ll combi[][],n){
    for(int i = 1; i < n+1; i++){
        if(i == 1){
            combi[1][0] = 1;
            combi[1][1] = 1;
        }
        for(int j = 0; j <= i; j++){
            if(j == 0 || j == i){
                combi[i][j] = 1;
            }
            else{
                combi[i][j] = combi[i-1][j-1] + combi[i-1][j];
            }
        }
    }
}
*/

int main(){
    ll i,n,k;
    cin >> n >> k;
    ll combi[n+5][n+5];

    for(int i = 1; i < n+1; i++){
        if(i == 1){
            combi[1][0] = 1;
            combi[1][1] = 1;
        }
        for(int j = 0; j <= i; j++){
            if(j == 0 || j == i){
                combi[i][j] = 1;
            }
            else{
                combi[i][j] = (combi[i-1][j-1] + combi[i-1][j]) % mod;
            }
        }
        }

    for(i = 1; i < k+1; i++){
        //ll h1 = kaijou(k-1) % mod;
        //ll h2 = kaijou(i-i) % mod;
        //ll hoge = kaijou(k-1)/(kaijou(k-i) * kaijou(i-1)); 
        //ll huga = kaijou(n-k+1)/ (kaijou(n-k+1-i) * kaijou(i));
        //ll ans = hoge * huga % 1000000007;



        //calc(combi,n);
        ll ans;
        if(n-k+1 < i){
            ans = 0;
        }
        else{
            ans = combi[n-k+1][i]; * combi[k-1][i-1]; % mod;
        }
        cout << ans << endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:62:36: error: invalid type argument of unary '*' (have 'll' {aka 'long long int'})
   62 |             ans = combi[n-k+1][i]; * combi[k-1][i-1]; % mod;
      |                                    ^~~~~~~~~~~~~~~~~
a.cc:62:55: error: expected primary-expression before '%' token
   62 |             ans = combi[n-k+1][i]; * combi[k-1][i-1]; % mod;
      |                                                       ^
Language: Java

import java.util.Arrays;
import java.util.Scanner;
class Main{


	static char[][] map;

	static long[][] c;
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);			//文字の入力
		int n = sc.nextInt();
		int k = sc.nextInt();
		long ans = 0;
		long mod = 1000000000 + 7;

		c = new long[4005][4005];
		c[0][0] = 1;
		for(int i = 0;i <= 4000;i++){
			for(int j = 0;j <= i;j++){
				c[i+1][j] += c[i][j] % mod;
				c[i+1][j+1] += c[i][j] % mod ;
			}
		}
		for(int i = 1;i <= k;i++){
			System.out.println((c[n-k-1][i] * c[k-1][i-1])%mod );
		}

		for(int i = 1;i <= k;i++){
			long blue = f(k,i);
			long red = 0;
			red += f(n-k,i-1);
			red += f(n-k,i);
			red += f(n-k,i);
			red += f(n-k,i+1);
			ans = blue * red % mod;
			System.out.println(ans);
		}
	}


	static int gcd(int a,int b){				//最大公約数を返す
		if(b == 0){
			return a;
		}else{
			return gcd(b, a%b);
		}
	}
	static long gcd(long a,long b){
		if(b == 0){
			return a;
		}else{
			return gcd(b, a%b);
		}
	}



	static long lcm (long a, long b) {
		long g = gcd(a,b);
		return a/g*b;
	}




}



class Pair implements Comparable{
	int from;
	int end;
	@Override
	public int compareTo(Object other) {
		Pair otherpair = (Pair)other;

		return   end- otherpair.end;
	}







	static int find(int index,int current,int[] students,int ans,int[][] memo){
		if(current == index){
			return 1;
		}

		if(memo[current][index] != 0){
			return memo[current][index];
		}

		memo[current][index] = find(index, students[current]-1, students, ans+1, memo)+1;

		return memo[current][index];
	}



	static int gcd(int a,int b){				//最大公約数を返す
		if(b == 0){
			return a;
		}else{
			return gcd(b, a%b);
		}
	}
	static long gcd(long a,long b){
		if(b == 0){
			return a;
		}else{
			return gcd(b, a%b);
		}
	}



	static long lcm (long a, long b) {
		long g = gcd(a,b);
		return a/g*b;
	}




}






Compiler output:
Main.java:29: error: cannot find symbol
			long blue = f(k,i);
			            ^
  symbol:   method f(int,int)
  location: class Main
Main.java:31: error: cannot find symbol
			red += f(n-k,i-1);
			       ^
  symbol:   method f(int,int)
  location: class Main
Main.java:32: error: cannot find symbol
			red += f(n-k,i);
			       ^
  symbol:   method f(int,int)
  location: class Main
Main.java:33: error: cannot find symbol
			red += f(n-k,i);
			       ^
  symbol:   method f(int,int)
  location: class Main
Main.java:34: error: cannot find symbol
			red += f(n-k,i+1);
			       ^
  symbol:   method f(int,int)
  location: class Main
5 errors
Language: Java

import java.util.Arrays;
import java.util.Scanner;
class Main{


	static char[][] map;

	static long[][] c;
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);			//文字の入力
		int n = sc.nextInt();
		int k = sc.nextInt();
		long ans = 0;
		long mod = 1000000000 + 7;
		
		c = new long[4005][4005];
		c[0][0] = 1;
		for(int i = 0;i <= 4000;i++){
			for(int j = 0;j <= i;j++){
				c[i+1][j] += c[i][j] % mod;
				c[i+1][j+1] += c[i][j] % mod ;
			}
		}
		for(int i = 1;i <= k;i++){
			System.out.println((c[n-k-1][i] * c[k-1][i-1])%mod );
		}

		for(int i = 1;i <= k;i++){
			long blue = f(k,i);
			long red = 0;
			red += f(n-k,i-1);
			red += f(n-k,i);
			red += f(n-k,i);
			red += f(n-k,i+1);
			ans = blue * red % mod;
			System.out.println(ans);
		}
	}
	

	static int gcd(int a,int b){				//最大公約数を返す
		if(b == 0){
			return a;
		}else{
			return gcd(b, a%b);
		}
	}
	static long gcd(long a,long b){
		if(b == 0){
			return a;
		}else{
			return gcd(b, a%b);
		}
	}



	static long lcm (long a, long b) {
		long g = gcd(a,b);
		return a/g*b;
	}




}



class Pair implements Comparable{
	int from;
	int end;
	@Override
	public int compareTo(Object other) {
		Pair otherpair = (Pair)other;

		return   end- otherpair.end;
	}







	static int find(int index,int current,int[] students,int ans,int[][] memo){
		if(current == index){
			return 1;
		}

		if(memo[current][index] != 0){
			return memo[current][index];
		}

		memo[current][index] = find(index, students[current]-1, students, ans+1, memo)+1;

		return memo[current][index];
	}



	static int gcd(int a,int b){				//最大公約数を返す
		if(b == 0){
			return a;
		}else{
			return gcd(b, a%b);
		}
	}
	static long gcd(long a,long b){
		if(b == 0){
			return a;
		}else{
			return gcd(b, a%b);
		}
	}



	static long lcm (long a, long b) {
		long g = gcd(a,b);
		return a/g*b;
	}




}






Compiler output:
Main.java:29: error: cannot find symbol
			long blue = f(k,i);
			            ^
  symbol:   method f(int,int)
  location: class Main
Main.java:31: error: cannot find symbol
			red += f(n-k,i-1);
			       ^
  symbol:   method f(int,int)
  location: class Main
Main.java:32: error: cannot find symbol
			red += f(n-k,i);
			       ^
  symbol:   method f(int,int)
  location: class Main
Main.java:33: error: cannot find symbol
			red += f(n-k,i);
			       ^
  symbol:   method f(int,int)
  location: class Main
Main.java:34: error: cannot find symbol
			red += f(n-k,i+1);
			       ^
  symbol:   method f(int,int)
  location: class Main
5 errors
Language: Java

import java.util.Arrays;
import java.util.Scanner;
class Main{


	static char[][] map;

	static long[][] c;
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);			//文字の入力
		int n = sc.nextInt();
		int k = sc.nextInt();
		long ans = 0;
		long mod = 1000000000 + 7;
		
		c = new long[4005][4005];
		c[0][0] = 1;
		for(int i = 0;i <= 4000;i++){
			for(int j = 0;j <= i;j++){
				c[i+1][j] += c[i][j] % mod;
				c[i+1][j+1] += c[i][j] % mod ;
			}
		}
		for(int i = 1;i <= k;i++){
			System.out.println((c[n-k-1][i] * c[k-1][i-1])%mod );
		}

		for(int i = 1;i <= k;i++){
			long blue = f(k,i);
			long red = 0;
			red += f(n-k,i-1);
			red += f(n-k,i);
			red += f(n-k,i);
			red += f(n-k,i+1);
			ans = blue * red % mod;
			System.out.println(ans);
		}
	}
	
	static int f(int n,int k){
		if(n < k){
			return 0;
		}
		if(n == 0 && k == 0){
			return 1;
		}
		
		if(k < 1){
			return 0;
		}
		return f2(n-k,k);
	}
	
	static int f2(int n, int k){
		return comd(n, k);
	}
	
	static int comd(int n,int k){
		return c[n][k];
	}



	static int gcd(int a,int b){				//最大公約数を返す
		if(b == 0){
			return a;
		}else{
			return gcd(b, a%b);
		}
	}
	static long gcd(long a,long b){
		if(b == 0){
			return a;
		}else{
			return gcd(b, a%b);
		}
	}



	static long lcm (long a, long b) {
		long g = gcd(a,b);
		return a/g*b;
	}




}



class Pair implements Comparable{
	int from;
	int end;
	@Override
	public int compareTo(Object other) {
		Pair otherpair = (Pair)other;

		return   end- otherpair.end;
	}







	static int find(int index,int current,int[] students,int ans,int[][] memo){
		if(current == index){
			return 1;
		}

		if(memo[current][index] != 0){
			return memo[current][index];
		}

		memo[current][index] = find(index, students[current]-1, students, ans+1, memo)+1;

		return memo[current][index];
	}



	static int gcd(int a,int b){				//最大公約数を返す
		if(b == 0){
			return a;
		}else{
			return gcd(b, a%b);
		}
	}
	static long gcd(long a,long b){
		if(b == 0){
			return a;
		}else{
			return gcd(b, a%b);
		}
	}



	static long lcm (long a, long b) {
		long g = gcd(a,b);
		return a/g*b;
	}




}






Compiler output:
Main.java:59: error: incompatible types: possible lossy conversion from long to int
		return c[n][k];
		           ^
1 error
Language: C++

#include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<iomanip>
#include<math.h>
#include<complex>
#include<queue>
#include<deque>
#include<stack>
#include<map>
#include<set>
#include<bitset>
#include<functional>
#include<assert.h>
#include<numeric>
using namespace std;
#define REP(i,m,n) for(int i=(int)(m) ; i < (int) (n) ; ++i )
#define rep(i,n) REP(i,0,n)
using ll = long long;
const int inf=1e9+7;
const ll longinf=1LL<<60 ;
const ll mod=1e9+7 ;

double combination(int n, int r) {		
	int i;
	double C = 1;
	for (i = 0; i < r; i++) {
		C *= n - i;
		C /= i + 1;
	}
	return C;
}
int main(){
  ll dp[2011][2011] = {0};
  rep(i, 2011){
    dp[i][0]=1;
  }
  dp[1][1]=1;
  for(int i=2; i<=2009; i++){
    for(int j=1; j<=(i+1)/2; j++){
      dp[i][j]=dp[i-1][j]+dp[i-2][j-1];
      dp[i][j] %= mod;
    }
  }
  int N, K;
  cin >> N >> K;
  rep(i, K){
    ans= combination(K-1, i)%mod;
    cout << dp[N-K+1+i][i+1] * ans << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:49:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
   49 |     ans= combination(K-1, i)%mod;
      |     ^~~
      |     abs
a.cc:49:29: error: invalid operands of types 'double' and 'const ll' {aka 'const long long int'} to binary 'operator%'
   49 |     ans= combination(K-1, i)%mod;
      |          ~~~~~~~~~~~~~~~~~~~^~~~
      |                     |        |
      |                     double   const ll {aka const long long int}
Language: C++

#include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<iomanip>
#include<math.h>
#include<complex>
#include<queue>
#include<deque>
#include<stack>
#include<map>
#include<set>
#include<bitset>
#include<functional>
#include<assert.h>
#include<numeric>
using namespace std;
#define REP(i,m,n) for(int i=(int)(m) ; i < (int) (n) ; ++i )
#define rep(i,n) REP(i,0,n)
using ll = long long;
const int inf=1e9+7;
const ll longinf=1LL<<60 ;
const ll mod=1e9+7 ;

double combination(int n, int r) {		
	int i;
	double C = 1;
	for (i = 0; i < r; i++) {
		C *= n - i;
		C /= i + 1;
	}
	return C;
}
int main(){
  ll dp[2011][2011] = {0};
  rep(i, 2011){
    dp[i][0]=1;
  }
  dp[1][1]=1;
  for(int i=2; i<=2009; i++){
    for(int j=1; j<=(i+1)/2; j++){
      dp[i][j]=dp[i-1][j]+dp[i-2][j-1];
      dp[i][j] %= mod;
    }
  }
  int N, K;
  cin >> N >> K;
  int ans[K];
  rep(i, K){
    ans[i] = dp[N-K+1+i][i+1] * combination(K-1,i)%mod;
    cout << ans[i] << endl;
  }
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:50:51: error: invalid operands of types 'double' and 'const ll' {aka 'const long long int'} to binary 'operator%'
   50 |     ans[i] = dp[N-K+1+i][i+1] * combination(K-1,i)%mod;
      |              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
      |                               |                    |
      |                               double               const ll {aka const long long int}
Language: C++

/*
g++ -std=c++14 -O2 -Wall a.cpp -o a && a
g++ -std=c++14 -O2 -Wall a.cpp -o a && a < in.txt > out.txt
*/

//  io
#include <iostream>
//#include <fstream> //http://www.cplusplus.com/reference/fstream/fstream/
#include <cstdio>
//#include <iomanip> //http://www.cplusplus.com/reference/iomanip/
//  util
#include <string>
#include <cstring>
#include <algorithm>
//#include <utility>
//#include <functional> //http://www.cplusplus.com/reference/functional/
//#include <cstdlib>
#include <cmath>
//#include <complex>
//#include <random>
//#include <bitset>
//  containers https://en.cppreference.com/w/cpp/container
#include <vector>
#include <queue>
#include <set>
#include <map>
//#include <unordered_set>
//#include <unordered_map>
//  time
//#include <ctime>
//#include <chrono>
//                  https://en.cppreference.com/w/cpp/header/chrono
//                  http://www.cplusplus.com/reference/chrono/

using namespace std;
typedef vector<int> arri;
typedef vector<float> arrf;
typedef pair<int, int> pairi;
typedef long long ll;
typedef long double ld;
const int mod = 1e9 + 7;
const ll inf = 0x7fffffffffffffff;
const ll infneg = -0x7fffffffffffffff;

int modadd(int a, int b) { return ((a += b) < mod) ? a : (a - mod); }
int modmult(int a, int b){return (int)((a * b) % mod)}

//file input routed to stdinout
/*
std::ifstream inFile("input.txt");
std::ofstream outFile("output.txt");
std::cin.rdbuf(inFile.rdbuf());
std::cout.rdbuf(outFile.rdbuf());
*/

ll dp[2005][2005];

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);

    for (int i = 0; i < 2005; i++)
    {
        for (int j = 0; j < 2005; j++)
        {
            dp[i][j] = 1;
        }
    }

    for (int i = 3; i < 2005; i++)
    {
        for (int j = 2; j <= i; j++)
        {
            dp[i][j] = modadd(dp[i - 1][j - 1], dp[i - 1][j]);
        }
    }

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

    for (int i = 1; i <= k; i++)
    {
        cout << modmult(dp[n - k - 1][i], dp[k - 1][i - 1]) << endl;
    }
}

Compiler output:
a.cc: In function 'int modmult(int, int)':
a.cc:46:54: error: expected ';' before '}' token
   46 | int modmult(int a, int b){return (int)((a * b) % mod)}
      |                                                      ^
      |                                                      ;
Language: C++

#include <iostream>
#include <vector>
using namespace std;
typedef long long ll;

vector<vector<ll>> com(ll n, ll r)
{
    const long long _MOD = 1000000007;
    vector<vector<ll>> v(n + 1, vector<ll>(n + 1, 0));
    ll tmp = v.size();
    for (int i = 0; i < tmp;i++){
        v[i][0] = 1;
        v[i][i] = 1;
    }
    for (int j = 1; j < tmp;j++){
        for (int k = 1; k < j;k++){
            v[j][k] = v[j - 1][k - 1] + v[j - 1][k];
            if (_ec[j][k] > _MOD)
                vec[j][k] %= _MOD;
        }
    }
    return v;
}

int main(){
    ll N, K;
    ll div_N = 1000000007;

    cin >> N >> K;
    vector<vector<ll>> v1(N + 1, vector<ll>(N + 1, 0));
    vector<vector<ll>> v2(N + 1, vector<ll>(N + 1, 0));
    ll tmp = K;
    if(N - K + 1 < K)
        tmp = N - K + 1;
    v1 = com(N - K + 1, tmp);
    v2 = com(K - 1, tmp - 1);
    for (int i = 1; i <= tmp; i++)
    {
        cout << v1[N-K+1][i]*v2[K-1][i-1] % div_N <<endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'std::vector<std::vector<long long int> > com(ll, ll)':
a.cc:18:17: error: '_ec' was not declared in this scope
   18 |             if (_ec[j][k] > _MOD)
      |                 ^~~
a.cc:19:17: error: 'vec' was not declared in this scope
   19 |                 vec[j][k] %= _MOD;
      |                 ^~~
Language: C++

#include <iostream>
#include <vector>
using namespace std;
typedef long long ll;

vector<vector<ll>> com(ll n, ll r)
{
    const long long _MOD = 1000000007;
    vector<vector<ll>> v(n + 1, vector<ll>(n + 1, 0));
    ll tmp = v.size();
    for (int i = 0; i < tmp;i++){
        v[i][0] = 1;
        v[i][i] = 1;
    }
    for (int j = 1; j < tmp;j++){
        for (int k = 1; k < j;k++)
            v[j][k] = v[j - 1][k - 1] + v[j - 1][k];
        if (_vec[j][k] > _MOD)
            _vec[j][k] %= _MOD;
    }
    return v;
}

int main(){
    ll N, K;
    ll div_N = 1000000007;

    cin >> N >> K;
    vector<vector<ll>> v1(N + 1, vector<ll>(N + 1, 0));
    vector<vector<ll>> v2(N + 1, vector<ll>(N + 1, 0));
    ll tmp = K;
    if(N - K + 1 < K)
        tmp = N - K + 1;
    v1 = com(N - K + 1, tmp);
    v2 = com(K - 1, tmp - 1);
    for (int i = 1; i <= tmp; i++)
    {
        cout << v1[N-K+1][i]*v2[K-1][i-1] % div_N <<endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'std::vector<std::vector<long long int> > com(ll, ll)':
a.cc:18:13: error: '_vec' was not declared in this scope
   18 |         if (_vec[j][k] > _MOD)
      |             ^~~~
a.cc:18:21: error: 'k' was not declared in this scope
   18 |         if (_vec[j][k] > _MOD)
      |                     ^
Language: C++

// code test
#include<iostream>
#include<vector>
#include<algorithm>
#include<math.h>
#include<string>
#include<map>
#include<queue>

using namespace std;

void comb(vector<vector <unsigned long long> >& v) {
	for (unsigned long long i = 0; i < v.size(); i++) {
		v[i][0] = 1;
		v[i][i] = 1;
	}
	for (unsigned long long k = 1; k < v.size(); k++) {
		for (int j = 1; j < k; j++) {
			v[k][j] = (v[k - 1][j - 1] + v[k - 1][j])#include<iostream>
#include<vector>
#include<algorithm>
#include<math.h>
#include<string>
#include<map>
#include<queue>

using namespace std;

void comb(vector<vector <unsigned long long> >& v) {
	for (unsigned long long i = 0; i < v.size(); i++) {
		v[i][0] = 1;
		v[i][i] = 1;
	}
	for (unsigned long long k = 1; k < v.size(); k++) {
		for (int j = 1; j < k; j++) {
			v[k][j] = (v[k - 1][j - 1] + v[k - 1][j]);
		}
	}
}

int main() {
	int N, K;
	cin >> N >> K;
	vector<vector<unsigned long long> > v(2*N , vector<unsigned long long>(2*N, 0));
	comb(v);
	for (int i = 0; i < K; i++) {
		//cout << v[N - K + 1][i + 1] << endl;
		//cout << v[K - 1][i] << endl;
		cout << (unsigned long long)(v[N - K + 1][i + 1] * v[K - 1][i])%1000000007 << endl;
	}
	return 0;
}
;
		}
	}
}

int main() {
	int N, K;
	cin >> N >> K;
	vector<vector<unsigned long long> > v(2*N , vector<unsigned long long>(2*N, 0));
	comb(v);
	for (int i = 0; i < K; i++) {
		//cout << v[N - K + 1][i + 1] << endl;
		//cout << v[K - 1][i] << endl;
		cout << (unsigned long long)(v[N - K + 1][i + 1] * v[K - 1][i])%1000000007 << endl;
	}
	return 0;
}


Compiler output:
a.cc:19:66: error: stray '#' in program
   19 |                         v[k][j] = (v[k - 1][j - 1] + v[k - 1][j])#include<iostream>
      |                                                                  ^
a.cc: In function 'void comb(std::vector<std::vector<long long unsigned int> >&)':
a.cc:19:66: error: expected ';' before 'include'
   19 |                         v[k][j] = (v[k - 1][j - 1] + v[k - 1][j])#include<iostream>
      |                                                                  ^~~~~~~~
      |                                                                  ;
a.cc:29:52: error: a function-definition is not allowed here before '{' token
   29 | void comb(vector<vector <unsigned long long> >& v) {
      |                                                    ^
a.cc:41:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   41 | int main() {
      |         ^~
a.cc:41:9: note: remove parentheses to default-initialize a variable
   41 | int main() {
      |         ^~
      |         --
a.cc:41:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:41:12: error: a function-definition is not allowed here before '{' token
   41 | int main() {
      |            ^
Language: C

#pragma GCC optimize("Ofast")
#include<bits/stdc++.h>
using namespace std;
struct __INIT{__INIT(){cin.tie(0);ios::sync_with_stdio(false);cout<<fixed<<setprecision(15);}} __init;
#define max3(a,b,c) max(a,max(b,c))
#define min3(a,b,c) min(a,min(b,c))
#define MOD 1000000007
#define INF (1<<30)
#define LINF (1LL<<60)
#define endl "\n"
#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)
#define reprev(i,n) for(int (i)=(n-1);(i)>=0;(i)--)
#define Flag(x) (1<<(x))
#define Flagcount(x) __builtin_popcount(x)
#define pint pair<int,int>
#define pdouble pair<double,double>
typedef unsigned long long int ull;
typedef long long lint;
long long fac[510000],finv[510000],inv[510000];
void COMinit(){
  fac[0]=fac[1]=1;
  finv[0]=finv[1]=1;
  inv[1]=1;
  for(int i=2;i<510000;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;
}
long long facdiv(lint n,lint k){
  if (n<k) return 0;
  if (n<0 || k<0) return 0;
  return (fac[n]*finv[k])%MOD;
}

 
int main(void){
  COMinit();
  lint N,K;
  cin >> N >> K;
  lint red=N-K,blue=K;
  for(int i=1;i<=K;i++){
    lint ans;
    ans=(COM(N-K+1,i)*COM(K-1,i-1))%MOD;
    cout << ans << endl;
  }
}

Compiler output:
main.c:2:9: fatal error: bits/stdc++.h: No such file or directory
    2 | #include<bits/stdc++.h>
      |         ^~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include<iostream>
#include<cstdio>
using namespace std;
const int MOD=1000000007;
int n,k;
long long fac[10000001]={1},inv[10000001]={1};
inline long long power(long long a,long long b,long long P)
{
	long long res=1;
	while(b)
	{
		if(b&1) res=res*a%P;
		b>>=1,a=a*a%P;
	}
	return res;
}
long long C(long long n,long long m)
{
	if(n<m) return 0;
	if(m==0) return 1;
	return fac[n]*inv[n-m]%MOD*inv[m]%MOD;
}
int main()
{
	scanf("%d%d",&n,&k);
	for(int i=1;i<=n;i++)
		fac[i]=fac[i-1]*i%MOD;
	inv[n]=power(fac[n],MOD-2,MOD);
	for(int i=n-1;i>0;i--)
		inv[i]=inv[i+1]*(i+1)%MOD;
	for(int i=1;i<=k;i++)
		printf("%lld\n",C(k-1,i-1)*C(n-k+1,i)%MOD);
	return 0;
}

Compiler output:
/tmp/ccTTVacd.s: Assembler messages:
/tmp/ccTTVacd.s: Fatal error: can't fill 256 bytes in section .data of /tmp/ccMeKGt8.o: 'No space left on device'
/tmp/ccTTVacd.s: Fatal error: /tmp/ccMeKGt8.o: No such file or directory
Language: C++

#include<iostream>
#include<cstdio>
using namespace std;
const int MOD=1000000007;
int n,k;
long long fac[10000001]={1},inv[10000001]={1};
inline long long power(long long a,long long b,long long P)
{
	long long res=1;
	while(b)
	{
		if(b&1) res=res*a%P;
		b>>=1,a=a*a%P;
	}
	return res;
}
long long C(long long n,long long m)
{
	if(n<m) return 0;
	if(m==0) return 1;
	return fac[n]*inv[n-m]%MOD*inv[m]%MOD;
}
int main()
{
	scanf("%d%d",&n,&k);
	for(int i=1;i<=n;i++)
		fac[i]=fac[i-1]*i%MOD;
	inv[n]=power(fac[n],MOD-2,MOD);
	for(int i=n-1;i>0;i--)
		inv[i]=inv[i+1]*(i+1)%MOD;
	for(int i=1;i<=k;i++)
		printf("%lld\n",C(k-1,i-1)*C(n-k+1,i)%MOD);
	return 0;
}

Compiler output:
/tmp/ccK9yqhZ.s: Assembler messages:
/tmp/ccK9yqhZ.s: Fatal error: can't fill 256 bytes in section .data of /tmp/ccdaHKAQ.o: 'No space left on device'
/tmp/ccK9yqhZ.s: Fatal error: /tmp/ccdaHKAQ.o: No such file or directory
Language: C++

#include<iostream>
#include<cstdio>
using namespace std;
const int MOD=1000000007;
int n,k;
long long fac[10000001]={1},inv[10000001]={1};
inline long long power(long long a,long long b,long long P)
{
	long long res=1;
	while(b)
	{
		if(b&1) res=res*a%P;
		b>>=1,a=a*a%P;
	}
	return res;
}
long long C(long long n,long long m)
{
	if(n<m) return 0;
	if(m==0) return 1;
	return fac[n]*inv[n-m]%MOD*inv[m]%MOD;
}
int main()
{
	scanf("%d%d",&n,&k);
	for(int i=1;i<=n;i++)
		fac[i]=fac[i-1]*i%MOD;
	inv[n]=power(fac[n],MOD-2,MOD);
	for(int i=n-1;i>0;i--)
		inv[i]=inv[i+1]*(i+1)%MOD;
	for(int i=1;i<=k;i++)
		printf("%lld\n",C(k-1,i-1)*C(n-k+1,i)%MOD);
	return 0;
}

Compiler output:
/tmp/ccpVXyos.s: Assembler messages:
/tmp/ccpVXyos.s: Fatal error: can't fill 256 bytes in section .data of /tmp/cchotdVF.o: 'No space left on device'
/tmp/ccpVXyos.s: Fatal error: /tmp/cchotdVF.o: No such file or directory
Language: C++

#include<iostream>
#include<cstdio>
using namespace std;
const int MOD=1000000007;
int n,k;
long long fac[10000001]={1},inv[10000001]={1};
inline long long power(long long a,long long b,long long P)
{
	long long res=1;
	while(b)
	{
		if(b&1) res=res*a%P;
		b>>=1,a=a*a%P;
	}
	return res;
}
long long C(long long n,long long m)
{
	if(n<m) return 0;
	if(m==0) return 1;
	return fac[n]*inv[n-m]%MOD*inv[m]%MOD;
}
int main()
{
	scanf("%d%d",&n,&k);
	for(int i=1;i<=n;i++)
		fac[i]=fac[i-1]*i%MOD;
	inv[n]=power(fac[n],MOD-2,MOD);
	for(int i=n-1;i>0;i--)
		inv[i]=inv[i+1]*(i+1)%MOD;
	for(int i=1;i<=k;i++)
		printf("%lld\n",C(k-1,i-1)*C(n-k+1,i)%MOD);
	return 0;
}

Compiler output:
/tmp/ccegVqJI.s: Assembler messages:
/tmp/ccegVqJI.s: Fatal error: can't fill 256 bytes in section .data of /tmp/ccijLTHo.o: 'No space left on device'
/tmp/ccegVqJI.s: Fatal error: /tmp/ccijLTHo.o: No such file or directory
Language: C++

#include <stdio.h>
#include <string.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#include <limits.h>
#include <math.h>
int acs(const void *a, const void *b){return *(int*)a - *(int*)b;} /* 1,2,3,4.. */
int des(const void *a, const void *b){return *(int*)b - *(int*)a;} /* 8,7,6,5.. */
int cmp_char(const void *a, const void *b)
{ return *(char*)a - *(char*)b;} /* a,b,c,d.. */
int cmp_str(const void *a, const void *b)
{ return strcmp(*(const char **)a, *(const char **)b);} /* aaa,aab.. */
#define min(a,b) (a < b ? a: b)
#define max(a,b) (a > b ? a: b)
#define rep(i, n) for (int i = 0; i < n; i++)
#define mod 1000000007
typedef long long ll;

int main(void) {
  int n, k;
  scanf("%d %d", &n ,&k);

  ll int ans;
  int i;
  int blue[2001] = {0}, red[2001] = {0};
  blue[1] = 1;
  red[1] = n - k + 1;
  for (i = 2; i <= k; i++) {
    blue[i] = blue[i - 1] * (k - i + 1) / (i - 1);
  }
  for (i = 2; i <= n - k + 1; i++) {
    red[i] = red[i - 1] * (n - k - i + 2) / i;
  }
  for (i = 1; i <= k; i++) {
    ans = (blue[i] * red[i]) % mod;
    printf("%lld\n", ans);
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:3: error: two or more data types in declaration of 'ans'
   24 |   ll int ans;
      |   ^~
a.cc:36:5: error: 'ans' was not declared in this scope; did you mean 'acs'?
   36 |     ans = (blue[i] * red[i]) % mod;
      |     ^~~
      |     acs
Language: C++

    #include <bits/stdc++.h>
    using namespace std;
	typedef long long int ll; 
     
    int main() {
      ll N,K;
      ll P = 1000*1000*1000+7;
      cin >> N >> K; 
      ll A = N-K+1;  
      ll B = K-1; 
      ll C[A+1][A+1]; 
      ll [B+1][B+1];
      
      for(int i=1; i<=A; i++){
        for(int j=0; j<=i; j++){
          if(j==0 || j==i){ 
            C[i][j]=1;
          }else{
            C[i][j]= (C[i-1][j-1]+C[i-1][j]) % P;
          }
        }
      }
      
      for(int i=1; i<=B; i++){
        for(int j=0; j<=i; j++){
          if(j==0 || j==i){ 
            D[i][j]=1;
          }else{
            D[i][j]= (D[i-1][j-1]+D[i-1][j]) % P;
          }
        }
      }
      
      for(int i=1; i<=K; i++){
        if(i>N-K+1){
          cout<<0<<endl; 
        }else{
          cout<< (C[A][i] * D[B][i-1])%P << endl; 
        }
      }
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:12:12: error: expected ']' before '+' token
   12 |       ll [B+1][B+1];
      |            ^
      |            ]
a.cc:12:10: error: structured binding declaration cannot have type 'll' {aka 'long long int'}
   12 |       ll [B+1][B+1];
      |          ^
a.cc:12:10: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:12:11: error: conflicting declaration 'auto B'
   12 |       ll [B+1][B+1];
      |           ^
a.cc:10:10: note: previous declaration as 'll B'
   10 |       ll B = K-1;
      |          ^
a.cc:12:15: error: expected initializer before '[' token
   12 |       ll [B+1][B+1];
      |               ^
a.cc:27:13: error: 'D' was not declared in this scope
   27 |             D[i][j]=1;
      |             ^
a.cc:29:13: error: 'D' was not declared in this scope
   29 |             D[i][j]= (D[i-1][j-1]+D[i-1][j]) % P;
      |             ^
a.cc:38:29: error: 'D' was not declared in this scope
   38 |           cout<< (C[A][i] * D[B][i-1])%P << endl;
      |                             ^
Language: C++

#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define repr(i, n) for (int i = (n); i >= 0; --i)
#define for(i, m, n) for (int i = (m); i < (n); ++i)
using namespace std;
typedef long long ll;
const int mod = 1000000007;
const int mod2 = 998244353;

ll c[i][j];

ll com(ll i, ll j) {
  if (j == 0) return 1;
  return (c[i-1][j] + c[i-1][j-1]) % (ll)mod;
}

int main() {
  ll n, k;
  cin >> n >> k;
  vector<ll> ans(k+1);
  for(i, 1, k+1) {
    if (i > n-k+1) break;
    ans[i] = com(n-k+1, i) * com(k-1, i-1) % (ll)mod;
  }
  for(i, 1, k+1) cout << ans[i] << endl;
}

Compiler output:
a.cc:10:6: error: 'i' was not declared in this scope
   10 | ll c[i][j];
      |      ^
a.cc:10:9: error: 'j' was not declared in this scope; did you mean 'jn'?
   10 | ll c[i][j];
      |         ^
      |         jn
a.cc: In function 'll com(ll, ll)':
a.cc:14:11: error: 'c' was not declared in this scope
   14 |   return (c[i-1][j] + c[i-1][j-1]) % (ll)mod;
      |           ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
long long com(int a,int b){
  long long ans=1;
  if(a-b<b)b=a-b;
  for(int i=a;i>a-b;i--)ans*=i;
  for(int i=2;i<=b;i++)ans/=i;
  return ans;
}

using vi=vector<int>;
using vvi=vector<vector<int>>;

int main(){
  int n,b;
  cin>>n>>b;
  int r=n-b;
  for(int i=1;i<=b;i++){
    int ans=com(r+1,i);
    if(i!=!)ans*=com(

Compiler output:
a.cc: In function 'int main()':
a.cc:21:12: error: expected primary-expression before ')' token
   21 |     if(i!=!)ans*=com(
      |            ^
a.cc:21:22: error: expected primary-expression at end of input
   21 |     if(i!=!)ans*=com(
      |                      ^
a.cc:21:22: error: expected '}' at end of input
a.cc:19:24: note: to match this '{'
   19 |   for(int i=1;i<=b;i++){
      |                        ^
a.cc:21:22: error: expected '}' at end of input
   21 |     if(i!=!)ans*=com(
      |                      ^
a.cc:15:11: note: to match this '{'
   15 | int main(){
      |           ^
Language: C++

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

using LL = long long;
  
int main() {
 
     int N;
     int K;
     cin >> N >> K;
 
  
  for(int i = 1; i <= K; i++){
    // i = 1: xxxxxx 5c0 1996c1
    // i = 2: x,xxxxx 5c1
    // i = 3: x,x,xxxx 5c2
    // i = 4: x,x,x,xxx 5c3
    // i = 5: x,x,x,x,xx 5c4
    // i = 6: x,x,x,x,x,x 5c5
    // 
    long long p1;
    long long p2; // 
    p2 = 1; //<- トータルの並べ方
    p1 = 1; //<- 青玉の並べ方
    p0 = 1; //<- 青玉の区切り方
    
    
    for(int l=1; l<=i; l++) {
      //nCl -> p2/p1
      p0 = 
      p1 = p1 * l;
      p2 = p2 * (N -K -l + 2);
  	};
    
    cout << (p2/p1)%1000000007 << endl;

    /*
    cout << p1 << endl;
    cout << p2 << endl;
    */
    /*
    int p1 = kCi
    
    for(int l = 0; i < N; i++){
    	cout << (N-K+1)
    }*/
  }
 }

Compiler output:
a.cc: In function 'int main()':
a.cc:26:5: error: 'p0' was not declared in this scope; did you mean 'p2'?
   26 |     p0 = 1; //<- 青玉の区切り方
      |     ^~
      |     p2
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(long i=0; i<n; i++)
typedef long long ll;

ll mod = 1000000007

ll C(ll n, ll r){
        if (r>n) return 0;
        ll num = 1;
        for(ll i = 1; i <= r; i++){
            num = num * (n - i + 1) / i ;
        }
        return num;
    }

void solve(){
    ll n,k;
    cin >> n >> k;
    for(ll i=1; i<=k; i++){
        ll ans;
        ans = ((C(k-1,i-1)%mod)*(C(n-k+1,i)%mod)) % mod;
    cout << ans << endl;
    }
}

int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  solve();
  return 0;
}

Compiler output:
a.cc:8:1: error: expected ',' or ';' before 'll'
    8 | ll C(ll n, ll r){
      | ^~
a.cc: In function 'void solve()':
a.cc:22:17: error: 'C' was not declared in this scope
   22 |         ans = ((C(k-1,i-1)%mod)*(C(n-k+1,i)%mod)) % mod;
      |                 ^
Language: Java

import java.util.*;
class Main{
	public static void main(String[] args){
		Scanner sc=new Scanner(System.in);
		long n=sc.nextInt();
		long k=sc.nextInt();

		//青と赤のそれぞれの区切り方をかける//
		int mod=1_000_000_007;
		long[][] com=new long[2001][2001];
		for(int i=1;i<2001;i++){
			for(int j=1;j<=i;j++){
				com[i][j]=com[i-1][j-1]+com[i-1][j];
				com[i][j]%=mod;
			}
		}
		for(int i=1;i<=k;i++){
			long ans=com[n-k+1][i]*com[k-1][i-1];
			ans%=mod;
			System.out.println(ans);
		

			
		}
	}
}

Compiler output:
Main.java:18: error: incompatible types: possible lossy conversion from long to int
			long ans=com[n-k+1][i]*com[k-1][i-1];
			                ^
Main.java:18: error: incompatible types: possible lossy conversion from long to int
			long ans=com[n-k+1][i]*com[k-1][i-1];
			                            ^
2 errors
Language: Java

import java.util.*;
class Main{
	public static void main(String[] args){
		Scanner sc=new Scanner(System.in);
		long n=sc.nextInt();
		long k=sc.nextInt();

		//青と赤のそれぞれの区切り方をかける//
		int mod=1_000_000_007;
		long[][] com=new long[2001][2001];
		for(int i=1;i<2001;i++){
			for(int j=1;j<=i;j++){
				com[i][j]=com[i-1][j-1]+com[i-1][j];
				com[i][j]%=mod;
			}
		}
		for(int i=1;i<=k;i++){
			long ans=com[n-k+1[i]*com[k-1][i-1];
			ans%=mod;
			System.out.println(ans);
		

			
		}
	}
}

Compiler output:
Main.java:18: error: ']' expected
			long ans=com[n-k+1[i]*com[k-1][i-1];
			                                   ^
1 error
Language: C++

#define rep(i, n) for(int i = 0; i < (int)n; i++)
#include <bits/stdc++.h>
#include "my_lib.h"
using namespace std;

int main()
{
#ifdef LOCAL
    // 以降 cin の入力元が 'xxx.txt' になる
    std::ifstream in("d.txt");
    std::cin.rdbuf(in.rdbuf());
#endif

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

    rep (i, k)
    {
        cout << choose(k-1, i) * choose(n-k+1, i+1) << endl;
    }

    return 0;
}


Compiler output:
a.cc:3:10: fatal error: my_lib.h: No such file or directory
    3 | #include "my_lib.h"
      |          ^~~~~~~~~~
compilation terminated.