criyle/codenet-compile-errors huggingface dataset:
Language: Java

import java.util.Scanner;
public class Main{
  public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
    int n = scan.nextInt();
    long L[]; L = new long(n);
    for (int i = 0; i < n; i++){
      long l = scan.nextLong();
      L[i] = l;
    }
    int ans = 0;
    for (int i = 0; i < n; i++){
      for (int j = i+1; j < n; j++){
        for (int k = j+1; k < n; k++){
          if (L[i] == L[j] || L[i] == L[k] || L[j] == L[k]){
            continue;
          }else{
            if (L[i]+L[j] > L[k] && L[i]+L[k] > L[j] && L[j]+L[k] > L[i]){
              ans++;
            }
          }
        }
      }
    }
    System.out.println(ans);
  }
}

Compiler output:
Main.java:6: error: '[' expected
    long L[]; L = new long(n);
                          ^
Main.java:6: error: ']' expected
    long L[]; L = new long(n);
                             ^
2 errors
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n;
  cin >> n;
  vector<long long> L(n);
  for (int i = 0; i < n; i++){
    int l;
    cin >> l;
    L.at(i) = l;
  int ans = 0;
  for (int i = 0; i < n; i++){
    for (int j = i+1; j < n; j++){
      for (int k = j+1; k < n; k++){
        if (L.at(i) == L.at(j) || L.at(i) == L.at(k) || L.at(j) == L.at(k)){
          continue;
        }else{
          if (L.at(i)+L.at(j) > L.at(k) && L.at(j)+L.at(k) > L.at(i) && L.at(i)+L.at(k) > L.at(j){
            ans++;
          }
        }
      }
    }
  }
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:98: error: expected ')' before '{' token
   18 |           if (L.at(i)+L.at(j) > L.at(k) && L.at(j)+L.at(k) > L.at(i) && L.at(i)+L.at(k) > L.at(j){
      |              ~                                                                                   ^
      |                                                                                                  )
a.cc:21:9: error: expected primary-expression before '}' token
   21 |         }
      |         ^
a.cc:26:2: error: expected '}' at end of input
   26 | }
      |  ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  for(int i = 0; i < N; i++) cin >> A[i];
  
  int ans = 0;
  for(int i = 0; i < N; i++) {
    for(int j = 0; j < N; j++) {
      for(int k = 0; k < N; k++) {
        if (A[i] == A[j] || A[j] == A[k] || A[i] == A[k]) continue;
        vector<int> B = {A[i], A[j], A[k]};
        sort(B.begin(), B.end());
        if (B[0] + B[1] > B[2]) {
          ans++;
        }
      }
    }
  }
  cout << ans << endl;
  return 0:
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:11: error: expected ';' before ':' token
   27 |   return 0:
      |           ^
      |           ;
a.cc:27:11: error: expected primary-expression before ':' token
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <map>
#include <math.h>
 
#define rep(i,n) for(int i = 0; i < n; i++)
using namespace std;
#define ll long long int
 
int main() {
	ll n;
	cin >> n;
	vector<ll>l(n);
	rep(i,n){
		cin >> l[i];
	}
	ll flag = 0;
	ll sum = 0;
	rep(i,n){
		   rep(j,n){
			   
			 if(i < j && l[i] != l[j]){
				
		rep(k,n){
				
		if(i < k && j < k && l[i] != l[k] && l[k] != l[j]){
						
			sum= max({l[i],l[j],l[k]});
	       		
	       		if(l[i]+l[j]+l[k] >2 * x ){
					
					flag;
				
						}
					}
				}
			 }
		   }
	}
	cout << flag;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:48: error: 'x' was not declared in this scope
   32 |                         if(l[i]+l[j]+l[k] >2 * x ){
      |                                                ^
Language: C++

#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <iterator>
#include <unordered_set>
#include <initializer_list>
using namespace std;

// void removeCharsFromString( string &str, char charsToRemove ) 
// {
  
    

//     // Next, call std::set_intersection to collect the common elements into 
//     // the unordered_set
//     std::unordered_set<int> common;
//     std::set_intersection(arr.begin(), arr.end(), arr1.begin(), arr1.end(), 
//                           std::inserter(common, common.begin()));

//     // Now erase the items in each vector that matches the items in the set
//     arr.erase(std::remove_if(arr.begin(), arr.end(), 
//                              [&](int n) { return common.count(n); }), arr.end());
//     arr1.erase(std::remove_if(arr1.begin(), arr1.end(), 
//                              [&](int n) { return common.count(n); }), arr1.end());

//     // Output results
//     for (auto i : arr)
//       std::cout << i << " ";
//     std::cout << "\n";
//     for (auto i : arr1)
//       std::cout << i << " ";
   
// }

#define loop(i,n) for(int i = 0; i < n; i++)
typedef long long int ll;
int main() {
  
  ll n;
  ll count=0;
  cin>>n;
  vector<ll> l(n);
  for(int i=0;i<n;i++)
  cin>>l[i];
  ll sum;
  loop(i,n)
  {
     loop(j,n)
      {
          while(i<j && l[j]!=l[i])
          {
              loop(k,n)
              {
                  while(k<j && l[k]!=l[i] && l[k]!=l[j])
                  {
                      sum=max({l[i],l[j],l[k]});
                      if((l[i]+l[j]+l[k])>2*max)
                      count++;
                  }
              }
          }
      }
  }
   cout<<count;
      
}

Compiler output:
a.cc: In function 'int main()':
a.cc:58:44: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator*'
   58 |                       if((l[i]+l[j]+l[k])>2*max)
      |                                           ~^~~~
Language: C++

#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <iterator>
#include <unordered_set>
#include <initializer_list>
using namespace std;

// void removeCharsFromString( string &str, char charsToRemove ) 
// {
  
    

//     // Next, call std::set_intersection to collect the common elements into 
//     // the unordered_set
//     std::unordered_set<int> common;
//     std::set_intersection(arr.begin(), arr.end(), arr1.begin(), arr1.end(), 
//                           std::inserter(common, common.begin()));

//     // Now erase the items in each vector that matches the items in the set
//     arr.erase(std::remove_if(arr.begin(), arr.end(), 
//                              [&](int n) { return common.count(n); }), arr.end());
//     arr1.erase(std::remove_if(arr1.begin(), arr1.end(), 
//                              [&](int n) { return common.count(n); }), arr1.end());

//     // Output results
//     for (auto i : arr)
//       std::cout << i << " ";
//     std::cout << "\n";
//     for (auto i : arr1)
//       std::cout << i << " ";
   
// }

#define rep(i,n) for(int i = 0; i < n; i++)
typedef long long int ll;
int main() {
  ll max;
  ll n;
  ll count=0;
  cin>>n;
  vector<ll> l(n);
  for(i=0;i<n;i++)
  cin>>l[i];
  rep(i,n)
  {
     rep(j,n)
      {
          while(i<j && l[j]!=l[i])
          {
              rep(k,n)
              {
                  while(k<j && l[k]!=l[i] && l[k]!=l[j])
                  {
                      sum=max({l[i],l[j],l[k]});
                      if((l[i]+l[j]+l[k])>2*max)
                      count++;
                  }
              }
          }
      }
  }
   cout<<count;
      
}

Compiler output:
a.cc: In function 'int main()':
a.cc:44:7: error: 'i' was not declared in this scope
   44 |   for(i=0;i<n;i++)
      |       ^
a.cc:56:23: error: 'sum' was not declared in this scope
   56 |                       sum=max({l[i],l[j],l[k]});
      |                       ^~~
a.cc:56:30: error: 'max' cannot be used as a function
   56 |                       sum=max({l[i],l[j],l[k]});
      |                           ~~~^~~~~~~~~~~~~~~~~~
Language: C++

#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <iterator>
#include <unordered_set>
#include <initializer_list>
using namespace std;

// void removeCharsFromString( string &str, char charsToRemove ) 
// {
  
    

//     // Next, call std::set_intersection to collect the common elements into 
//     // the unordered_set
//     std::unordered_set<int> common;
//     std::set_intersection(arr.begin(), arr.end(), arr1.begin(), arr1.end(), 
//                           std::inserter(common, common.begin()));

//     // Now erase the items in each vector that matches the items in the set
//     arr.erase(std::remove_if(arr.begin(), arr.end(), 
//                              [&](int n) { return common.count(n); }), arr.end());
//     arr1.erase(std::remove_if(arr1.begin(), arr1.end(), 
//                              [&](int n) { return common.count(n); }), arr1.end());

//     // Output results
//     for (auto i : arr)
//       std::cout << i << " ";
//     std::cout << "\n";
//     for (auto i : arr1)
//       std::cout << i << " ";
   
// }

#define rep(i,n) for(int i = 0; i < n; i++)
typedef long long int ll;
int main() {
  ll max;
  ll n;
  ll count=0;
  cin>>n;
  lvector<ll> l(n);
  for(i=0;i<n;i++)
  cin>>l[i];
  rep(i,n)
  {
     rep(j,n)
      {
          while(i<j && l[j]!=l[i])
          {
              rep(k,n)
              {
                  while(k<j && l[k]!=l[i] && l[k]!=l[j])
                  {
                      sum=max({l[i],l[j],l[k]});
                      if((l[i]+l[j]+l[k])>2*max)
                      count++;
                  }
              }
          }
      }
  }
   cout<<count;
      
}

Compiler output:
a.cc: In function 'int main()':
a.cc:43:3: error: 'lvector' was not declared in this scope
   43 |   lvector<ll> l(n);
      |   ^~~~~~~
a.cc:43:13: error: expected primary-expression before '>' token
   43 |   lvector<ll> l(n);
      |             ^
a.cc:43:15: error: 'l' was not declared in this scope
   43 |   lvector<ll> l(n);
      |               ^
a.cc:44:7: error: 'i' was not declared in this scope
   44 |   for(i=0;i<n;i++)
      |       ^
a.cc:56:23: error: 'sum' was not declared in this scope
   56 |                       sum=max({l[i],l[j],l[k]});
      |                       ^~~
a.cc:56:30: error: 'max' cannot be used as a function
   56 |                       sum=max({l[i],l[j],l[k]});
      |                           ~~~^~~~~~~~~~~~~~~~~~
Language: C++

#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <iterator>
#include <unordered_set>
#include <initializer_list>
using namespace std;

// void removeCharsFromString( string &str, char charsToRemove ) 
// {
  
    

//     // Next, call std::set_intersection to collect the common elements into 
//     // the unordered_set
//     std::unordered_set<int> common;
//     std::set_intersection(arr.begin(), arr.end(), arr1.begin(), arr1.end(), 
//                           std::inserter(common, common.begin()));

//     // Now erase the items in each vector that matches the items in the set
//     arr.erase(std::remove_if(arr.begin(), arr.end(), 
//                              [&](int n) { return common.count(n); }), arr.end());
//     arr1.erase(std::remove_if(arr1.begin(), arr1.end(), 
//                              [&](int n) { return common.count(n); }), arr1.end());

//     // Output results
//     for (auto i : arr)
//       std::cout << i << " ";
//     std::cout << "\n";
//     for (auto i : arr1)
//       std::cout << i << " ";
   
// }

#define rep(i,n) for(int i = 0; i < n; i++)
typedef long long int ll;
int main() {
  ll i,j,k,max;
  ll n;
  ll count=0;
  cin>>n;
  lvector<ll> l(n);
  for(i=0;i<n;i++)
  cin>>l[i];
  rep(i,n)
  {
     rep(j,n)
      {
          while(i<j && l[j]!=l[i])
          {
              rep(k,n)
              {
                  while(k<j && l[k]!=l[i] && l[k]!=l[j])
                  {
                      sum=max({l[i],l[j],l[k]});
                      if((l[i]+l[j]+l[k])>2*max)
                      count++;
                  }
              }
          }
      }
  }
   cout<<count;
      
}

Compiler output:
a.cc: In function 'int main()':
a.cc:43:3: error: 'lvector' was not declared in this scope
   43 |   lvector<ll> l(n);
      |   ^~~~~~~
a.cc:43:13: error: expected primary-expression before '>' token
   43 |   lvector<ll> l(n);
      |             ^
a.cc:43:15: error: 'l' was not declared in this scope
   43 |   lvector<ll> l(n);
      |               ^
a.cc:56:23: error: 'sum' was not declared in this scope
   56 |                       sum=max({l[i],l[j],l[k]});
      |                       ^~~
a.cc:56:30: error: 'max' cannot be used as a function
   56 |                       sum=max({l[i],l[j],l[k]});
      |                           ~~~^~~~~~~~~~~~~~~~~~
Language: C++

#pragma region template 2.4
#include <bits/stdc++.h>
using namespace std;
template <typename T>
using pq_asc = priority_queue<T, vector<T>, greater<T>>;
typedef long long ll;
typedef vector<ll> vi;
typedef vector<vi> vvi;
typedef pair<ll, ll> ii;
typedef vector<ii> vii;
typedef vector<string> vs;
#define REP(i, n) for (ll i = 0; i < (n); ++i)
#define REP1(i, n) for (ll i = 1; i <= (n); ++i)
#define FOR(i, a) for (auto &i : a)
#define CH(f, x, y) x = f(x, y)
#define IN(T, x) \
    T x;         \
    cin >> x;
#define AIN(T, a, n) \
    vector<T> a(n);  \
    FOR(i, a)        \
    cin >> i;
#define A2IN(T1, a, T2, b, n) \
    vector<T1> a(n);          \
    vector<T2> b(n);          \
    REP(i, n)                 \
    cin >> a[i] >> b[i];
#define OUT(x) cout << (x) << endl;
#define FOUT(x) cout << fixed << setprecision(15) << (x) << endl;
#define ALL(a) (a).begin(), (a).end()
#define SORT(a) sort(ALL(a))
#define RSORT(a) \
    SORT(a);     \
    reverse(ALL(a))
#define DUMP(x) cout << #x << " = " << (x) << endl;
#define DUMPA(a)          \
    cout << #a << " = {"; \
    JOUT(ALL(a), ", ", cout) << "}" << endl;

template <typename T>
ostream &JOUT(T s, T e, string sep = " ", ostream &os = cout)
{
    if (s != e)
    {
        os << *s;
        ++s;
    }
    while (s != e)
    {
        os << sep << *s;
        ++s;
    }
    return os;
}

ostream &YES(bool cond, string yes = "Yes", string no = "No", ostream &os = cout)
{
    if (cond)
    {
        os << yes << endl;
    }
    else
    {
        os << no << endl;
    }
    return os;
}

template <typename T1, typename T2>
ostream &operator<<(ostream &os, const pair<T1, T2> &p)
{
    os << '(' << p.first << ", " << p.second << ')';
    return os;
}

template <typename T>
ostream &operator<<(ostream &os, const vector<T> &v)
{
    os << '[';
    JOUT(ALL(v), ", ", os) << ']';
    return os;
}

const ll INF = 1e18;
const ll MOD = 1e9 + 7;
#pragma endregion template

int main()
{
    IN(ll, N);
    AIN(ll, L, N);
    ll ans = 0;
    SORT(L);
    REP(i, N)
    {
        for (ll j = i + 1; j < N; ++j)
        {
            for (ll k = j + 1; k < N; ++k)
            {
                ans += L[k] < L[i] + L[j]
            }
        }
    }
    OUT(ans);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:100:42: error: expected ';' before '}' token
  100 |                 ans += L[k] < L[i] + L[j]
      |                                          ^
      |                                          ;
  101 |             }
      |             ~
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{

 ll n,c=0; cin>>n;
 ll a[n+1];
 for(ll i=0;i<n;i++)
 {
     cin>>a[i];
 }
 sort(a,a+n);
 for(ll i=0;i<n;i++)
 {
     for(ll j=i+1;j<n;j++)
     {
         if(a[i]!=a[j]){
         for(ll k=j+1;k<n;k++)
         {
             if(a[j]!=a[k]){
                    if(a[i]+a[j]>a[k])
                    {
                        c++;
                    }
            }

}
}
     }
     }
      }

cout<<c<<endl;

}


Compiler output:
a.cc:34:1: error: 'cout' does not name a type
   34 | cout<<c<<endl;
      | ^~~~
a.cc:36:1: error: expected declaration before '}' token
   36 | }
      | ^
Language: C++

#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <iterator>
#include <unordered_set>
#include <initializer_list>
using namespace std;

// void removeCharsFromString( string &str, char charsToRemove ) 
// {
  
    

//     // Next, call std::set_intersection to collect the common elements into 
//     // the unordered_set
//     std::unordered_set<int> common;
//     std::set_intersection(arr.begin(), arr.end(), arr1.begin(), arr1.end(), 
//                           std::inserter(common, common.begin()));

//     // Now erase the items in each vector that matches the items in the set
//     arr.erase(std::remove_if(arr.begin(), arr.end(), 
//                              [&](int n) { return common.count(n); }), arr.end());
//     arr1.erase(std::remove_if(arr1.begin(), arr1.end(), 
//                              [&](int n) { return common.count(n); }), arr1.end());

//     // Output results
//     for (auto i : arr)
//       std::cout << i << " ";
//     std::cout << "\n";
//     for (auto i : arr1)
//       std::cout << i << " ";
   
// }
typedef long long int ll;
int main() {
  ll i,j,k,x;
  ll n;
  ll count=0;
  cin>>n;
  ll l[n];
  for(i=0;i<n;i++)
  cin>>l[i];
  for(i=0;i<n;i++)
  {
      for(j=0;j<n;j++)
      {
          while(i<j && l[j]!=l[i])
          {
              for(k=0;k<n;k++)
              {
                  while(k<j && l[k]!=l[i] && l[k]!=l[j])
                  {
                      x=max(l[i],l[j],l[k]);
                      if((l[i]+l[j]+l[k])>2*x)
                      count++;
                  }
              }
          }
      }
  }
   cout<<count;
      
}

Compiler output:
In file included from /usr/include/c++/14/string:51,
                 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/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare) [with _Tp = long long int; _Compare = long long int]':
a.cc:54:28:   required from here
   54 |                       x=max(l[i],l[j],l[k]);
      |                         ~~~^~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:306:17: error: '__comp' cannot be used as a function
  306 |       if (__comp(__a, __b))
      |           ~~~~~~^~~~~~~~~~
Language: C++

#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <iterator>
#include <unordered_set>
using namespace std;

// void removeCharsFromString( string &str, char charsToRemove ) 
// {
  
    

//     // Next, call std::set_intersection to collect the common elements into 
//     // the unordered_set
//     std::unordered_set<int> common;
//     std::set_intersection(arr.begin(), arr.end(), arr1.begin(), arr1.end(), 
//                           std::inserter(common, common.begin()));

//     // Now erase the items in each vector that matches the items in the set
//     arr.erase(std::remove_if(arr.begin(), arr.end(), 
//                              [&](int n) { return common.count(n); }), arr.end());
//     arr1.erase(std::remove_if(arr1.begin(), arr1.end(), 
//                              [&](int n) { return common.count(n); }), arr1.end());

//     // Output results
//     for (auto i : arr)
//       std::cout << i << " ";
//     std::cout << "\n";
//     for (auto i : arr1)
//       std::cout << i << " ";
   
// }
typedef long long int ll;
int main() {
  ll i,j,k,x;
  ll n;
  ll count=0;
  cin>>n;
  ll l[n];
  for(i=0;i<n;i++)
  cin>>l[i];
  for(i=0;i<n;i++)
  {
      for(j=0;j<n;j++)
      {
          while(i<j && l[j]!=l[i])
          {
              for(k=0;k<n;k++)
              {
                  while(k<j && l[k]!=l[i] && l[k]!=l[j])
                  {
                      x=max(l[i],l[j],l[k]);
                      if((l[i]+l[j]+l[k])>2*x)
                      count++;
                  }
              }
          }
      }
  }
   cout<<count;
      
}

Compiler output:
In file included from /usr/include/c++/14/string:51,
                 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/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare) [with _Tp = long long int; _Compare = long long int]':
a.cc:53:28:   required from here
   53 |                       x=max(l[i],l[j],l[k]);
      |                         ~~~^~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:306:17: error: '__comp' cannot be used as a function
  306 |       if (__comp(__a, __b))
      |           ~~~~~~^~~~~~~~~~
Language: C++

#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <iterator>
#include <unordered_set>
using namespace std;

// void removeCharsFromString( string &str, char charsToRemove ) 
// {
  
    

//     // Next, call std::set_intersection to collect the common elements into 
//     // the unordered_set
//     std::unordered_set<int> common;
//     std::set_intersection(arr.begin(), arr.end(), arr1.begin(), arr1.end(), 
//                           std::inserter(common, common.begin()));

//     // Now erase the items in each vector that matches the items in the set
//     arr.erase(std::remove_if(arr.begin(), arr.end(), 
//                              [&](int n) { return common.count(n); }), arr.end());
//     arr1.erase(std::remove_if(arr1.begin(), arr1.end(), 
//                              [&](int n) { return common.count(n); }), arr1.end());

//     // Output results
//     for (auto i : arr)
//       std::cout << i << " ";
//     std::cout << "\n";
//     for (auto i : arr1)
//       std::cout << i << " ";
   
// }
typedef long long int ll;
int main() {
  ll i,j,k,x;
  ll n;
  ll count=0;
  cin>>n;
  ll l[n];
  for(i=0;i<n;i++)
  cin>>l[i];
  for(i=0;i<n;i++)
  {
      for(j=0;j<n;j++)
      {
          while(i<j && l[j]!=l[i])
          {
              for(k=0;k<n;k++)
              {
                  while(k<j && l[k]!=l[i] && l[k]!=l[j])
                  {
                      x=max(l[i],l[j],l[k])
                      if(l[i]+l[j]+l[k]>2*x)
                      count++;
                  }
              }
          }
      }
  }
   cout<<count;
      
}

Compiler output:
a.cc: In function 'int main()':
a.cc:53:44: error: expected ';' before 'if'
   53 |                       x=max(l[i],l[j],l[k])
      |                                            ^
      |                                            ;
   54 |                       if(l[i]+l[j]+l[k]>2*x)
      |                       ~~                    
In file included from /usr/include/c++/14/string:51,
                 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/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare) [with _Tp = long long int; _Compare = long long int]':
a.cc:53:28:   required from here
   53 |                       x=max(l[i],l[j],l[k])
      |                         ~~~^~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:306:17: error: '__comp' cannot be used as a function
  306 |       if (__comp(__a, __b))
      |           ~~~~~~^~~~~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  int t;
  cin>>t;
  vector<int> v;
  for(int i=0;i<t;i++)
  {
    int e;cin>>e;
    v.push_back(e);
  }
  int cnt=0;
  for(int i=0;<t-2;i++)
    for(int j=i+1;j<t-1;j++)
      for(int k=j+1;j<t;k++){
        if(v[i]+v[j]>v[k]&&v[j]+v[k]>v[i]&&v[i]+v[k]>v[j])
        cnt++;
      }
   cout<<cnt<<endl;
	return 0;
 }
        
     


Compiler output:
a.cc: In function 'int main()':
a.cc:14:15: error: expected primary-expression before '<' token
   14 |   for(int i=0;<t-2;i++)
      |               ^
Language: C

#include <stdio.h>
#include <stdlib.h>

int cmpnum(const void * n1, const void * n2)
{
	if (*(long *)n1 > *(long *)n2)
	{
		return 1;
	}
	else if (*(long *)n1 < *(long *)n2)
	{
		return -1;
	}
	else
	{
		return 0;
	}
}

int main(void)
{
	long num[100];
	int i,j,k,N,count=0;
	
    scanf("%d\n",&N);
    for(i=0;i<N;i++){
      scanf("%l",&num[i]);
    }
	qsort(num, sizeof(num) / sizeof(num[0]), sizeof(long), cmpnum);
	
  	for(i=0;i<N;i++){
     for(j=i+1;j<N;j++){
       for(k=j+1;k<N,k++){
         if(num[i]==num[j]){
         }else if(num[k]==num[j]){
         }else if(num[i]+num[j]>num[k]){
           count++;
         }
       }
     }
    }
	printf("%d\n",count);

	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:33:25: error: expected ';' before ')' token
   33 |        for(k=j+1;k<N,k++){
      |                         ^
      |                         ;
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
	int n;
	cin>>n;
	vector<int>l(n);
	for(int i=0;i<n;i++)
		cin>>vl[i];
	int cnt=0;
	for(int i=0;i<n;i++)
		for(int j=i+1;j<n;j++)
			for(int k=j+1;k<n;k++){
				int a=vl[i],b=vl[j],c=vl[k];
				if(a==b||a==c||b==c)
					continue;
				if(a+b>c&&a+c>b&&b+c>a)
					cnt++;
			}
	cout<<cnt<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:22: error: 'vl' was not declared in this scope; did you mean 'l'?
    8 |                 cin>>vl[i];
      |                      ^~
      |                      l
a.cc:13:39: error: 'vl' was not declared in this scope; did you mean 'l'?
   13 |                                 int a=vl[i],b=vl[j],c=vl[k];
      |                                       ^~
      |                                       l
a.cc:14:39: error: 'b' was not declared in this scope
   14 |                                 if(a==b||a==c||b==c)
      |                                       ^
a.cc:14:45: error: 'c' was not declared in this scope
   14 |                                 if(a==b||a==c||b==c)
      |                                             ^
a.cc:16:38: error: 'b' was not declared in this scope
   16 |                                 if(a+b>c&&a+c>b&&b+c>a)
      |                                      ^
a.cc:16:40: error: 'c' was not declared in this scope
   16 |                                 if(a+b>c&&a+c>b&&b+c>a)
      |                                        ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  int t;
  cin>>t;
  vector<int> v;
  for(int i=0;i<t;i++)
  {
    int e;cin>>e;
    v.push_back(e);
  }
  int cnt=0;
  for(int i=0;i<t-2;i++)
    for(int j=i+1;j<t-1;j++)
      for(int k=j+1;j<t;k++){
        if(v[i]+v[j]>v[k]&&v[j]+v[k]>v[i]&&v[i]+v[k]>v[j])
        cnt++;
   cout<<cnt<<endl;
	return 0;
 }
        
     


Compiler output:
a.cc: In function 'int main()':
a.cc:21:3: error: expected '}' at end of input
   21 |  }
      |   ^
a.cc:4:1: note: to match this '{'
    4 | {
      | ^
Language: Java

import java.util.*;
class Main{
public static void main(String[]args){
  Scanner sc=new Scanner(System.in);
  int n=sc.nextInt();
  int[]a=new int[n];
  for(int i=0;i<n;i++)a[i]=sc.nextInt();
  if(n<3){
  System.out.println(0);
  }else{int count=0;
  for(int i=0;i<n-2:i++){
  for(int j=i+1;j<n-1;j++){
  for(int k=j+1;k<n;k++){
  if(a[i]+a[j]<a[k]||a[k]+a[j]<a[i]||a[i]+a[k]<a[j]){}else count++;
  }
  }
  }System.out.println(count);
  
  }
}
}


Compiler output:
Main.java:11: error: ';' expected
  for(int i=0;i<n-2:i++){
                   ^
Main.java:11: error: ';' expected
  for(int i=0;i<n-2:i++){
                       ^
2 errors
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  int t;
  cin>>t;
  vector<int> v;
  for(int i=0;i<t;i++)
  {
    int e;cin>>e;
    v.push_back(e);
  }
  int cnt=0;
  for(int i=0;<t-2;i++)
    for(int j=i+1;j<t-1;j++)
      for(int k=j+1;j<t;k++){
        if(v[i]+v[j]>v[k]&&v[j]+v[k]>v[i]&&v[i]+v[k]>v[j])
        cnt++;
   cout<<cnt<<endl;
	return 0;
 }
        
     

Compiler output:
a.cc: In function 'int main()':
a.cc:14:15: error: expected primary-expression before '<' token
   14 |   for(int i=0;<t-2;i++)
      |               ^
a.cc:21:3: error: expected '}' at end of input
   21 |  }
      |   ^
a.cc:4:1: note: to match this '{'
    4 | {
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  int t;
  cin>>t;
  vector<int> v;
  for(int i=0;i<t;i++)
  {
    int e;cin>>e;
    v.push_back(e);
  }
  int cnt=0;
  for(int i=0;<t-2;i++)
    for(int j=i+1;j<t-1;j++)
      for(int k=j+1;j<t;k++){
        if(v[i]+v[j]>v[k]&&v[j]+v[k]>v[i]&&v[i]+v[k]>v[j])
        cnt++;
	return 0;
 }
        
     cout<<ant<<endl;
        

Compiler output:
a.cc: In function 'int main()':
a.cc:14:15: error: expected primary-expression before '<' token
   14 |   for(int i=0;<t-2;i++)
      |               ^
a.cc:22:12: error: 'ant' was not declared in this scope; did you mean 'cnt'?
   22 |      cout<<ant<<endl;
      |            ^~~
      |            cnt
a.cc:22:22: error: expected '}' at end of input
   22 |      cout<<ant<<endl;
      |                      ^
a.cc:4:1: note: to match this '{'
    4 | {
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;

#define int long long

int32_t main()
{
	ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);

	int n;
	cin>>n;
	int arr[n];
	int count = 0;
	for (int i = 0; i < n; ++i)
	{
		cin>>arr[i];
	}

	if(n < 3){
		return 0;
	}

	for (int i = 0; i < n; ++i)
	{
		for (int j = i+1; j < n; ++j)
		{
			for (int k = j+1; k < n; ++k)
			{
				if(arr[i] + arr[j] >  arr[k] and arr[j] + arr[k] > arr[i] and arr[k] +  arr[a] > arr[j]){
					count++;
				}
			}
		}
	}
	cout<<count;
	return 0;
}

Compiler output:
a.cc: In function 'int32_t main()':
a.cc:29:109: error: 'a' was not declared in this scope
   29 |                                 if(arr[i] + arr[j] >  arr[k] and arr[j] + arr[k] > arr[i] and arr[k] +  arr[a] > arr[j]){
      |                                                                                                             ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int findNumberOfTriangles(int arr[], int n)
{
	int count = 0;
	for (int i = 0; i < n; i++) {

				if (
					arr[i] + arr[j] > arr[k]
					&& arr[i] + arr[k] > arr[j]
					&& arr[k] + arr[j] > arr[i])
					count++;
		}
	}
	return count;
}

// Driver code
int main()
{
	int arr[100] ;
	int size,s ;
	cin>>s;
    size=s;
	for(int i=0;i<s;i++){
        cin>>arr[i];
	}

	cout
		<< "Total number of triangles possible is "
		<< findNumberOfTriangles(arr, size);

	return 0;
}


Compiler output:
a.cc: In function 'int findNumberOfTriangles(int*, int)':
a.cc:9:54: error: 'j' was not declared in this scope
    9 |                                         arr[i] + arr[j] > arr[k]
      |                                                      ^
a.cc:9:63: error: 'k' was not declared in this scope
    9 |                                         arr[i] + arr[j] > arr[k]
      |                                                               ^
a.cc:14:9: warning: no return statement in function returning non-void [-Wreturn-type]
   14 |         }
      |         ^
a.cc: At global scope:
a.cc:15:9: error: expected unqualified-id before 'return'
   15 |         return count;
      |         ^~~~~~
a.cc:16:1: error: expected declaration before '}' token
   16 | }
      | ^
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(a+b>=c && b+c>=a && c+a>=b)
            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:14: error: 'a' was not declared in this scope
   34 |           if(a+b>=c && b+c>=a && c+a>=b)
      |              ^
a.cc:34:16: error: 'b' was not declared in this scope
   34 |           if(a+b>=c && b+c>=a && c+a>=b)
      |                ^
a.cc:34:19: error: 'c' was not declared in this scope
   34 |           if(a+b>=c && b+c>=a && c+a>=b)
      |                   ^
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(a+b>=c && b+c>=a && c+a>=b)
            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:
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
    1 | #include <bits/stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define pb pushback
#define fr(i,n) for(int i=0;i<n;i++)
#define fro(i,j,n) for(int i=j;i<n;i++)
#define ifr(i,n) for(int i=n-1;i>=0;i--)

int main() {
    int n;
	cin >> n;
    int a[n];
    fr(i,n){
      cin >> a[i];
    }
    int ans=0
    fr(i,n){
      fro(j,i+1,n){
        fro(k,j+1,n){
          if(i+j>k && i+k>j && j+k>i)ans++;
        }
      }
    }
  cout<<ans<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:17: error: expected ',' or ';' before 'for'
    5 | #define fr(i,n) for(int i=0;i<n;i++)
      |                 ^~~
a.cc:17:5: note: in expansion of macro 'fr'
   17 |     fr(i,n){
      |     ^~
a.cc:17:8: error: 'i' was not declared in this scope
   17 |     fr(i,n){
      |        ^
a.cc:5:29: note: in definition of macro 'fr'
    5 | #define fr(i,n) for(int i=0;i<n;i++)
      |                             ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define pb pushback
#define fr(i,n) for(int i=0;i<n;i++)
#define fro(i,j,n) for(int i=j;i<n;i++)
#define ifr(i,n) for(int i=n-1;i>=0;i--)

int main() {
    int n;
	cin >> n;
    int a[n];
    fr(i,n){
      cin >> a[i];
    }
    int ans=0
    fr(i,n){
      fro(j,i+1,n){
        fro(k,j+1,n){
          fro(i+j>k && i+k>j && j+k>i)ans++;
        }
      }
    }
  cout<<ans<<endl;
}


Compiler output:
a.cc:20:38: error: macro "fro" requires 3 arguments, but only 1 given
   20 |           fro(i+j>k && i+k>j && j+k>i)ans++;
      |                                      ^
a.cc:6:9: note: macro "fro" defined here
    6 | #define fro(i,j,n) for(int i=j;i<n;i++)
      |         ^~~
a.cc: In function 'int main()':
a.cc:5:17: error: expected ',' or ';' before 'for'
    5 | #define fr(i,n) for(int i=0;i<n;i++)
      |                 ^~~
a.cc:17:5: note: in expansion of macro 'fr'
   17 |     fr(i,n){
      |     ^~
a.cc:17:8: error: 'i' was not declared in this scope
   17 |     fr(i,n){
      |        ^
a.cc:5:29: note: in definition of macro 'fr'
    5 | #define fr(i,n) for(int i=0;i<n;i++)
      |                             ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define pb pushback
#define fr(i,n) for(int i=0;i<n;i++)
#define fro(i,j,n) for(int i=j;i<n;i++)
#define ifr(i,n) for(int i=n-1;i>=0;i--)

int main() {
    int n;
	cin >> n;
    int a[n];
    fr(i,n){
      cin >> a[i];
    }
    int ans=0
    fr(i,n){
      fr(j,i+1,n){
        fr(k,j+1,n){
          if(i+j>k && i+k>j && j+k>i)ans++;
        }
      }
    }
  cout<<ans<<endl;
}


Compiler output:
a.cc:18:17: error: macro "fr" passed 3 arguments, but takes just 2
   18 |       fr(j,i+1,n){
      |                 ^
a.cc:5:9: note: macro "fr" defined here
    5 | #define fr(i,n) for(int i=0;i<n;i++)
      |         ^~
a.cc:19:19: error: macro "fr" passed 3 arguments, but takes just 2
   19 |         fr(k,j+1,n){
      |                   ^
a.cc:5:9: note: macro "fr" defined here
    5 | #define fr(i,n) for(int i=0;i<n;i++)
      |         ^~
a.cc: In function 'int main()':
a.cc:5:17: error: expected ',' or ';' before 'for'
    5 | #define fr(i,n) for(int i=0;i<n;i++)
      |                 ^~~
a.cc:17:5: note: in expansion of macro 'fr'
   17 |     fr(i,n){
      |     ^~
a.cc:17:8: error: 'i' was not declared in this scope
   17 |     fr(i,n){
      |        ^
a.cc:5:29: note: in definition of macro 'fr'
    5 | #define fr(i,n) for(int i=0;i<n;i++)
      |                             ^
Language: C++

#include<bits/stdc++.h>
#include<unordered_set>
#include<unordered_map>
#include <algorithm> 
#include <iostream>
#include <string>
#include <cmath>
using namespace std;
#define ll long long
#define rep(i,n) for (ll i = 0; i < (n); i++)
#define FOR(i,a,b) for(ll i=(a);i<(b);i++)
#define FORR(i,a,b)for(ll i=(a);i<=(b);i++)
#define repR(i,n) for(ll i=n;i>=0;i--)
#define all(v)(v).begin(),(v).end()
#define rall(v)(v).rbegin(),(v).rend()
#define F first
#define S second
#define pb push_back
#define pu push
#define COUT(x) cout<<(x)<<"\n"
#define PQ priority_queue<ll>
#define PQR priority_queue<ll,vector<ll>,greater<ll>>
#define YES(n) cout << ((n) ? "YES\n" : "NO\n"  )
#define Yes(n) cout << ((n) ? "Yes\n" : "No\n"  )
#define mp make_pair
#define sz(x) (ll)(x).size()
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
const ll MOD = 1000000007LL;
const ll INF = 1LL << 60;
using vll = vector<ll>;
using vb = vector<bool>;
using vvb = vector<vb>;
using vvll = vector<vll>;
using vstr = vector<string>;
using vc = vector<char>;
using vvc = vector<vc>;
template<class T> inline bool chmax(T& a, T b) { 
 if (a < b) { a = b; return true; } return false; 
}
template<class T> inline bool chmin(T& a, T b) {
 if (a > b) { a = b; return true; } return false; 
}
ll dx[4]={0,1,0,-1};
ll dy[4]={1,0,-1,0};
int main(){
  lll n;
  cin>>n;
  vll l(n);
  ll ans=0;
  sort(all(l));
  rep(i,n){
    for(int j=i+1;j<n;j++){
      for(int z=j+1;z<n;z++){
        if(l[i]<l[j]&&l[j]<l[z]) ans++;
      }
    }
  }
  COUT(ans);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:47:3: error: 'lll' was not declared in this scope; did you mean 'vll'?
   47 |   lll n;
      |   ^~~
      |   vll
a.cc:48:8: error: 'n' was not declared in this scope; did you mean 'yn'?
   48 |   cin>>n;
      |        ^
      |        yn
Language: C++

#include <iostream>
#include <vector>
#define rep(i,n) for(int i=0;i<(n);i++)//rep(i,回数){処理}
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
	//入力
	int n; cin >> n;
	vector<int> l(n);
	for (int i = 0; i < n; i++) { cin >> l[i]; }
	for (int i = 0; i < n; i++) {
		for (int j = 0; j < n; j++) {
			for (int k = 0; k < n; k++) {
				int len = l[i] + l[j] + l[k];
				int ma = max(l[i], max(l[j], l[k]));
				int rest = len - ma;
				if (ma < rest) { ans = max(ans, len); }
			}
		}
	}
	cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:50: error: 'ans' was not declared in this scope; did you mean 'abs'?
   18 |                                 if (ma < rest) { ans = max(ans, len); }
      |                                                  ^~~
      |                                                  abs
a.cc:22:17: error: 'ans' was not declared in this scope; did you mean 'abs'?
   22 |         cout << ans << endl;
      |                 ^~~
      |                 abs
Language: C++

#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
int t=0,i=0,m=0;
  cin>>t;
  int x[t]=0;
  while(i<t){
    cin>>x[t];
    i++;
  }
  for(int j=0;j<t;j++){
    for(int k=j+1;k<t;k++){
      if(x[j]>x[k]){
        swap(x[j],x[k]);
      }
    }
  }
  
  for(int j=0;j<t;j++){
    for(int k=j+1;k<t;k++){
      for(int l=k+1;l<t;l++){
        if(x[j]<x[k]&&x[k]<x[l])
          m++;
      }
    }
  }
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:12: error: array must be initialized with a brace-enclosed initializer
    8 |   int x[t]=0;
      |            ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

using ll = long long;

int main() {
  int N;  cin >> N;
  vector<ll> L(N);
  for (int i = 0; i < N; ++i) cin >> L[i];
  
  ll ans = 0;
  for (int i = 0; i < N; ++i) {
    for (int j = 0; j < N; ++j) {
      for (int k = 0; k < N; ++k) {
        if (abs(v[i] - v[j]) < v[k] && v[k] < v[i] + v[j])  ++ans;
      }
    }
    
    cout << ans / 6 << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:17: error: 'v' was not declared in this scope
   15 |         if (abs(v[i] - v[j]) < v[k] && v[k] < v[i] + v[j])  ++ans;
      |                 ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, c) for (int i = 0; i < (int)c; i++)
int main() {
    int n;
    scanf("%d", &n);
    vector<int> l(n);
    rep(i, n) scanf("%d", &l[i]);
    if (n >= 3) {
        int count = 0;
        rep(i, n - 2) {
            for (int j = i + 1; j < n - 1; j++) {
                for (int k = j + 1; k < n; k++) {
                    ll a = l[i];
                    ll b = l[j];
                    ll c = l[k];
                    if (a != b && b != c && a != c) {
                        if (a + b > c && b + c > a && c + a > b) count++;
                    }
                }
            }
        }
        printf("%d\n", count);
    } else
        printf("%d\n", 0);
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:21: error: 'll' was not declared in this scope; did you mean 'l'?
   14 |                     ll a = l[i];
      |                     ^~
      |                     l
a.cc:15:23: error: expected ';' before 'b'
   15 |                     ll b = l[j];
      |                       ^~
      |                       ;
a.cc:16:23: error: expected ';' before 'c'
   16 |                     ll c = l[k];
      |                       ^~
      |                       ;
a.cc:17:25: error: 'a' was not declared in this scope
   17 |                     if (a != b && b != c && a != c) {
      |                         ^
a.cc:17:30: error: 'b' was not declared in this scope
   17 |                     if (a != b && b != c && a != c) {
      |                              ^
a.cc:17:40: error: 'c' was not declared in this scope
   17 |                     if (a != b && b != c && a != c) {
      |                                        ^
Language: C++

#include<bits/stdc++.h> 
using namespace std;
int main(){
int n;cin>>n;
  vector<int> arr(n);
  int count=0;
  for(int i=0;i<n;++i)cin>>arr[i];
  for(int i=0;i<n;++i)
    for(int j=i+1;j<n;++j){
      if(arr[i]==arr[j])continue;
      for(int k=j+1;k<n;++k){
			//int maxi=max(arr[i],max(arr[j],arr[k]));
        if(arr[i]==arr[k]||arr[j]==arr[k])continue;	
        vector<int> b;
        b.push_back(arr[i]);
        b.push_back(arr[j]);b.push_back(arr[k]);
        stable_sort(b.begin(),b.end(),greater<int>);
        if(arr[0]>arr[1]+arr[2])++count;
      }
    }
	cout<<count<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:51: error: expected primary-expression before ')' token
   17 |         stable_sort(b.begin(),b.end(),greater<int>);
      |                                                   ^
Language: C++

#include <iostream>
#include <vector>
using namespace std;

int main(void) {
    int n;
    cin >> n;
    vector<int> a(n);
    for (int i = 0; i < n; i++) {
        cin >> a[i];
    }
    if (n < 3) {
        cout << 0 << endl;
        return 0;
    }
    sort(a.begin(), a.end());
    vector<int> b, c;
    int x = a[0];
    b.push_back(x);
    int idx = 0;
    c.push_back(1);
    for (int i = 1; i < n; i++) {
        if (a[i] == x) {
            c[idx]++;
            continue;
        } else {
            b.push_back(a[i]);
            c.push_back(1);
            x = a[i];
            idx++;
        }
    }
    int count = 0;
    for (int i = 0; i < b.size()-2; i++) {
        for (int j = i+1; j < b.size()-1; j++) {
            for (int k = j+1; k < b.size(); k++) {
                if (b[k] < b[i] + b[j]) {
                    count = count + c[i] * c[j] * c[k];
                }
            }
        }
    }
    cout << count  << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   16 |     sort(a.begin(), a.end());
      |     ^~~~
      |     short
Language: C

#include<stdio.h>
void main()
{
  int n,i,j,k,count=0;
  scanf("%d",&n);
  int a[n];
  for(i=0;i<n;i++)
  {
    scanf("%d',&a[i]);
  }
  for(i=0;i<=n-3;i++)
  {
    for(j=i+1;j<=n-2;j++)
    {
      for(k=j+1;k<=n-1;k++)
      {
        if(a[i]!=a[j]&&a[j]!=a[k])
          count++;
      }
    }
  }
          

Compiler output:
main.c: In function 'main':
main.c:9:11: warning: missing terminating " character
    9 |     scanf("%d',&a[i]);
      |           ^
main.c:9:11: error: missing terminating " character
    9 |     scanf("%d',&a[i]);
      |           ^~~~~~~~~~~~
main.c:10:3: error: expected expression before '}' token
   10 |   }
      |   ^
main.c:9:11: error: expected ';' before '}' token
    9 |     scanf("%d',&a[i]);
      |           ^
      |           ;
   10 |   }
      |   ~        
main.c:21:3: error: expected declaration or statement at end of input
   21 |   }
      |   ^
Language: C++

#include <iostream>
#include <vector>
using namespace std;
// int N が既に与えられているとする. 

int main(){
    int N, c;
    c = 0;
    cin >> N;
    vector<int> vec(N);
    for (int i = 0; i < N; i++) {
     cin >> vec.at(i);
    }
    /* 達していない時 */
    if (N < 3) {
        cout << 0 << endl;
        return 0;
    }

    std::sort(vec.begin(), vec.end());
    for (int i = 0; i < N-2; i++) {
        for (int j = i+1; j < N-1; j++) {
            if (vec[i] != vec[j]) {
                for (int k = j+1; k < N; k++) {
                    /* 全要素が異なるかつ足した数が一番大きい辺と等しくなければ三角形 */
                    if (vec[j] != vec[k] && vec[i] + vec[j] != vec[k])  c++;
                }
            }
        }
        
    }
    cout << c << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:10: error: 'sort' is not a member of 'std'; did you mean 'qsort'?
   20 |     std::sort(vec.begin(), vec.end());
      |          ^~~~
      |          qsort