Language: C++

v#include<iostream>
#include<stdio.h>
#include<vector>
#include<algorithm>
#include<set>
#include<string>
#include<map>
#include<string.h>
#include<complex>
#include<math.h>
#include<queue>
#include <functional>
#include<time.h>
#include <stack>
#include<iomanip>
using namespace std;
#define rep(i,a,n) for(int i=(a);i<(n);i++)
#define ll long long
#define llint long long int
#define reverse(v)  reverse(v.begin(), v.end());
#define Yes(ans) if(ans)cout<<"Yes"<<endl; else cout<<"No"<<endl;
#define YES(ans) if(ans)cout<<"YES"<<endl; else cout<<"NO"<<endl;
#define hei(a) vector<a>
#define whei(a) vector<vector<a>>
#define UF  UnionFind 
#define Pint pair<int,int>
#define keta(a)  fixed << setprecision(a)
constexpr auto INF = 100000000000;
constexpr auto mod = 1000000007;
//辞書順はnext_permutation( begin( v ), end( v ) );やで！
// lower_boundは二分探索
struct edge { int to, cost; };
long long modpow(long long a, long long n, long long mod) {
	long long res = 1;
	while (n > 0) {
		if (n & 1) res = res * a % mod;
		a = a * a % mod;
		n >>= 1;
	}
	return res;
}

// mod. m での a の逆元 a^{-1} を計算するよ！
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;
}


//aCbをmod.mで割った余りを求める
ll int c(ll int a, ll int b, ll int m) {
	ll int ans = 1;
	for (ll int i = 0; i < b; i++) {
		ans *= a - i;
		ans %= m;
	}
	for (ll int i = 1; i <= b; i++) {
		ans *= modinv(i, m);
		ans %= m;
	}
	return ans;
}

//sは初めの点、vは頂点size、dは最短距離を求める(初期化はINF),Gは有向グラフ
void dijkdtra(int s, int v, vector<int>& d, whei(edge)& G) {
	priority_queue<Pint, vector<Pint>, greater<Pint>> que;//firstが距離、secondが頂点
	d[s] = 0;//スタートの距離はもちろんzero
	que.push(Pint(0, s));
	while (!que.empty()) {
		Pint p = que.top();
		que.pop();
		int V = p.second;
		if (d[V] < p.first)continue;
		for (int i = 0; i < G[V].size(); i++) {
			edge e = G[V][i];
			if (d[e.to] > d[V] + e.cost) {
				d[e.to] = d[V] + e.cost;
				que.push(Pint(d[e.to], e.to));
			}
		}
	}
}

int binary_search(vector<int>&s,int a) {
	int l = -1;
	int r = (int)s.size();
	while (r - l > 1) {
		int mid = l + (r - l) / 2;

		if (s[mid]>=a) r = mid;
		else l = mid;
	}
	return r;
}


int main() {
	int n;
	cin >> n;
	hei(int) a(n), b(n), c(n);
	rep(i, 0, n)cin >> a[i];
	rep(i, 0, n)cin >> b[i];
	rep(i, 0, n)cin >> c[i];
	sort(a.begin(), a.end());
	sort(b.begin(), b.end());
	sort(c.begin(), c.end());
	llint ans = 0;
	rep(i, 0, n) {
		ans += binary_search(a, b[i])*(n -binary_search(c, b[i]+1));
	}
	cout << ans << endl;
	return 0;
}

Compiler output:
a.cc:1:2: error: stray '#' in program
    1 | v#include<iostream>
      |  ^
a.cc:1:1: error: 'v' does not name a type
    1 | v#include<iostream>
      | ^
In file included from /usr/include/c++/14/cstdlib:79,
                 from /usr/include/c++/14/bits/stl_algo.h:71,
                 from /usr/include/c++/14/algorithm:61,
                 from a.cc:4:
/usr/include/stdlib.h:98:8: error: 'size_t' does not name a type
   98 | extern size_t __ctype_get_mb_cur_max (void) __THROW __wur;
      |        ^~~~~~
/usr/include/stdlib.h:42:1: note: 'size_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>'
   41 | # include <bits/waitstatus.h>
  +++ |+#include <cstddef>
   42 | 
/usr/include/stdlib.h:278:36: error: 'size_t' has not been declared
  278 | extern int strfromd (char *__dest, size_t __size, const char *__format,
      |                                    ^~~~~~
/usr/include/stdlib.h:282:36: error: 'size_t' has not been declared
  282 | extern int strfromf (char *__dest, size_t __size, const char *__format,
      |                                    ^~~~~~
/usr/include/stdlib.h:286:36: error: 'size_t' has not been declared
  286 | extern int strfroml (char *__dest, size_t __size, const char *__format,
      |                                    ^~~~~~
/usr/include/stdlib.h:298:38: error: 'size_t' has not been declared
  298 | extern int strfromf32 (char *__dest, size_t __size, const char * __format,
      |                                      ^~~~~~
/usr/include/stdlib.h:304:38: error: 'size_t' has not been declared
  304 | extern int strfromf64 (char *__dest, size_t __size, const char * __format,
      |                                      ^~~~~~
/usr/include/stdlib.h:310:39: error: 'size_t' has not been declared
  310 | extern int strfromf128 (char *__dest, size_t __size, const char * __format,
      |                                       ^~~~~~
/usr/include/stdlib.h:316:39: error: 'size_t' has not been declared
  316 | extern int strfromf32x (char *__dest, size_t __size, const char * __format,
      |                                       ^~~~~~
/usr/include/stdlib.h:322:39: error: 'size_t' has not been declared
  322 | extern int strfromf64x (char *__dest, size_t __size, const char * __format,
      |                                       ^~~~~~
In file included from /usr/include/stdlib.h:514:
/usr/include/x86_64-linux-gnu/sys/types.h:33:9: error: '__u_char' does not name a type
   33 | typedef __u_char u_char;
      |         ^~~~~~~~
/usr/include/x86_64-linux-gnu/sys/types.h:34:9: error: '__u_short' does not name a type
   34 | typedef __u_short u_short;
      |         ^~~~~~~~~
/usr/include/x86_64-linux-gnu/sys/types.h:35:9: error: '__u_int' does not name a type
   35 | typedef __u_int u_int;
      |         ^~~~~~~
/usr/include/x86_64-linux-gnu/sys/types.h:36:9: error: '__u_long' does not name a type
   36 | typedef __u_long u_long;
      |         ^~~~~~~~
/usr/include/x86_64-linux-gnu/sys/types.h:37:9: error: '__quad_t' does not name a type
   37 | typedef __quad_t quad_t;
      |         ^~~~~~~~
/usr/include/x86_64-linux-gnu/sys/types.h:38:9: error: '__u_quad_t' does not name a type
   38 | typedef __u_quad_t u_quad_t;
      |         ^~~~~~~~~~
/usr/include/x86_64-linux-gnu/sys/types.h:39:9: error: '__fsid_t' does not name a type
   39 | typedef __fsid_t fsid_t;
      |         ^~~~~~~~
/usr/include/x86_64-linux-gnu/sys/types.h:42:9: error: '__loff_t' does not name a type; did you mean '__locale_t'?
   42 | typedef __loff_t loff_t;
      |         ^~~~~~~~
      |         __locale_t
/usr/include/x86_64-linux-gnu/sys/types.h:47:9: error: '__ino_t' does not name a type
   47 | typedef __ino_t ino_t;
      |         ^~~~~~~
/usr/include/x86_64-linux-gnu/sys/types.h:54:9: error: '__ino64_t' does not name a type
   54 | typedef __ino64_t ino64_t;
      |         ^~~~~~~~~
/usr/include/x86_64-linux-gnu/sys/types.h:59:9: error: '__dev_t' does not name a type
   59 | typedef __dev_t dev_t;
      |         ^~~~~~~
/usr/include/x86_64-linux-gnu/sys/types.h:64:9: error: '__gid_t' does not name a type
   64 | typedef __gid_t gid_t;
      |         ^~~~~~~
/usr/include/x86_64-linux-gnu/sys/types.h:69:9: error: '__mode_t' does not name a type; did you mean '__locale_t'?
   69 | typedef __mode_t mode_t;
      |         ^~~~~~~~
      |         __locale_t
/usr/include/x86_64-linux-gnu/sys/types.h:74:9: error: '__nlink_t' does not name a type
   74 | typedef __nlink_t nlink_t;
      |         ^~~~~~~~~
/usr/include/x86_64-linux-gnu/sys/types.h:79:9: error: '__uid_t' does not name a type
   79 | typedef __uid_t uid_t;
      |         ^~~~~~~
/usr/include/x86_64-linux-gnu/sys/types.h:97:9: error: '__pid_t' does not name a type
   97 | typedef __pid_t pid_t;
      |         ^~~~~~~
/usr/include/x86_64-linux-gnu/sys/types.h:103:9: error: '__id_t' does not name a type
  103 | typedef __id_t id_t;
      |         ^~~~~~
/usr/include/x86_64-linux-gnu/sys/types.h:114:9: error: '__daddr_t' does not name a type
  114 | typedef __daddr_t daddr_t;
      |         ^~~~~~~~~
/usr/include/x86_64-linux-gnu/sys/types.h:115:9: error: '__caddr_t' does not name a type
  115 | typedef __caddr_t caddr_t;
      |         ^~~~~~~~~
/usr/include/x86_64-linux-gnu/sys/types.h:121:9: error: '__key_t' does not name a type
  121 | typedef __key_t key_t;
      |         ^~~~~~~
In file included from /usr/include/x86_64-linux-gnu/sys/types.h:126:
/usr/include/x86_64-linux-gnu/bits/types/clock_t.h:7:9: error: '__clock_t' does not name a type
    7 | typedef __clock_t clock_t;
      |         ^~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/sys/types.h:128:
/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h:7:9: error: '__clockid_t' does not name a type
    7 | typedef __clockid_t clockid_t;
      |         ^~~~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/sys/types.h:129:
/usr/include/x86_64-linux-gnu/bits/types/time_t.h:10:9: error: '__time_t' does not name a type
   10 | typedef __time_t time_t;
      |         ^~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/sys/types.h:130:
/usr/include/x86_64-linux-gnu/bits/types/timer_t.h:7:9: error: '__timer_t' does not name a type
    7 | typedef __timer_t timer_t;
      |         ^~~~~~~~~
/usr/include/x86_64-linux-gnu/sys/types.h:134:9: error: '__useconds_t' does not name a type
  134 | typedef __useconds_t useconds_t;
      |         ^~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/sys/types.h:138:9: error: '__suseconds_t' does not name a type
  138 | typedef __suseconds_t suseconds_t;
      |         ^~~~~~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/sys/types.h:155:
/usr/include/x86_64-linux-gnu/bits/stdint-intn.h:24:9: error: '__int8_t' does not name a type; did you mean '__int128_t'?
   24 | typedef __int8_t int8_t;
      |         ^~~~~~~~
      |         __int128_t
/usr/include/x86_64-linux-gnu/bits/stdint-intn.h:25:9: error: '__int16_t' does not name a type; did you mean '__int128_t'?
   25 | typedef __int16_t int16_t;
      |         ^~~~~~~~~
      |         __int128_t
/usr/include/x86_64-linux-gnu/bits/stdint-intn.h:26:9: error: '__int32_t' does not name a type; did you mean '__int128_t'?
   26 | typedef __int32_t int32_t;
      |         ^~~~~~~~~
      |         __int128_t
/usr/include/x86_64-linux-gnu/bits/stdint-intn.h:27:9: error: '__int64_t' does not name a type; did you mean '__int128_t'?
   27 | typedef __int64_t int64_t;
      |         ^~~~~~~~~
      |         __int128_t
/usr/include/x86_64-linux-gnu/sys/types.h:158:9: error: '__uint8_t' does not name a type; did you mean '__uint128_t'?
  158 | typedef __uint8_t u_int8_t;
      |         ^~~~~~~~~
      |         __uint128_t
/usr/include/x86_64-linux-gnu/sys/types.h:159:9: error: '__uint16_t' does not name a type; did you mean '__uint128_t'?
  159 | typedef __uint16_t u_int16_t;
      |         ^~~~~~~~~~
      |         __uint128_t
/usr/include/x86_64-linux-gnu/sys/types.h:160:9: error: '__uint32_t' does not name a type; did you mean '__uint128_t'?
  160 | typedef __uint32_t u_int32_t;
      |         ^~~~~~~~~~
      |         __uint128_t
/usr/include/x86_64-linux-gnu/sys/types.h:161:9: error: '__uint64_t' does not name a type; did you mean '__uint128_t'?
  161 | typedef __uint64_t u_int64_t;
      |         ^~~~~~~~~~
      |         __uint128_t
In file included from /usr/include/endian.h:35,
                 from /usr/include/x86_64-linux-gnu/sys/types.h:176:
/usr/include/x86_64-linux-gnu/bits/byteswap.h:33:17: error: '__uint16_t' does not name a type; did you mean '__uint128_t'?
   33 | static __inline __uint16_t
      |                 ^~~~~~~~~~
      |                 __uint128_t
/usr/include/x86_64-linux-gnu/bits/byteswap.h:48:17: error: '__uint32_t' does not name a type; did you mean '__uint128_t'?
   48 | static __inline __uint32_t
      |                 ^~~~~~~~~~
      |                 __uint128_t
/usr/include/x86_64-linux-gnu/bits/byteswap.h:69:31: error: '__uint64_t' does not name a type; did you mean '__uint128_t'?
   69 | __extension__ static __inline __uint64_t
      |                               ^~~~~~~~~~
      |                               __uint128_t
In file included from /usr/include/endian.h:36:
/usr/include/x86_64-linux-gnu/bits/uintn-identity.h:32:17: error: '__uint16_t' does not name a type; did you mean '__uint128_t'?
   32 | static __inline __uint16_t
      |                 ^~~~~~~~~~
      |                 __uint128_t
/usr/include/x86_64-linux-gnu/bits/uintn-identity.h:38:17: error: '__uint32_t' does not name a type; did you mean '__uint128_t'?
   38 | static __inline __uint32_t
      |                 ^~~~~~~~~~
      |                 __uint128_t
/usr/include/x86_64-linux-gnu/bits/uintn-identity.h:44:17: error: '__uint64_t' does not name a type; did you mean '__uint128_t'?
   44 | static __inline __uint64_t
      |                 ^~~~~~~~~~
      |                 __uint128_t
In file included from /usr/include/x86_64-linux-gnu/sys/select.h:37,
                 from /usr/include/x86_64-linux-gnu/sys/types.h:179:
/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h:14:3: error: '__time_t' does not name a type; did you mean '__sig