criyle/codenet-compile-errors huggingface dataset:
Language: C++

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


template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }

int main(){
    vector<int> arr;
    int N;
    cin >> N;

    for(int i=0; i < N; ++i){
        int tmp;
        cin >> tmp;
        arr.push_back(tmp);
    }

    int ans=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){
                long long f,s,t;
                f = arr[i];
                s = arr[j];
                t = arr[k];

                if(f == s || s == t || f == t){
                    continue;
                }
                else{
                    int max = 0;
                    chmax(max,f);
                    chmax(max,s);
                    chmax(max,t);
                    if((f+s+t)>(2*max)){
                        ++ans;
                    }
                }
            }

        }

    }
    cout << ans << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:39:26: error: no matching function for call to 'chmax(int&, long long int&)'
   39 |                     chmax(max,f);
      |                     ~~~~~^~~~~~~
a.cc:11:31: note: candidate: 'template<class T> bool chmax(T&, T)'
   11 | template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
      |                               ^~~~~
a.cc:11:31: note:   template argument deduction/substitution failed:
a.cc:39:26: note:   deduced conflicting types for parameter 'T' ('int' and 'long long int')
   39 |                     chmax(max,f);
      |                     ~~~~~^~~~~~~
a.cc:40:26: error: no matching function for call to 'chmax(int&, long long int&)'
   40 |                     chmax(max,s);
      |                     ~~~~~^~~~~~~
a.cc:11:31: note: candidate: 'template<class T> bool chmax(T&, T)'
   11 | template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
      |                               ^~~~~
a.cc:11:31: note:   template argument deduction/substitution failed:
a.cc:40:26: note:   deduced conflicting types for parameter 'T' ('int' and 'long long int')
   40 |                     chmax(max,s);
      |                     ~~~~~^~~~~~~
a.cc:41:26: error: no matching function for call to 'chmax(int&, long long int&)'
   41 |                     chmax(max,t);
      |                     ~~~~~^~~~~~~
a.cc:11:31: note: candidate: 'template<class T> bool chmax(T&, T)'
   11 | template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
      |                               ^~~~~
a.cc:11:31: note:   template argument deduction/substitution failed:
a.cc:41:26: note:   deduced conflicting types for parameter 'T' ('int' and 'long long int')
   41 |                     chmax(max,t);
      |                     ~~~~~^~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,a,n) for (int i=a;i<n;i++)
#define per(i,a,n) for (int i=n-1;i>=a;i--)
#define pb push_back
#define mp make_pair
#define all(x) (x).begin(),(x).end()
#define fi first
#define se second
#define sz(x) ((int)(x).size())
typedef vector<int> vi;
typedef long long ll;
typedef pair<int,int> pii;
typedef double db;
const ll mod=1000000007;
ll powmod(ll a,ll b) {ll res=1;a%=mod;assert(b>=0);for(;b;b>>=1){if(b&1)res=res*a%mod;a=a*a%mod;}return res;}
ll gcd(ll a,ll b) { return b?gcd(b,a%b):a;}
// head
int n;
multiset<int>s
int createTriangles(){
	int ret = 0;
	for (int i = 0; i < n; i++){
		//n^2 time 
		ll t;
		cin>>t;
		set.insert(t);
	}
	for(int i = 0; i < values.size(); i++){
		for(int j = i + 1; j < values.size(); j++){
			for(int k = j +1; k < values.size(); k++){
				if(values[i].first+values[j].first>values[k].first){
					int value = values[i].second*values[j].second*values[k].second;
					ret+=value;
				}
				else{
					break;
				}
			}
		}
	}
	cout<<ret;
}
int main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
	cin >>n;
	if (n < 3){
		cout<<0;
		return 0;
	}
	createTriangles();
	return 0;
}	

Compiler output:
a.cc:21:1: error: expected initializer before 'int'
   21 | int createTriangles(){
      | ^~~
a.cc: In function 'int main()':
a.cc:52:9: error: 'createTriangles' was not declared in this scope
   52 |         createTriangles();
      |         ^~~~~~~~~~~~~~~
Language: C++

#include<bits/stc++.h>
using namespace std;
int main(){
  int n;cin>>n;
  int a[n];
  for(int i=0;i<n;i++){
    cin>>a[i];
  }
  int ans = 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[i]+a[k] > a[j] && a[j]+a[k] > a[i])
          ans++;
      }
    }
  }
  cout<<ans<<endl;
  return 0;
}


Compiler output:
a.cc:1:9: fatal error: bits/stc++.h: No such file or directory
    1 | #include<bits/stc++.h>
      |         ^~~~~~~~~~~~~~
compilation terminated.
Language: C

#include<cstdio>
#include<algorithm>
using namespace std;
int main()
{
	int n,l[100];
	int i,j,k,c=0;
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d",&l[i]);
	}
	sort(l,l+n);
	for(i=0;i<n-2;i++){
		for(j=i+1;j<n-1;j++){
			for(k=j+1;k<n;k++){
				if(l[k]<l[i]+l[j]){
					if(l[k]!=l[i]&&l[k]!=l[j]&&l[i]!=l[j]){
					c++;
					}
				}
			}
		}
	}
	printf("%d\n",c);
	return 0;
}

Compiler output:
main.c:1:9: fatal error: cstdio: No such file or directory
    1 | #include<cstdio>
      |         ^~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < n; i++)
using namespace std;
using ll = long long;
using P = pair<int, int>;
 
int main() {
    int n, cnt = 0;
    int tmp;
    vector<int> l(n);
    cin >> n;
    rep(i, n) {
        cin >> tmp;
        l.push_back(tmp);
    }
    for(int i = 0; i < n; i++) {
        for(int = 0; j < n; j++) {
            for(int k = 0; k < n; k++) {
                if((l[i] < l[j] + l[k]) && (l[j] < l[i] + l[k]) &&
                   (l[k] < l[j] + l[i]) && (l[i] != l[j]) && (l[i] != l[k]) &&
                   (l[j] != l[k])) {
                    cnt++;
                    // cout << l[i] << l[j] << l[k] << endl;
                }
            }
        }
    }
 
    cout << cnt << endl;
 
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:17: error: expected unqualified-id before '=' token
   17 |         for(int = 0; j < n; j++) {
      |                 ^
a.cc:17:16: error: expected ';' before '=' token
   17 |         for(int = 0; j < n; j++) {
      |                ^~
      |                ;
a.cc:17:17: error: expected primary-expression before '=' token
   17 |         for(int = 0; j < n; j++) {
      |                 ^
a.cc:17:22: error: 'j' was not declared in this scope
   17 |         for(int = 0; j < n; j++) {
      |                      ^
a.cc:17:27: error: expected ')' before ';' token
   17 |         for(int = 0; j < n; j++) {
      |            ~              ^
      |                           )
a.cc:17:29: error: 'j' was not declared in this scope
   17 |         for(int = 0; j < n; j++) {
      |                             ^
Language: C++

/* Author : Pranav Deshmukh
            PICT,Pune
   Stay Focused!
*/

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

// #pragma GCC target ("avx2")
// #pragma GCC optimization ("O3")
// #pragma GCC optimization ("unroll-loops")

#define int             long long
#define float           double
#define ms(s, n) 		memset(s, n, sizeof(s))
#define dip(type,var)   type var; cin>>var;
#define dipi(x)         int x; cin>>x;
#define dipi2(x,y)      int x,y; cin>>x>>y;
#define w(x)            int x; cin>>x; while(x--)
#define mka(type,arr,n) type *arr=new type[n];
#define fo(i,n)         for(int i=0;i<n;i++)
#define ps(x,y)         fixed<<setprecision(y)<<x
#define mod             1000000007
#define inf             1e18
#define pi              3.141592653589793238
#define endl            "\n"
#define f               first
#define s               second
#define pb              push_back
#define mp              make_pair
#define pii             pair<int,int>
#define vi              vector<int>
#define mii             map<int,int>
#define pqb             priority_queue<int>
#define pqs             priority_queue<int,vi,greater<int> >

// void c_p_c()
// {
// 	ios_base::sync_with_stdio(0);
// 	cin.tie(0);
// 	cin.tie(0);
// #ifndef ONLINE_JUDGE

// 	freopen("input.txt", "r", stdin);
// 	freopen("output.txt", "w", stdout);
// #endif
// }

int32_t main() {
	c_p_c();
	int count = 0;
	dipi(n);
	mka(int, arr, n);
	fo(i, n) {
		cin >> arr[i];
	}
	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 (arr[i] + arr[j] > arr[k] && arr[j] + arr[k] > arr[i] && arr[i] + arr[k] > arr[j] && arr[i] != arr[j] && arr[j] != arr[k] && arr[i] != arr[k]) {
					count++;
				}
			}
		}
	}
	cout << count << endl;
	cerr << "time taken : " << (float)clock() / CLOCKS_PER_SEC << " secs" << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int32_t main()':
a.cc:50:9: error: 'c_p_c' was not declared in this scope
   50 |         c_p_c();
      |         ^~~~~
Language: C++

#include<iostream>
using namespace std;
int main()
{
  int count;
  cin >> count;
  int list[count];
  for(int i=0; i<count; i++) {
    cin >> list[i];
  }
  int resultCount=0;
  sort(list, list+count);
  for(int i=0; i<count; i++) {
    for(int j=i+1; j<count; j++) {
      if(list[i] < list[j]) {
        for(int k=j+1; k<count; k++) {
          if(list[j] < list[k] && (list[i] + list[j]) > list[k]) {
            resultCount++;
          }
        }
      }
    }
  }
  cout << resultCount << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   12 |   sort(list, list+count);
      |   ^~~~
      |   short
Language: C++

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

int main() {
  vector<int> vec(N);
  int N, a;
  int x, y, z;
  cin >> N;
  for (int i = 0; i < N; i++) {
  cin >> vec.at(i);
  }
  a=0;
  if(N <3)
    a=0;
  else{
    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++){
             x=vec.at(i);
            y=vec.at(j);
            z=vec.at(k);
            if(x != y && y!=z && z < x+y)
              a++;
          }
       }
    }
  }
  cout << a << endl;           
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:19: error: 'N' was not declared in this scope
    5 |   vector<int> vec(N);
      |                   ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
bool check(int a,int b,int c){
  if(a+b>c||b+c>a||a+c>b)
    return true;
  else
    return false;
}int main(){
  int n,c=0;
  cin>>n;
  if(n==1||n==2){
    cout<<0;
  }else{
    int arr[n];
    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++){
        for(int k=j+1;k<n;k++){
          if(check(arr[i],arr[j],arr[k])
             c++;
             }
             }
             }cout<<c;
             } return 0;
             }
             

Compiler output:
a.cc: In function 'int main()':
a.cc:20:41: error: expected ';' before 'c'
   20 |           if(check(arr[i],arr[j],arr[k])
      |                                         ^
      |                                         ;
   21 |              c++;
      |              ~                           
a.cc:22:14: error: expected primary-expression before '}' token
   22 |              }
      |              ^
a.cc:21:18: error: expected ')' before '}' token
   21 |              c++;
      |                  ^
      |                  )
   22 |              }
      |              ~    
a.cc:20:13: note: to match this '('
   20 |           if(check(arr[i],arr[j],arr[k])
      |             ^
a.cc:22:14: error: expected primary-expression before '}' token
   22 |              }
      |              ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
bool check(int a,int b,int c){
  if(a+b>c||b+c>a||a+c>b)
    return true;
  else
    return false;
}int main(){
  int n,c=0;
  cin>>n;
  if(n==1||n==2){
    cout<<0;
  }else{
    int arr[n];
    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++){
        for(int k=j+1;k<n;k++){
          if(check(arr[i],arr[j],arr[k])
             c++;
             }
             }
             }cout<<c;
             return 0;
             }
             

Compiler output:
a.cc: In function 'int main()':
a.cc:20:41: error: expected ';' before 'c'
   20 |           if(check(arr[i],arr[j],arr[k])
      |                                         ^
      |                                         ;
   21 |              c++;
      |              ~                           
a.cc:22:14: error: expected primary-expression before '}' token
   22 |              }
      |              ^
a.cc:21:18: error: expected ')' before '}' token
   21 |              c++;
      |                  ^
      |                  )
   22 |              }
      |              ~    
a.cc:20:13: note: to match this '('
   20 |           if(check(arr[i],arr[j],arr[k])
      |             ^
a.cc:22:14: error: expected primary-expression before '}' token
   22 |              }
      |              ^
a.cc:26:15: error: expected '}' at end of input
   26 |              }
      |               ^
a.cc:8:12: note: to match this '{'
    8 | }int main(){
      |            ^
Language: C++

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

int main() {
	int N;
	cin >> N;
	vector<int> a(N);
	for(int i=0;i<N;i++){cin>>a[i];}
	sort(a.begin(),a.end());
 
    int ans = 0;
 
    for (int i = 0; i < N; ++i) {
        for (int j = 0; j < i; ++j) {
            for (int k = 0; k < j; ++k) {
                if (vec[k] != vec[j] and vec[i] != vec[j] and
                    vec[k] + vec[j] > vec[i]) {
                    ans++;
                }
            }
        }
    }
 
    cout << ans << endl;
 
    return 0;
}

}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:21: error: 'vec' was not declared in this scope
   16 |                 if (vec[k] != vec[j] and vec[i] != vec[j] and
      |                     ^~~
a.cc: At global scope:
a.cc:29:1: error: expected declaration before '}' token
   29 | }
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main() {
	int N;
    cin >> N;
	vector<int> a(N);
    for(int i=0;i<N;i++){cin>>a[i];}
    sort(a.begin(),a.end());
    int main() {
    int N;
    cin >> N;
    vector<int> vec(N);
    for (int i = 0; i < N; ++i) cin >> vec[i];
    sort(vec.begin(), vec.end());
 
    int ans = 0;
 
    for (int i = 0; i < N; ++i) {
        for (int j = 0; j < i; ++j) {
            for (int k = 0; k < j; ++k) {
                if (vec[k] != vec[j] and vec[i] != vec[j] and
                    vec[k] + vec[j] > vec[i]) {
                    ans++;
                }
            }
        }
    }
 
    cout << ans << endl;
 
    return 0;
}

}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
    9 |     int main() {
      |             ^~
a.cc:9:13: note: remove parentheses to default-initialize a variable
    9 |     int main() {
      |             ^~
      |             --
a.cc:9:13: note: or replace parentheses with braces to value-initialize a variable
a.cc:9:16: error: a function-definition is not allowed here before '{' token
    9 |     int main() {
      |                ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
	int N;
    cin >> N;
	vector<int> a(N);
    for(int i=0;i<N;i++){cin>>a[i];}
    sort(a.begin(),a.end());
    int main() {
    int N;
    cin >> N;
    vector<int> vec(N);
    for (int i = 0; i < N; ++i) cin >> vec[i];
    sort(vec.begin(), vec.end());
 
    int ans = 0;
 
    for (int i = 0; i < N; ++i) {
        for (int j = 0; j < i; ++j) {
            for (int k = 0; k < j; ++k) {
                if (vec[k] != vec[j] and vec[i] != vec[j] and
                    vec[k] + vec[j] > vec[i]) {
                    ans++;
                }
            }
        }
    }
 
    cout << ans << endl;
 
    return 0;
}

}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
    9 |     int main() {
      |             ^~
a.cc:9:13: note: remove parentheses to default-initialize a variable
    9 |     int main() {
      |             ^~
      |             --
a.cc:9:13: note: or replace parentheses with braces to value-initialize a variable
a.cc:9:16: error: a function-definition is not allowed here before '{' token
    9 |     int main() {
      |                ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
	int N;
    cin >> N;
	vector<int> a(N);
    for(int i=0;i<N;i++){cin>>a[i];}
    sort(a.begin(),a.end());
    int main() {
    int N;
    cin >> N;
    vector<int> vec(N);
    for (int i = 0; i < N; ++i) cin >> vec[i];
    sort(vec.begin(), vec.end());
 
    int ans = 0;
 
    for (int i = 0; i < N; ++i) {
        for (int j = 0; j < i; ++j) {
            for (int k = 0; k < j; ++k) {
                if (vec[k] != vec[j] and vec[i] != vec[j] and
                    vec[k] + vec[j] > vec[i]) {
                    ans++;
                }
            }
        }
    }
 
    cout << ans << endl;
 
    return 0;
}

}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
    9 |     int main() {
      |             ^~
a.cc:9:13: note: remove parentheses to default-initialize a variable
    9 |     int main() {
      |             ^~
      |             --
a.cc:9:13: note: or replace parentheses with braces to value-initialize a variable
a.cc:9:16: error: a function-definition is not allowed here before '{' token
    9 |     int main() {
      |                ^
Language: C++

#include <bits/stdc++.h>

using namespace std;

void test_case(vector <long> v, int n){
	sort(v.begin(),v.end());
	long ans = 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 (v[i] != v[j] && v[j] != v[k] && v[i] != v[k] && (v[k] < v[j] + v[i])a){
					++ans;
				}
			}                                     
		}
	}
	cout << ans;
}

int main(){
	ios::sync_with_stdio(false);
	cin.tie(0);
	int n;
	cin >> n;
	vector <long> v(n);
	for (auto &x : v){
		cin >> x;
	}
	test_case(v,n);	
    return 0;
}





Compiler output:
a.cc: In function 'void test_case(std::vector<long int>, int)':
a.cc:11:105: error: expected ')' before 'a'
   11 |                                 if (v[i] != v[j] && v[j] != v[k] && v[i] != v[k] && (v[k] < v[j] + v[i])a){
      |                                    ~                                                                    ^
      |                                                                                                         )
Language: C++

#include<bits/stdc++.h>
using namespace std;
bool checkidity(int a, int b, int c){
    

    if (a + b <= c || a + c <= b || b + c <= a) 

        return false; 

    else

        return true; 
} 
int main(){
 
    int n,c=0;
    cin>>n;
    int arr[n];
    if(n==1||n==2)
      cout<<1;
    else{
      for(int i=0;i<n;i++){
        cin>>arr[i];
        }
      for(int i=0;i<n;i++){
        for(int j=0;j<n;j++){
          for(int k=j+1;k<n;k++){
            if(arr[i]+arr[j]+arr[k]){
              if(checkidity(arr[i],arr[j],arr[k]))
                c++;
              }
            }
          }
        cout<<c;
        }
  }


Compiler output:
a.cc: In function 'int main()':
a.cc:36:4: error: expected '}' at end of input
   36 |   }
      |    ^
a.cc:14:11: note: to match this '{'
   14 | int main(){
      |           ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
bool checkidity(int a, int b, int c){
    

    if (a + b <= c || a + c <= b || b + c <= a) 

        return false; 

    else

        return true; 
} 
int main(){
 
    int n,c=0;
    cin>>n;
    int arr[n];
    if(n==1||n==2)
      cout<<1;
    else{
      for(int i=0;i<n;i++){
        cin>>arr[i];
        }
      for(int i=0;i<n;i++){
        for(int j=0;j<n;j++){
          for(int k=j+1;k<n;k++){
            if(arr[i]+arr[j]+arr[k]){
              if(checkidity(arr[i],arr[j],arr[k]))
                c++;
              }
            }
          }
        cout<<c;
        }
  

Compiler output:
a.cc: In function 'int main()':
a.cc:35:10: error: expected '}' at end of input
   35 |         }
      |          ^
a.cc:21:9: note: to match this '{'
   21 |     else{
      |         ^
a.cc:35:10: error: expected '}' at end of input
   35 |         }
      |          ^
a.cc:14:11: note: to match this '{'
   14 | int main(){
      |           ^
Language: C++

#include <iostream>
#include <vector>

using namespace std;

int main() {
    int n;
    cin >> n;
    vector<int> v(n);
    for (int i = 0; i < n; ++i) {
        cin >> v[i];
    }
    sort(v.begin(), v.end());

    int count = 0;

    for (int i = 0; i < n; ++i) for (int j = 0; j < i; ++j) for (int k = 0; k < j; ++k) count += v[k] != v[j] && v[i] != v[j] && v[k] + v[j] > v[i];

    cout << count << endl;

    return 0;
}


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

#include <bits/stdc++.h>

using namespace std;

#define intt long long
#define FAST ios_base::sync_with_stdio(0); cin.tie(0);

int n;

int main() {
	
	FAST;
	
	cin >> n;
	vector <int> l(n + 1);
	for (int i = 1; i <= n; i ++) cin >> l[i];
	int ans = 0;
	for (int i = 1; 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[j] != l[k] && l[i] != l[k]) {
					// intt sum = l[i] + l[j] + l[k];
					if (sum > 1LL * 2 * l[i] && sum > 1LL * 2 * l[j] && sum > 1LL * 2 * l[k]) ans ++;
					// if (l[i] + l[j] > l[k] && l[i] + l[k] > l[j] && l[j] + l[k] > l[i]) ans ++;
				}
			}
		}
	}
	cout << ans << '\n';
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:45: error: 'sum' was not declared in this scope
   23 |                                         if (sum > 1LL * 2 * l[i] && sum > 1LL * 2 * l[j] && sum > 1LL * 2 * l[k]) ans ++;
      |                                             ^~~
Language: C

#include <algorithm>　　　 //STL 通用算法
#include <bitset>　　　　　//STL 位集容器
#include <cctype>         //字符处理
#include <cerrno> 　　　　 //定义错误码
#include <cfloat>　　　　 //浮点数处理
#include <ciso646>         //对应各种运算符的宏
#include <climits> 　　　　//定义各种数据类型最值的常量
#include <clocale> 　　　　//定义本地化函数
#include <cmath> 　　　　　//定义数学函数
#include <complex>　　　　 //复数类
#include <csignal>         //信号机制支持
#include <csetjmp>         //异常处理支持
#include <cstdarg>         //不定参数列表支持
#include <cstddef>         //常用常量
#include <cstdio> 　　　　 //定义输入／输出函数
#include <cstdlib> 　　　　//定义杂项函数及内存分配函数
#include <cstring> 　　　　//字符串处理
#include <ctime> 　　　　　//定义关于时间的函数
#include <cwchar> 　　　　 //宽字符处理及输入／输出
#include <cwctype> 　　　　//宽字符分类
#include <deque>　　　　　 //STL 双端队列容器
#include <exception>　　　 //异常处理类
#include <fstream> 　　　 //文件输入／输出
#include <functional>　　　//STL 定义运算函数（代替运算符）
#include <limits> 　　　　 //定义各种数据类型最值常量
#include <list>　　　　　　//STL 线性列表容器
#include <locale>         //本地化特定信息
#include <map>　　　　　　 //STL 映射容器
#include <memory>         //STL通过分配器进行的内存分配
#include<new>            //动态内存分配
#include <numeric>         //STL常用的数字操作
#include <iomanip> 　　　 //参数化输入／输出
#include <ios>　　　　　　 //基本输入／输出支持
#include <iosfwd>　　　　　//输入／输出系统使用的前置声明
#include <iostream> 　　　//数据流输入／输出
#include <istream>　　　　 //基本输入流
#include <iterator>        //STL迭代器
#include <ostream>　　　　 //基本输出流
#include <queue>　　　　　 //STL 队列容器
#include <set>　　　　　　 //STL 集合容器
#include <sstream>　　　　 //基于字符串的流
#include <stack>　　　　　 //STL 堆栈容器
#include <stdexcept>　　　 //标准异常类
#include <streambuf>　　　 //底层输入／输出支持
#include <string>　　　　　//字符串类
#include <typeinfo>        //运行期间类型信息
#include <utility>　　　　 //STL 通用模板类
#include <valarray>        //对包含值的数组的操作
#include <vector>　　　　　//STL 动态数组容器
using namespace std;
int main () {
  int N;
  cin >> N;
  vector <int> l(N);
  for (int i = 0; i < N; i++) cin >> l.at(i);
  int count = 0;
  sort (l.begin(),l.end());
  for (int i = 0; i < N; i++){
    for (int j = 0; j < i; j++){
      for (int k = 0; k < j; k++){
       if ((l.at(k) != l.at(i)) && (l.at(k) != l.at(j))&&(l.at(i) != l.at(j)) && (l.at(i) < l.at(j)+l.at(k))) count ++;
      }
    }
  }
  cout << count << endl;
}


Compiler output:
main.c:1:21: warning: extra tokens at end of #include directive
    1 | #include <algorithm>　　　 //STL 通用算法
      |                     ^~
main.c:1:10: fatal error: algorithm: No such file or directory
    1 | #include <algorithm>　　　 //STL 通用算法
      |          ^~~~~~~~~~~
compilation terminated.
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 >> l.at(i);
  int count = 0;
  sort (l.begin(),l.end());
  for (int i = 0; i < N; i++){
    for (int j = 0; j < i; j++){
      for (int k = 0; k < j; k++){
       if ((l.at(k) != l.at(i)) && (l.at(k) != l.at(j))&&(l.at(i) != l.at(j)) && (l.at(i) < l.at(j)+l.at(k))) count ++;
      }
    }
  }
  cout << count << endl;
}


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<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<iomanip>
#include<math.h>
#include<complex>
#include<queue>
#include<deque>
#include<stack>
#include<map>
#include<set>
#include<bitset>
#include<functional>
#include<assert.h>
#include<numeric>
#include<stdio.h>
#include <cstdint>
#include <stdlib.h> 
#include <time.h>
using namespace std;
#define REP(i,m,n) for(int i=(int)(m) ; i < (int) (n) ; ++i )
#define rep(i,n) REP(i,0,n)
#define rrep(i,n) REP(i,1,n+1)
#define all(a) a.begin(), a.end()
#define fi first
#define se second
#define RNG(x, a, n) &((x)[a]), &((x)[n])
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
typedef long long ll;
typedef pair<ll, ll> Pll;
typedef pair<int, int> PII;
typedef vector<ll> Vl;
typedef vector<int> VI;
typedef tuple<int, int, int> TT;
#define chmin(x,y) x = min(x,y)
#define chmax(x,y) x = max(x,y)
#define rall(v) v.rbegin(), v.rend()
#define dmp(x,y) make_pair(x,y)
#define dmt(x, y, z) make_tuple(x, y, z)
#define pb(x) push_back(x)
#define pf(x) push_front(x)
const int MAX = 500000;
const int inf = 1000000007;
const ll mod = 1000000007;
const ll longinf = 1LL << 60;
const long double PI = (acos(-1));
const long double EPS = 0.0000000001;

int dx[4] = { 1, 0, -1, 0 };
int dy[4] = { 0, 1, 0, -1 };




int n, cnt;
int l[100000];

int main() {

	cin >> n;
	rep(i, n)cin >> l[i];

	rep(i, n){
		REP(j, i + 1, n){
			REP(k, j + 1, n){
				int ma = max( l[i], l[j], l[k] );
				if (ma * 2 < l[i] + l[j] + l[k]){
					cnt++;
				}
			}
		}
	}

	cout << cnt << endl;

	return 0;
}


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 = int; _Compare = int]':
a.cc:68:17:   required from here
   68 |                                 int ma = 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 n;cin>>n;
  int l[n];
  for(int i=0;i<n;i++)
    cin>>l[i];
  int total=0;
  sort(l,l+n);
   for(int i=0;i<n;i++)
   {
      for(int j=i+1;j<nj++)
      {
           for(int k=j+1;k<n;k++)
           {
               if(l[i]+l[j]>l[k])
                 total++;
           }
      }
   }
  cout<<total;
}  

Compiler output:
a.cc: In function 'int main()':
a.cc:13:23: error: 'nj' was not declared in this scope; did you mean 'j'?
   13 |       for(int j=i+1;j<nj++)
      |                       ^~
      |                       j
a.cc:13:27: error: expected ';' before ')' token
   13 |       for(int j=i+1;j<nj++)
      |                           ^
      |                           ;
Language: C

#include<iostream>
#include<bits/stdc++.h>
using namespace std;
int main()
{
   int n,i,j,k,c=0,temp;
   cin>>n;
   int a[n];
   for(i=0;i<n;i++)
   cin>>a[i];
    for(i=0;i<n;i++){
    for(j=i+1;j<n;j++){
        if(a[i]>a[j]){
           temp=a[i];
           a[i]=a[j];
           a[j]=temp;
      }
    }
}
    
   for(i=0;i<n;i++){
      for(j=i+1;j<n;j++){
        for(k=j+1;k<n;k++){ 
           if(a[i]!=a[j] && a[j]!=a[k]){
            if(a[i]+a[j]>a[k])
                c++;
        }
      }
    }
  }
     cout<<c<<endl;
     return 0;
   
}

Compiler output:
main.c:1:9: fatal error: iostream: No such file or directory
    1 | #include<iostream>
      |         ^~~~~~~~~~
compilation terminated.
Language: C

#include<stdio.h>

int main(){
	int n;
	scanf("%d",&n);
	
	int a[n] = {0};
	int i;
	for(i = 0;i < n;i++){
		scanf("%d",&a[i]);
	}	
	
	//使用暴力枚举 
	int result = 0;
	int j,k;
	
	for(i = 0;i < n;i++){
		for(j = i+1;j < n;j++){
			if(a[i] == a[j])
				continue;
			for(k = j+1;k < n;k++){
				if(a[i] == a[k] || a[j] == a[k])
					continue;
				
				if(a[i] + a[j] > a[k] && a[i] + a[k] > a[j] && a[j] + a[k] > a[i])
					result++;
			}
		}
	} 
	
	printf("%d",result);
	 
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:7:20: error: variable-sized object may not be initialized except with an empty initializer
    7 |         int a[n] = {0};
      |                    ^
Language: C++

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

int main(){
    int N;
    cin >> N;
    vector<int> l;
    for(int i = 0; i < N; i++){
        int a; cin >> a;
        l.push_back(a);
    }

    sort(l.begin(), l.end());
    int count = 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]) break;
                if(l[i] + l[j] > l[k]) count++;
            }
        }
    }
    cout << count;
}



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

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

int main(){
    int N;
    cin >> N;
    vector<int> l;
    for(int i = 0; i < N; i++){
        int a; cin >> a;
        l.push_back(a);
    }

    sort(l.begin(), l.end());
    int count = 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]) break;
                if(l[i] + l[j] > l[k]) count++;
            }
        }
    }
    cout << count;
}


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

#include <bits/stdc++.h>
using namespace std;
int main(){
    int n;
    cin>>n;
    vector<int> vec(n);
    for(int i=0;i<n;i++){
        cin>>vec.at(i);
    }
    sort(vec.begin(),vec.end());
    int ans=0;
    for(int i=0;i<n;i++){
        for(int j=0;j<i;j++){
            for(int k=0;k<j;k++){
                if(vec.at(k)!=vec.at(j)&&vec.at(j)!=vec.at(i)&&vec.at(k)+vec.at(j)>vec.at(i)) ans++;
            }
        }

    }
    cout<<ans<<endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:20:21: error: expected '}' at end of input
   20 |     cout<<ans<<endl;
      |                     ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C

// B.

#include <iostream>
#include <sstream>
#include <algorithm>
#include <vector>
#include <map>

using namespace std;

int main(int argc, char *argv[]) {
	int n;
	cin >> n;
	vector<int> a(n);
	for (int i = 0; i < n; ++i) {
		cin >> a[i];
	}
	int ans = 0;
	sort(a.begin(), a.end());
	a.resize(unique(a.begin(), a.end()) - a.begin());
	for (int i = 0; i < n; ++i) {
		for (int j = i + 1; j < n; ++j) {
			for (int k = j + 1; k < n; ++k) {
				ans += a[i] + a[j] >  a[k];
			}
		}
	}
	cout << ans << endl;
	return 0;
}


Compiler output:
main.c:3:10: fatal error: iostream: No such file or directory
    3 | #include <iostream>
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

#include<bits/stdc++.h>

using namespace std;

int main(){
	int n;
	cin>>n;
	int l[n];
	for(int i=0;i<n;i++){
		cin>>l[i];
}
int ans=0;
sort(l,l+n);
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[k])
			count++;
}
}
}
cout<<ans;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:30: error: no post-increment operator for type
   18 |                         count++;
      |                              ^~
Language: C++

#include <bits/stdc++.h>
#define vc vector<int>
#define um unordered_map<int,int>
#define ll long long 
#define rep(i,a,b) for(__typeof(a) i=a; i<b; i++)
#define si(a) a.size()
#define all(a) a.begin(),a.end()
#define ss(a) a.second
#define ff(a) a.first
#define M 1000000
#define pb push_back
#define repit(i,a) for(auto i=a.begin(); i!=a.end(); i++)
#define take(arr,n) for(int i=0;i<n;i++)cin>>arr[i]
#define out(arr,n) for(int i=0;i<n;i++)cout<<arr[i]<<' '
#define yes cout<<"YES"<<endl
#define no cout<<"NO"<<endl
#define reprev(i,b,a) for(__typeof(b) i=b; i>=a; i--)
#define fastio ios_base::sync_with_stdio(false); cin.tie(NULL);cout.tie(NULL)
#define doublearray vector<vector<int>>
#define mod 1000000007
using namespace std;
ll max(ll a, ll b){ return a>b?a:b; }
ll min(ll a, ll b){ return a<b?a:b; }
ll gcd(ll a, ll b){
    if(b==0) return a;
    return gcd(b,a%b);
}
ll lcm(ll a, ll b){
    return (a*b)/gcd(a,b);
}
int main(){
    fastio;
   	int n; cin>>n;
  	take(arr,n);
  	int c=0;
  	sort(all(arr));
  	rep(i,0,n-2){
      rep(j,i+1,n-1){
        rep(k,j+2,n){
          if(arr[i]+arr[j]>arr[k] && arr[i]!=arr[j]) c++;
        }
      }
    }
  cout<<c<<endl;
    return 0;
}





Compiler output:
a.cc: In function 'int main()':
a.cc:34:14: error: 'arr' was not declared in this scope
   34 |         take(arr,n);
      |              ^~~
a.cc:13:46: note: in definition of macro 'take'
   13 | #define take(arr,n) for(int i=0;i<n;i++)cin>>arr[i]
      |                                              ^~~
a.cc:36:18: error: 'arr' was not declared in this scope
   36 |         sort(all(arr));
      |                  ^~~
a.cc:7:16: note: in definition of macro 'all'
    7 | #define all(a) a.begin(),a.end()
      |                ^
Language: C

#include<stdio.h>
int main(void){
  int s[110],n,i,j,k,c,ma,len;
  scanf("%d",&n);
  for(i=0;i<n;i++){scanf("%d",&s[i]);}
  for(i=0;i<n;i++){
    for(j=0;j<i+1;j++){
      if(s[i]!=j[i]){
      for(k=j+1;k<1;k++){
        len=s[i]+s[j]+s[k];
        ma=max(s[i],max(s[j],s[k]));
      if(ma<len-ma){c++;}
      }
      }
    }
  }
  printf("%d",c);
  
 return 0; 
}

Compiler output:
main.c: In function 'main':
main.c:8:17: error: subscripted value is neither array nor pointer nor vector
    8 |       if(s[i]!=j[i]){
      |                 ^
main.c:11:12: error: implicit declaration of function 'max' [-Wimplicit-function-declaration]
   11 |         ma=max(s[i],max(s[j],s[k]));
      |            ^~~
Language: C

#include<stdio.h>
using namespace std;

int main(){
    int N,L[100];
    int j,k,l,ans;
    scanf("%d",&N);
    for(int i=0;i<N;i++)scanf("%d",L[i]);
    for(j=0;j<N-2;j++){
        for(k=j+1;k<N-1;k++){
            for(l=k+1;l<N;l++){
                if(L[j]+L[k]>L[l]&&L[k]+L[l]>L[j]&&L[l]+L[j]>L[k]){
                    ans++;
                }
            }
        }
    }
    printf("%d",ans);

    return 0;
}

Compiler output:
main.c:2:1: error: unknown type name 'using'
    2 | using namespace std;
      | ^~~~~
main.c:2:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'std'
    2 | using namespace std;
      |                 ^~~
Language: C

#include<iostream>
#include<stdio.h>
using namespace std;

int main(){
    int N,L[100];
    int j,k,l,ans;
    cin>>N;
    for(int i=0;i<N;i++)cin>>L[i];
    for(j=0;j<N-2;j++){
        for(k=j+1;k<N-1;k++){
            for(l=k+1;l<N;l++){
                if(L[j]+L[k]<L[l]&&L[k]+L[l]<L[j]&&L[l]+L[j]<L[k]){
                    ans++;
                }
            }
        }
    }
    cout<<ans<<endl;

    return 0;
}

Compiler output:
main.c:1:9: fatal error: iostream: No such file or directory
    1 | #include<iostream>
      |         ^~~~~~~~~~
compilation terminated.
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
    ios_base::sync_with_stdio(0); cin.tie(0);
    int n; cin>>n;
    vi vec;
    for(int i=0;i<n;i++)
    {
        ll x; cin>>x;
        vec.pb(x);
    }
    ll ans =0;
    sort(vec.begin(),vec.end());
    for(int i=0;i<n;i++)
    {
        for(int j=i+1;j<n;j++)
        {
            for(int k=j+1;k<n;k++)
            {
                if(vec[i]<vec[j]&&vec[j]<vec[k])
                {
                    if(vec[k]<vec[i]+vec[j]) ans++;
                }
            }
        }
    }
    cout<<ans<<'\n';
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: 'vi' was not declared in this scope
    7 |     vi vec;
      |     ^~
a.cc:10:9: error: 'll' was not declared in this scope
   10 |         ll x; cin>>x;
      |         ^~
a.cc:10:20: error: 'x' was not declared in this scope
   10 |         ll x; cin>>x;
      |                    ^
a.cc:11:9: error: 'vec' was not declared in this scope
   11 |         vec.pb(x);
      |         ^~~
a.cc:13:5: error: 'll' was not declared in this scope
   13 |     ll ans =0;
      |     ^~
a.cc:14:10: error: 'vec' was not declared in this scope
   14 |     sort(vec.begin(),vec.end());
      |          ^~~
a.cc:23:46: error: 'ans' was not declared in this scope; did you mean 'abs'?
   23 |                     if(vec[k]<vec[i]+vec[j]) ans++;
      |                                              ^~~
      |                                              abs
a.cc:28:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   28 |     cout<<ans<<'\n';
      |           ^~~
      |           abs
Language: C++

#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp> 
#include <ext/pb_ds/tree_policy.hpp> 
#include <chrono> 
using namespace std::chrono;
using namespace std;
typedef long long ll;
using namespace __gnu_pbds;   
#define ordered_set tree<ll, null_type,less<ll>, rb_tree_tag,tree_order_statistics_node_update> 
#define ordered_mset tree<pair<ll,ll>, null_type,less<pair<ll,ll>>, rb_tree_tag,tree_order_statistics_node_update> 
#define fr(i,a,b) for (ll i=(a); i<(b);++i)
#define frr(i,a,b) for(ll i=(a-1);i>=(b);--i)
#define vi vector<ll>
#define vl vector<ll>
#define pb push_back
#define ppb pop_back()
#define pf push_front
#define ppf pop_front()
#define F first
#define S second
#define pii pair<ll,ll> 
#define rev(a) reverse(a.begin(),a.end())
#define srt(a,k) sort(a,a+k,greater<ll>())
#define rsrt(a) sort(a.begin(),a.end(),greater<ll>())
#define sz(a) (ll)a.size()
//#define endl "\n"
#define po(a,b) (ll)(pow(a,b)+0.5)
#define double long double
#define print(a) for(auto x:a)cout<<x<<" ";cout<<endl;
#define setbits(a) __builtin_popcount(a)
const ll M=1e9+7;
const ll MX=1e6+1;

int main()
{  
    //   #ifndef ONLINE_JUDGE
    // freopen("input.txt", "r", stdin);
    // freopen("output.txt", "w", stdout);
    // #endif

  int tt=1;
  //cin>>tt;
  while(tt--)
  {
    int n;
    cin>>n;
    ll a[n];
    fr(i,0,n)cin>>a[i];
  int cnt=0;
    fr(i,0,n)
    {  
       fr(j,i+1,n)
       {
         fr(k,j+1,n)
         {
             vi v;
             v.pb(a[i]);v.pb(a[j]);v.pb(a[k]);
             srt(v);
             if(v[0]+v[1]>v[2])cnt++;
         }
       }
    }
   cout<<cnt;
  }
}



Compiler output:
a.cc:58:19: error: macro "srt" requires 2 arguments, but only 1 given
   58 |              srt(v);
      |                   ^
a.cc:23:9: note: macro "srt" defined here
   23 | #define srt(a,k) sort(a,a+k,greater<ll>())
      |         ^~~
a.cc: In function 'int main()':
a.cc:58:14: error: 'srt' was not declared in this scope
   58 |              srt(v);
      |              ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
bool check(int x,int y,int z)
{
  if(x!=y && x!=z)
    return true;
  return false;
}
int main()
{
	
	
	int n;
	cin>>n;
	int arr[n];
	for(int i=0;i<n;i++)
	{
		cin>>arr[i];
	}
	sort(arr,arr+n);
	int count=0;
	for(int i=0;i<n-2;i++)
	{
		int s=i+1;
		int end=n-1;
		while(s<end && end<n && s<n)
		{
			if(arr[i]+arr[s]>arr[end]  && check(arr[i],arr[end],arr[s])
			{
				count++;
				end--;
			}
			else
			{
				s++;
			}
		}
	}
	cout<<count<<endl;
}




Compiler output:
a.cc: In function 'int main()':
a.cc:28:84: error: expected ')' before '{' token
   28 |                         if(arr[i]+arr[s]>arr[end]  && check(arr[i],arr[end],arr[s])
      |                           ~                                                        ^
      |                                                                                    )
   29 |                         {
      |                         ~                                                           
a.cc:37:17: error: expected primary-expression before '}' token
   37 |                 }
      |                 ^
Language: C++

#include<bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(n);i++)
using namespace std;
using ll = long long;
using P= pair<int,int>;
int main(){
  int n;
  cin >> n;
  vector <int> l(n);
  rep(i,n) cin >> l[i];
  rep(i,n) rep(j,n) rep(k,n){
    if(i<j && j<k){
      if(l[i] == l[j]) continue;
      if(l[i] == l[k]) continue;
      if(l[k] == l[j]) continue;
      if((ll)l[i]+l[j]+l[k] <= max({l[i],l[j],l[k]})*2) continue;
      ans++;
    }
  }
  cout << ans << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:7: error: 'ans' was not declared in this scope; did you mean 'abs'?
   17 |       ans++;
      |       ^~~
      |       abs
a.cc:20:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   20 |   cout << ans << endl;
      |           ^~~
      |           abs
Language: C++

#include<bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(n);i++)
using namespace std;
using ll = long long;
using P= pair<int,int>;
int main(){
  int n;
  cin >> n;
  vector <int> l(n);
  rep(i,n) cin >> l[i];
  rep(i,n) rep(j,n) rep(k,n){
    if(i<j && j<k){
      if(l[i] == l[j]) continue;
      if(l[i] == l[k]) continue;
      if(l[k] == l[j]) continue;
      if((ll)l[i]+l[j]+l[k] <= max({l[i],l[j],l[k]})*) continue;
      ans++;
    }
  }
  cout << ans << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:54: error: expected primary-expression before ')' token
   16 |       if((ll)l[i]+l[j]+l[k] <= max({l[i],l[j],l[k]})*) continue;
      |                                                      ^
a.cc:17:7: error: 'ans' was not declared in this scope; did you mean 'abs'?
   17 |       ans++;
      |       ^~~
      |       abs
a.cc:20:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   20 |   cout << ans << endl;
      |           ^~~
      |           abs
Language: C++

#include<bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(n);i++)
using namespace std;
using ll = long long;
using P= pair<int,int>;
int main(){
  int n;
  cin >> n;
  vector <int> l(n);
  rep(i,n) cin >> l[i];
  rep(i,n) rep(j,n) rep(k,n){
    if(i<j && j<k){
      if(l[i] == l[j]) continue;
      if(l[i] == l[k]) continue;
      if(l[k] == l[j]) continue;
      if((ll)l[i]+l[j]+l[k] <= max({l[i],l[j],l[k]})*) conting;
      ans++;
    }
  }
  cout << ans << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:54: error: expected primary-expression before ')' token
   16 |       if((ll)l[i]+l[j]+l[k] <= max({l[i],l[j],l[k]})*) conting;
      |                                                      ^
a.cc:16:56: error: 'conting' was not declared in this scope
   16 |       if((ll)l[i]+l[j]+l[k] <= max({l[i],l[j],l[k]})*) conting;
      |                                                        ^~~~~~~
a.cc:17:7: error: 'ans' was not declared in this scope; did you mean 'abs'?
   17 |       ans++;
      |       ^~~
      |       abs
a.cc:20:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   20 |   cout << ans << endl;
      |           ^~~
      |           abs
Language: C

#include<stdio.h>
#include<algorithm>
using namespace std;
int main()
{
	int a,i,j,k,cnt=0,x[100];
	scanf("%d",&a);
	for(i=0;i<a;i++){
		scanf("%d",&x[i]);
	}
	sort(x,x+a);
	for(i=0;i<a-2;i++){
		for(j=i+1;j<a-1;j++){
			for(k=j+1;k<a;k++){
				if(x[k]<x[j]+x[i]){
					if(x[i]!=x[j]&&x[i]!=x[k]&&x[j]!=x[k]){
						// printf("i=%d j=%d k=%d\n",x[i],x[j],x[k]);
						cnt++;
					}
				}
			}
		}
	}
	printf("%d\n",cnt);
	return 0;
}

Compiler output:
main.c:2:9: fatal error: algorithm: No such file or directory
    2 | #include<algorithm>
      |         ^~~~~~~~~~~
compilation terminated.
Language: C

#include<stdio.h>
int main(void)
{
	int N,i,j,k,count=0;
	scanf("%d",&N)
	int L[N];
	for(i=0;i<N;i++){
		scanf("%d",L[i]);
	}
	for(i=0;i<N-2;i++){
		for(j=i;j<N-1;j++){
			for(k=j;k<N;k++){
				if(L[i]==L[j] || L[j]==L[k] || L[k]==L[i]){
					continue;
				}
			if(L[i]<L[j]+L[k] || L[j]<L[i]+L[k] || L[k]<L[i]+L[j]){
				count++;
			}
			}
		}
	}
	printf("%d",count);
	return 0;	
		
}

Compiler output:
main.c: In function 'main':
main.c:5:23: error: expected ';' before 'int'
    5 |         scanf("%d",&N)
      |                       ^
      |                       ;
    6 |         int L[N];
      |         ~~~            
main.c:8:28: error: 'L' undeclared (first use in this function)
    8 |                 scanf("%d",L[i]);
      |                            ^
main.c:8:28: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include <iostream>
#include <string>
#include <array>
#include <vector>
#include <deque>
#include <list>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <algorithm>
#include <cstdio>
#include <cstring>
#include <utility>
#include <cstdlib>
#include <cmath>
#define INF 987654321
#define INT_MAX 2147483647
#define MIN(a, b) ((a) < (b) ? a : b)
#define MAX(a, b) ((a) > (b) ? a : b)
 
using namespace std;
 
 

int main() {
    int N;
    cin >> N;

    vector<int> L(N);
    for(int i = 0; i < N; i++) {
        cin >> L[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++) {
                if(L[i] + L[j] > L[K] && (L[i] != L[j]) && (L[j] != L[k])) cnt++;
            }
    cout << cnt;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:39:36: error: 'K' was not declared in this scope
   39 |                 if(L[i] + L[j] > L[K] && (L[i] != L[j]) && (L[j] != L[k])) cnt++;
      |                                    ^
Language: C++

#include <iostream>

using namespace std;

int a[107];

int main(){
  int n; cin >> n;
  for (int i = 0; i < n; i++)
    cin >> a[i];
  int ct = 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 (a[i] + a[j] > a[k] && a[i]+a[k] > a[j] && a[j]+a[k] > a[i])
              ct++
  cout << ct << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:19: error: expected ';' before 'cout'
   16 |               ct++
      |                   ^
      |                   ;
   17 |   cout << ct << endl;
      |   ~~~~