Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long long 
ll mod =1000000007;
/*"itob" int to "N"base */           template<typename TypeInt> string itob(const TypeInt v, int base){static const char table[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";string ret;static numeric_limits<TypeInt> t;TypeInt n = v;if (t.is_signed) {if (v < 0) n *= -1;}while (n >= base) {ret += table[n%base];n /= base;}ret += table[n];if (t.is_signed) {if (v < 0 && base == 10) ret += '-';}reverse(ret.begin(), ret.end());return ret;}
/*"chmin" a = MAX*/                  template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
/*"chmax" a = MIN*/                  template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
/*"ctoi"  char to int*/              int ctoi(char c) {return c-'0';}
/*"gcd"   MAX*/                      int gcd(ll a,ll b){return b?gcd(b,a%b):a;}
/*"lcm"   MIN*/                      int lcm(ll a,ll b){return a*b/gcd(a,b);}
/*"primecheck"If prime,return true.*/bool primecheck(ll n){if(n < 2) return false;else{for(int i = 2; i * i <= n; i++){if(n % i == 0) return false;}return true;}}
string  reverserange(string s,ll a,ll b){reverse(s.begin()+a-1,s.begin()+b); return s;}
int main(){
ll n;
cin >> n;
vector<ll>a(n),b(n),c(n);
for(ll i=0;i<n;i++){cin>>a.at(i);}
for(ll i=0;i<n;i++){cin>>b.at(i);}
for(ll i=0;i<n;i++){cin>>c.at(i);}
sort(a.begin(),a.end());
sort(b.begin(),b.end());
sort(c.begin(),c.end());
ll ans = 0;
for(ll i=0;i<n;i++)ll key = b.at(i)ll al = -1,ar=n;
    while(ar-al>1){
        ll mid = al+(ar-al)/2;
        if(a.at(mid)<key)al = mid;
        else ar =mid;
    }
    ll cl=-1,cr=n;
    while(cr-cl>1){
        ll mid = cl+(cr-cl)/2;
        if(c.at(mid)>key)cr=mid;
        else cl =mid;
    }
    al++;ar++;cl++;cr++;    
    ans+=(n-cr+1)*al;
}
cout << ans << endl;
}




Compiler output:
a.cc: In function 'int main()':
a.cc:3:12: error: expected ',' or ';' before 'long'
    3 | #define ll long long
      |            ^~~~
a.cc:24:36: note: in expansion of macro 'll'
   24 | for(ll i=0;i<n;i++)ll key = b.at(i)ll al = -1,ar=n;
      |                                    ^~
a.cc:25:11: error: 'ar' was not declared in this scope; did you mean 'a'?
   25 |     while(ar-al>1){
      |           ^~
      |           a
a.cc:25:14: error: 'al' was not declared in this scope; did you mean 'a'?
   25 |     while(ar-al>1){
      |              ^~
      |              a
a.cc:27:22: error: 'key' was not declared in this scope; did you mean 'key_t'?
   27 |         if(a.at(mid)<key)al = mid;
      |                      ^~~
      |                      key_t
a.cc:33:22: error: 'key' was not declared in this scope; did you mean 'key_t'?
   33 |         if(c.at(mid)>key)cr=mid;
      |                      ^~~
      |                      key_t
a.cc:36:5: error: 'al' was not declared in this scope; did you mean 'cl'?
   36 |     al++;ar++;cl++;cr++;
      |     ^~
      |     cl
a.cc:36:10: error: 'ar' was not declared in this scope; did you mean 'cr'?
   36 |     al++;ar++;cl++;cr++;
      |          ^~
      |          cr
a.cc: At global scope:
a.cc:39:1: error: 'cout' does not name a type
   39 | cout << ans << endl;
      | ^~~~
a.cc:40:1: error: expected declaration before '}' token
   40 | }
      | ^