Language: C++

#include <iostream>
#include <vector>
#include <cmath>
#include <algorithm>
using namespace std;
 
int main() {
  int N; cin >> N;
  vector<ll> A(N), B(N), C(N);
  for (int i=0; i<N; i++) cin >> A[i];
  for (int i=0; i<N; i++) cin >> B[i];
  for (int i=0; i<N; i++) cin >> C[i];

  sort(A.begin(), A.end()); sort(C.begin(), C.end());

  ll result = 0;
  for (auto i: B) {
    ll num_a = lower_bound(A.begin(), A.end(), i) - A.begin();
    ll num_c = N - ( upper_bound(C.begin(), C.end(), i) - C.begin() );
    result += num_a * num_c;
  }
  cout << result << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:10: error: 'll' was not declared in this scope
    9 |   vector<ll> A(N), B(N), C(N);
      |          ^~
a.cc:9:12: error: template argument 1 is invalid
    9 |   vector<ll> A(N), B(N), C(N);
      |            ^
a.cc:9:12: error: template argument 2 is invalid
a.cc:10:35: error: invalid types 'int[int]' for array subscript
   10 |   for (int i=0; i<N; i++) cin >> A[i];
      |                                   ^
a.cc:11:35: error: invalid types 'int[int]' for array subscript
   11 |   for (int i=0; i<N; i++) cin >> B[i];
      |                                   ^
a.cc:12:35: error: invalid types 'int[int]' for array subscript
   12 |   for (int i=0; i<N; i++) cin >> C[i];
      |                                   ^
a.cc:14:10: error: request for member 'begin' in 'A', which is of non-class type 'int'
   14 |   sort(A.begin(), A.end()); sort(C.begin(), C.end());
      |          ^~~~~
a.cc:14:21: error: request for member 'end' in 'A', which is of non-class type 'int'
   14 |   sort(A.begin(), A.end()); sort(C.begin(), C.end());
      |                     ^~~
a.cc:14:36: error: request for member 'begin' in 'C', which is of non-class type 'int'
   14 |   sort(A.begin(), A.end()); sort(C.begin(), C.end());
      |                                    ^~~~~
a.cc:14:47: error: request for member 'end' in 'C', which is of non-class type 'int'
   14 |   sort(A.begin(), A.end()); sort(C.begin(), C.end());
      |                                               ^~~
a.cc:16:5: error: expected ';' before 'result'
   16 |   ll result = 0;
      |     ^~~~~~~
      |     ;
a.cc:17:16: error: 'begin' was not declared in this scope; did you mean 'std::begin'?
   17 |   for (auto i: B) {
      |                ^
      |                std::begin
In file included from /usr/include/c++/14/string:53,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/range_access.h:114:37: note: 'std::begin' declared here
  114 |   template<typename _Tp> const _Tp* begin(const valarray<_Tp>&) noexcept;
      |                                     ^~~~~
a.cc:17:16: error: 'end' was not declared in this scope; did you mean 'std::end'?
   17 |   for (auto i: B) {
      |                ^
      |                std::end
/usr/include/c++/14/bits/range_access.h:116:37: note: 'std::end' declared here
  116 |   template<typename _Tp> const _Tp* end(const valarray<_Tp>&) noexcept;
      |                                     ^~~
a.cc:18:7: error: expected ';' before 'num_a'
   18 |     ll num_a = lower_bound(A.begin(), A.end(), i) - A.begin();
      |       ^~~~~~
      |       ;
a.cc:19:7: error: expected ';' before 'num_c'
   19 |     ll num_c = N - ( upper_bound(C.begin(), C.end(), i) - C.begin() );
      |       ^~~~~~
      |       ;
a.cc:20:5: error: 'result' was not declared in this scope
   20 |     result += num_a * num_c;
      |     ^~~~~~
a.cc:20:15: error: 'num_a' was not declared in this scope
   20 |     result += num_a * num_c;
      |               ^~~~~
a.cc:20:23: error: 'num_c' was not declared in this scope
   20 |     result += num_a * num_c;
      |                       ^~~~~
a.cc:22:11: error: 'result' was not declared in this scope
   22 |   cout << result << endl;
      |           ^~~~~~