Language: C++

#include <bits/stdc++.h>

using namespace std;

typedef long long LL;
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define rrep(i, n) for (int i = N; i >= 0; i--)

template<typename Container>
bool include(const Container& c, const typename Container::value_type& v) {
  return ( c.end() != std::find(c.begin(),c.end(),v) );
}

template<class T>
vector<T> unique_vec(const vector<T> &v) {
  sort(v.begin(), v.end());
  v.erase(unique(v.begin(), v.end()), v.end());
  return v;
}

int main() {
  int N;
  cin >> N;
  vector<ll> L(N);
  rep(i, N)
    cin >> L[i];
  sort(L.begin(), L.end());

  int cnt = 0;
  for (int i = 0; i < N; i++) {
    for (int j = i+1; j < N; j++) {
      for (int k = j+1; j < N; j++) {
        if (i!=j && j!=k && k!=i) {
          if(L[i]+L[j]>=L[k] && L[j]+L[k]>=L[i] && L[k]+L[i]>=L[j])
            cnt++;
        }
      }
      // int right = lower_bound(L.begin(), L.end()m L[i] + L[j]) - L.begin();
      // res += max(right - (j+1), 0)
    }
  }
  cout << cnt << endl;

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:10: error: 'll' was not declared in this scope; did you mean 'LL'?
   24 |   vector<ll> L(N);
      |          ^~
      |          LL
a.cc:24:12: error: template argument 1 is invalid
   24 |   vector<ll> L(N);
      |            ^
a.cc:24:12: error: template argument 2 is invalid
a.cc:26:13: error: invalid types 'int[int]' for array subscript
   26 |     cin >> L[i];
      |             ^
a.cc:27:10: error: request for member 'begin' in 'L', which is of non-class type 'int'
   27 |   sort(L.begin(), L.end());
      |          ^~~~~
a.cc:27:21: error: request for member 'end' in 'L', which is of non-class type 'int'
   27 |   sort(L.begin(), L.end());
      |                     ^~~
a.cc:34:15: error: invalid types 'int[int]' for array subscript
   34 |           if(L[i]+L[j]>=L[k] && L[j]+L[k]>=L[i] && L[k]+L[i]>=L[j])
      |               ^
a.cc:34:20: error: invalid types 'int[int]' for array subscript
   34 |           if(L[i]+L[j]>=L[k] && L[j]+L[k]>=L[i] && L[k]+L[i]>=L[j])
      |                    ^
a.cc:34:26: error: invalid types 'int[int]' for array subscript
   34 |           if(L[i]+L[j]>=L[k] && L[j]+L[k]>=L[i] && L[k]+L[i]>=L[j])
      |                          ^
a.cc:34:34: error: invalid types 'int[int]' for array subscript
   34 |           if(L[i]+L[j]>=L[k] && L[j]+L[k]>=L[i] && L[k]+L[i]>=L[j])
      |                                  ^
a.cc:34:39: error: invalid types 'int[int]' for array subscript
   34 |           if(L[i]+L[j]>=L[k] && L[j]+L[k]>=L[i] && L[k]+L[i]>=L[j])
      |                                       ^
a.cc:34:45: error: invalid types 'int[int]' for array subscript
   34 |           if(L[i]+L[j]>=L[k] && L[j]+L[k]>=L[i] && L[k]+L[i]>=L[j])
      |                                             ^
a.cc:34:53: error: invalid types 'int[int]' for array subscript
   34 |           if(L[i]+L[j]>=L[k] && L[j]+L[k]>=L[i] && L[k]+L[i]>=L[j])
      |                                                     ^
a.cc:34:58: error: invalid types 'int[int]' for array subscript
   34 |           if(L[i]+L[j]>=L[k] && L[j]+L[k]>=L[i] && L[k]+L[i]>=L[j])
      |                                                          ^
a.cc:34:64: error: invalid types 'int[int]' for array subscript
   34 |           if(L[i]+L[j]>=L[k] && L[j]+L[k]>=L[i] && L[k]+L[i]>=L[j])
      |                                                                ^