Language: C++

nclude "bits/stdc++.h"
using namespace std;
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;
}
/*第二引数で第一引数を割ったときの切り上げの計算*/
long long int maxtime(long long int x, long long int y) {
	return(x + y - 1) / y;

}
/*最大公約数*/
long long int lcm(long long int number1, long long int number2) {
	long long int m = number1;
	long long int n = number2;

	if (number2 > number1) {
		m = number2;
		n = number1;
	}
	long long int s = -1;
	while (s != 0) {
		s = m % n;
		m = n;
		n = s;
	}
	return m;
}
/*最大公倍数*/
long long int gcd(long long int number1, long long int number2) {
	long long int m = number1;
	long long int n = number2;
	return m / lcm(m, n) * n;
}
int dp[100020] = {};
int ds[100020] = {};
int main() {
	int n;
	cin >> n;
	vector<int> a;
	vector<int> b;
	vector<int> c;
	for (int i = 0; i < n; i++) {
		int d;
		cin >> d;
		a.push_back(d);
	}
	for (int i = 0; i < n; i++) {
		int d;
		cin >> d;
		b.push_back(d);
	}
	for (int i = 0; i < n; i++) {
		int d;
		cin >> d;
		c.push_back(d);
	}
	sort(a.begin(), a.end());
	sort(b.begin(), b.end());
	sort(c.begin(), c.end());
	int k = 0;
	for (int i = 0; i < b.size(); i++) {
		int f = 0;
		for (int j = k; j < c.size(); j++) {
			if (c[j] > b[i]) {
				dp[i] = c.size() - j;
				k = j;
				break;
			}
			if (j == c.size() - 1) {
				f = 1;
			}
		}
		if (f == 1) {
			break;
		}
	}
	for (int i = 1; i <= n; i++) {
		ds[i] = ds[i - 1] + dp[i - 1];
	}
	k = 0;
	long long int sum = 0;

	for (int i = 0; i < a.size(); i++) {
		int f = 0;
		for (int j = k; j < b.size(); j++) {
			if (b[j] > a[i]) {
				sum = sum + ds[n] - ds[j];
			    k = j;
				break;
			}
			if (j == c.size() - 1) {
				f = 1;
			}
		}
		if (f == 1) {
			break;
		}
	}
	cout << sum;
}

Compiler output:
a.cc:1:1: error: 'nclude' does not name a type
    1 | nclude "bits/stdc++.h"
      | ^~~~~~
a.cc: In function 'int main()':
a.cc:58:9: error: 'cin' was not declared in this scope
   58 |         cin >> n;
      |         ^~~
a.cc:59:9: error: 'vector' was not declared in this scope
   59 |         vector<int> a;
      |         ^~~~~~
a.cc:59:16: error: expected primary-expression before 'int'
   59 |         vector<int> a;
      |                ^~~
a.cc:60:16: error: expected primary-expression before 'int'
   60 |         vector<int> b;
      |                ^~~
a.cc:61:16: error: expected primary-expression before 'int'
   61 |         vector<int> c;
      |                ^~~
a.cc:65:17: error: 'a' was not declared in this scope
   65 |                 a.push_back(d);
      |                 ^
a.cc:70:17: error: 'b' was not declared in this scope
   70 |                 b.push_back(d);
      |                 ^
a.cc:75:17: error: 'c' was not declared in this scope
   75 |                 c.push_back(d);
      |                 ^
a.cc:77:14: error: 'a' was not declared in this scope
   77 |         sort(a.begin(), a.end());
      |              ^
a.cc:77:9: error: 'sort' was not declared in this scope; did you mean 'short'?
   77 |         sort(a.begin(), a.end());
      |         ^~~~
      |         short
a.cc:78:14: error: 'b' was not declared in this scope
   78 |         sort(b.begin(), b.end());
      |              ^
a.cc:79:14: error: 'c' was not declared in this scope
   79 |         sort(c.begin(), c.end());
      |              ^
a.cc:119:9: error: 'cout' was not declared in this scope
  119 |         cout << sum;
      |         ^~~~