Language: C++

#include <iostream>
#include <algorithm>

sing namespace std;

typedef long long lint;
typedef unsigned long long ulint;
#define MOD 1000000007

int main(){
    int N;
    cin >> N;
    int A[100000],B[100000],C[100000];
    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,A+N);
    sort(B,B+N);
    sort(C,C+N);

    int ans=0;
    for(int i=0;i<N;i++){
        ans+=distance(A,lower_bound(A,A+N,B[i]))*distance(upper_bound(C,C+N,B[i]),C+N);
    }

    cout << ans << endl;

    return 0;
}

Compiler output:
a.cc:4:1: error: 'sing' does not name a type
    4 | sing namespace std;
      | ^~~~
a.cc: In function 'int main()':
a.cc:12:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   12 |     cin >> N;
      |     ^~~
      |     std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:18:5: error: 'sort' was not declared in this scope; did you mean 'std::sort'?
   18 |     sort(A,A+N);
      |     ^~~~
      |     std::sort
In file included from /usr/include/c++/14/algorithm:86,
                 from a.cc:2:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note: 'std::sort' declared here
  296 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last);
      | ^~~~
a.cc:24:25: error: 'lower_bound' was not declared in this scope; did you mean 'std::lower_bound'?
   24 |         ans+=distance(A,lower_bound(A,A+N,B[i]))*distance(upper_bound(C,C+N,B[i]),C+N);
      |                         ^~~~~~~~~~~
      |                         std::lower_bound
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:1963:5: note: 'std::lower_bound' declared here
 1963 |     lower_bound(_ForwardIterator __first, _ForwardIterator __last,
      |     ^~~~~~~~~~~
a.cc:24:14: error: 'distance' was not declared in this scope; did you mean 'std::distance'?
   24 |         ans+=distance(A,lower_bound(A,A+N,B[i]))*distance(upper_bound(C,C+N,B[i]),C+N);
      |              ^~~~~~~~
      |              std::distance
In file included from /usr/include/c++/14/string:47,
                 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:
/usr/include/c++/14/bits/stl_iterator_base_funcs.h:148:5: note: 'std::distance' declared here
  148 |     distance(_InputIterator __first, _InputIterator __last)
      |     ^~~~~~~~
a.cc:24:59: error: 'upper_bound' was not declared in this scope; did you mean 'std::upper_bound'?
   24 |         ans+=distance(A,lower_bound(A,A+N,B[i]))*distance(upper_bound(C,C+N,B[i]),C+N);
      |                                                           ^~~~~~~~~~~
      |                                                           std::upper_bound
/usr/include/c++/14/bits/stl_algo.h:2050:5: note: 'std::upper_bound' declared here
 2050 |     upper_bound(_ForwardIterator __first, _ForwardIterator __last,
      |     ^~~~~~~~~~~
a.cc:27:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   27 |     cout << ans << endl;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:27:20: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   27 |     cout << ans << endl;
      |                    ^~~~
      |                    std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~