Language: C++

#include<bits/stdc++.h>
#define rep(i,n)for(int i=0;i<n;++i)
#include<string>
#include<vector>
using namespace std;
typedef long long ll;
typedef pair<int, int>P;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
//max=({});
//条件式が真ならwhileの中身を回し続ける
//printf("%d\n", ans);

//pairの入力
//vector<pair<ll, ll>>work(n);
//rep(i, n) {
//	ll a, b;
//	cin >> a >> b;
//	work[i] = make_pair(a, b);
//for(auto p:mp)(mapの探索)
//printf("%.10f\n",なんちゃら)

int g[15][15];
const int INF = 1001001001;
const int dx[4] = { -1,0,1,0 };
const int dy[4] = { 0,-1,0,1 };

//最大公約数
ll gcd(ll x, ll y) {
	return y ? gcd(y, x % y) : x;
}

ll lcm(ll x, ll y) {
	if (x == 0 || y == 0)return 0;
	return (x / gcd(x, y) * y);
}

//素因数分解
map<ll, ll>ins;
void facterize(ll n) {
	ll a = 2;
	while (n >= a * a) {
		if (n % a == 0) {
			ins[a]++;
			ins[a] = ins[a] % 1000000007;
			n /= a;
		}
		else {
			a++;
		}
	}
	ins[n]++;
}

vector<ll>relation[20], money(20, 1);

int main() {
	int n;
	cin >> n;
	vector<int>a(n);
	vvector<int>b(n);
	rep(i, n) {
		cin >> a[i];
		b[a[i]]++;
	}
	ll ans = 1;
	if (n % 2 != 0) {
		rep(i, n) {
			if (i == 0 && b[i]!=1) {
				cout << 0 << endl;
				return 0;
			}
			if (i % 2 != 0&&b[i]!=0) {
				cout << 0 << endl;
				retun 0;
			}
			if (i % 2 != 0 && b[i] == 0) {
				continue;
			}
			if (i != 0 && i % 2 == 0 && b[i] != 2) {
				cout << 0 << endl;
				return 0;
			}
			ans *= b[i];
		}
	}
	else {
		rep(i, n) {
			if (i % 2 != 0 && b[i] != 2) {
				cout << 0 << endl;
				retun 0;
			}
			if (i % 2 == 0 && b[i] == 0) {
				continue;
			}
			if (i % 2 == 0 && b[i] != 0) {
				cout << 0 << endl;
				return 0;
			}
			ans *= b[i];
		}
	}
	cout << ans << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:61:9: error: 'vvector' was not declared in this scope
   61 |         vvector<int>b(n);
      |         ^~~~~~~
a.cc:61:17: error: expected primary-expression before 'int'
   61 |         vvector<int>b(n);
      |                 ^~~
a.cc:64:17: error: 'b' was not declared in this scope
   64 |                 b[a[i]]++;
      |                 ^
a.cc:69:39: error: 'b' was not declared in this scope
   69 |                         if (i == 0 && b[i]!=1) {
      |                                       ^
a.cc:73:41: error: 'b' was not declared in this scope
   73 |                         if (i % 2 != 0&&b[i]!=0) {
      |                                         ^
a.cc:75:33: error: 'retun' was not declared in this scope
   75 |                                 retun 0;
      |                                 ^~~~~
a.cc:77:43: error: 'b' was not declared in this scope
   77 |                         if (i % 2 != 0 && b[i] == 0) {
      |                                           ^
a.cc:80:53: error: 'b' was not declared in this scope
   80 |                         if (i != 0 && i % 2 == 0 && b[i] != 2) {
      |                                                     ^
a.cc:84:32: error: 'b' was not declared in this scope
   84 |                         ans *= b[i];
      |                                ^
a.cc:89:43: error: 'b' was not declared in this scope
   89 |                         if (i % 2 != 0 && b[i] != 2) {
      |                                           ^
a.cc:91:33: error: 'retun' was not declared in this scope
   91 |                                 retun 0;
      |                                 ^~~~~
a.cc:93:43: error: 'b' was not declared in this scope
   93 |                         if (i % 2 == 0 && b[i] == 0) {
      |                                           ^
a.cc:96:43: error: 'b' was not declared in this scope
   96 |                         if (i % 2 == 0 && b[i] != 0) {
      |                                           ^
a.cc:100:32: error: 'b' was not declared in this scope
  100 |                         ans *= b[i];
      |                                ^