Language: C++

#include <iostream>
#include <cstring>
#include <algorithm>
#define MOD 1000000007
using namespace std;
typedef _int128 ll;

ll *FACT, *IFACT;
ll extgcd(ll a, ll b, ll &x, ll &y) {
	ll g = a; x = 1; y = 0;
	if (b != 0) g = extgcd(b, a % b, y, x), y -= (a / b) * x;
	return g;
}
ll invMod(ll a, ll m) {
	ll x, y;
	if (extgcd(a, m, x, y) == 1) return (x + m) % m;
	else                         return 0; // unsolvable
}

void init(ll N){
	FACT = new ll[N + 1];
	IFACT = new ll[N + 1];
	FACT[0] = 1;
	IFACT[0] = 1;
	for (ll i = 1; i <= N; i++){
		FACT[i] = FACT[i - 1] * i % MOD;
		IFACT[i] = invMod(FACT[i], MOD);
	}
}
long C(ll n, ll r)
{
	if (n < 0 || r < 0 || r > n)return 0;
	if (r > n / 2)r = n - r;
	return FACT[n] * IFACT[n - r] % MOD*IFACT[r] % MOD;
}

signed main()
{
	ll ans;
	ll i;
	ll j;
	ll n;
	ll dup;
	ll dup_f = -1;
	ll dup_b;
	cin >> n;
	ll a[100005];
	ll b[100005];
	init(100010);
	for (i = 0; i<n + 1; i++){
		cin >> a[i];
	};
	memcpy(b, a, sizeof(ll)*100005);
	sort(begin(a), begin(a) + n);
	for (i = 0; i<n + 1; i++){
		if (a[i] == a[i + 1]){
			dup = a[i];
		};
	};
	for (i = 0; i<n + 1; i++){
		if (b[i] == dup && dup_f == -1){
			dup_f = i;
		}
		else if (b[i] == dup){
			dup_b = i;
		};
	};
	for (i = 0; i<n + 1; i++){
		ans = C(n + 1, i + 1) - C(dup_f + n - dup_b, i);
		if (ans < 0){
			ans = ans + MOD;
		}
		cout << ans << endl;
	};




	return 0;
}

Compiler output:
a.cc:6:9: error: '_int128' does not name a type; did you mean '__int128'?
    6 | typedef _int128 ll;
      |         ^~~~~~~
      |         __int128
a.cc:8:1: error: 'll' does not name a type
    8 | ll *FACT, *IFACT;
      | ^~
a.cc:9:1: error: 'll' does not name a type
    9 | ll extgcd(ll a, ll b, ll &x, ll &y) {
      | ^~
a.cc:14:1: error: 'll' does not name a type
   14 | ll invMod(ll a, ll m) {
      | ^~
a.cc:20:6: error: variable or field 'init' declared void
   20 | void init(ll N){
      |      ^~~~
a.cc:20:11: error: 'll' was not declared in this scope
   20 | void init(ll N){
      |           ^~
a.cc:30:8: error: 'll' was not declared in this scope
   30 | long C(ll n, ll r)
      |        ^~
a.cc:30:14: error: 'll' was not declared in this scope
   30 | long C(ll n, ll r)
      |              ^~
a.cc:30:18: error: expression list treated as compound expression in initializer [-fpermissive]
   30 | long C(ll n, ll r)
      |                  ^
a.cc: In function 'int main()':
a.cc:39:9: error: 'll' was not declared in this scope
   39 |         ll ans;
      |         ^~
a.cc:40:11: error: expected ';' before 'i'
   40 |         ll i;
      |           ^~
      |           ;
a.cc:41:11: error: expected ';' before 'j'
   41 |         ll j;
      |           ^~
      |           ;
a.cc:42:11: error: expected ';' before 'n'
   42 |         ll n;
      |           ^~
      |           ;
a.cc:43:11: error: expected ';' before 'dup'
   43 |         ll dup;
      |           ^~~~
      |           ;
a.cc:44:11: error: expected ';' before 'dup_f'
   44 |         ll dup_f = -1;
      |           ^~~~~~
      |           ;
a.cc:45:11: error: expected ';' before 'dup_b'
   45 |         ll dup_b;
      |           ^~~~~~
      |           ;
a.cc:46:16: error: 'n' was not declared in this scope
   46 |         cin >> n;
      |                ^
a.cc:47:11: error: expected ';' before 'a'
   47 |         ll a[100005];
      |           ^~
      |           ;
a.cc:48:11: error: expected ';' before 'b'
   48 |         ll b[100005];
      |           ^~
      |           ;
a.cc:49:9: error: 'init' was not declared in this scope; did you mean 'int'?
   49 |         init(100010);
      |         ^~~~
      |         int
a.cc:50:14: error: 'i' was not declared in this scope
   50 |         for (i = 0; i<n + 1; i++){
      |              ^
a.cc:51:24: error: 'a' was not declared in this scope
   51 |                 cin >> a[i];
      |                        ^
a.cc:53:16: error: 'b' was not declared in this scope
   53 |         memcpy(b, a, sizeof(ll)*100005);
      |                ^
a.cc:53:19: error: 'a' was not declared in this scope
   53 |         memcpy(b, a, sizeof(ll)*100005);
      |                   ^
a.cc:55:14: error: 'i' was not declared in this scope
   55 |         for (i = 0; i<n + 1; i++){
      |              ^
a.cc:57:25: error: 'dup' was not declared in this scope
   57 |                         dup = a[i];
      |                         ^~~
a.cc:60:14: error: 'i' was not declared in this scope
   60 |         for (i = 0; i<n + 1; i++){
      |              ^
a.cc:61:29: error: 'dup' was not declared in this scope
   61 |                 if (b[i] == dup && dup_f == -1){
      |                             ^~~
a.cc:61:36: error: 'dup_f' was not declared in this scope
   61 |                 if (b[i] == dup && dup_f == -1){
      |                                    ^~~~~
a.cc:65:25: error: 'dup_b' was not declared in this scope
   65 |                         dup_b = i;
      |                         ^~~~~
a.cc:68:14: error: 'i' was not declared in this scope
   68 |         for (i = 0; i<n + 1; i++){
      |              ^
a.cc:69:17: error: 'ans' was not declared in this scope; did you mean 'abs'?
   69 |                 ans = C(n + 1, i + 1) - C(dup_f + n - dup_b, i);
      |                 ^~~
      |                 abs
a.cc:69:37: error: 'C' cannot be used as a function
   69 |                 ans = C(n + 1, i + 1) - C(dup_f + n - dup_b, i);
      |                                     ^
a.cc:69:43: error: 'dup_f' was not declared in this scope
   69 |                 ans = C(n + 1, i + 1) - C(dup_f + n - dup_b, i);
      |                                           ^~~~~
a.cc:69:55: error: 'dup_b' was not declared in this scope
   69 |                 ans = C(n + 1, i + 1) - C(dup_f + n - dup_b, i);
      |                                                       ^~~~~
a.cc:69:42: error: 'C' cannot be used as a function
   69 |                 ans = C(n + 1, i + 1) - C(dup_f + n - dup_b, i);
      |                                         ~^~~~~~~~~~~~~~~~~~~~~~