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

#include <iostream>
#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);
  int ans = 0;
  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[i] == 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:10:3: error: 'vector' was not declared in this scope
   10 |   vector<int> l(n);
      |   ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include <iostream>
  +++ |+#include <vector>
    2 | #define rep(i,n) for(int i=0; i<(n); i++)
a.cc:10:10: error: expected primary-expression before 'int'
   10 |   vector<int> l(n);
      |          ^~~
a.cc:12:19: error: 'l' was not declared in this scope
   12 |   rep(i,n) cin >> l[i];
      |                   ^
a.cc:15:10: error: 'l' was not declared in this scope
   15 |       if(l[i] == l[j]) continue;
      |          ^
a.cc:16:10: error: 'l' was not declared in this scope
   16 |       if(l[i] == l[k]) continue;
      |          ^
a.cc:17:10: error: 'l' was not declared in this scope
   17 |       if(l[i] == l[j]) continue;
      |          ^
a.cc:18:14: error: 'l' was not declared in this scope
   18 |       if((ll)l[i]+l[j]+l[k] <= max(l[i],l[j],l[k])*2) continue;
      |              ^
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);
  int ans = 0;
  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[i] == 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:
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 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:18:35:   required from here
   18 |       if((ll)l[i]+l[j]+l[k] <= max(l[i],l[j],l[k])*2) continue;
      |                                ~~~^~~~~~~~~~~~~~~~
/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>
#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);
  int ans = 0;
  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[i] == 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:
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 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:18:35:   required from here
   18 |       if((ll)l[i]+l[j]+l[k] <= max(l[i],l[j],l[k])*2) continue;
      |                                ~~~^~~~~~~~~~~~~~~~
/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>
#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[i] == 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:18:7: error: 'ans' was not declared in this scope; did you mean 'abs'?
   18 |       ans++;
      |       ^~~
      |       abs
a.cc:21:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   21 |   cout << ans << endl;
      |           ^~~
      |           abs
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 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:17:35:   required from here
   17 |       if((ll)l[i]+l[j]+l[k] <= max(l[i],l[j],l[k])*2) continue;
      |                                ~~~^~~~~~~~~~~~~~~~
/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>
#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[i] == 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:18:53: error: expected ';' before 'continue'
   18 |       if((ll)l[i]+l[j]+l[k] <= max(l[i],l[j],l[k])*2 continue;
      |                                                     ^~~~~~~~~
      |                                                     ;
a.cc:19:7: error: 'ans' was not declared in this scope; did you mean 'abs'?
   19 |       ans++;
      |       ^~~
      |       abs
a.cc:19:12: error: expected ')' before ';' token
   19 |       ans++;
      |            ^
      |            )
a.cc:18:9: note: to match this '('
   18 |       if((ll)l[i]+l[j]+l[k] <= max(l[i],l[j],l[k])*2 continue;
      |         ^
a.cc:22:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   22 |   cout << ans << endl;
      |           ^~~
      |           abs
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 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:18:35:   required from here
   18 |       if((ll)l[i]+l[j]+l[k] <= max(l[i],l[j],l[k])*2 continue;
      |                                ~~~^~~~~~~~~~~~~~~~
/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 <stdio.h>

int main(){
    int n;
    scanf("%d",&n);
    int L[n];

    for(int i=0;i<n;i++){
        scanf("%d",&L[i]);
    }

    int count=0;

    for(int i=0;i<n-2;i++){
        for(int f=i+1;f<n-1;f++){
            for(int g=0;g<n;g++){
                if(L[i]!=L[f]&&L[f]!=L[f]g&&L[g]!=L[i]){
                    if(L[i]>L[f]+L[g]){
                        count++;
                    }
                }
            }
        }
    }

    printf("%d",count);
}

Compiler output:
main.c: In function 'main':
main.c:17:42: error: expected ')' before 'g'
   17 |                 if(L[i]!=L[f]&&L[f]!=L[f]g&&L[g]!=L[i]){
      |                   ~                      ^
      |                                          )
Language: C++

#include<bits/stdc++.h>
using namespace std;
	vector<int> v(n);
int main()
{
	int n;
	cin >>n;
	for(int i=0;i<n;++i)
		cin>>v[i];
	auto is=[&](int x,int y,int z)
	{
		return x!=y&&y!=z&&x!=z&&x+y>z&&y+z>x&&x+z>y;
	};
	int ans{0};
	for(int i=0;i+2<n;++i)
	{
		for(int j=i+1;j+1<n;++j)
		{
			for(int k=j+1;k<n;++k)
				ans+=is(v[i],v[j],v[k]);
		}
	}
	cout<<ans<<endl;
	return 0;
}

Compiler output:
a.cc:3:23: error: 'n' was not declared in this scope; did you mean 'yn'?
    3 |         vector<int> v(n);
      |                       ^
      |                       yn
Language: Java

import java.util.*;

public class emne {
    public static Scanner Scan = new Scanner(System.in);

    public static void main(String[] args) {
        int n;
        n = Scan.nextInt();
        int arr[] = new int[n];
        for(int i=0; i<n; i++) arr[i] = Scan.nextInt();

        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(arr[i]==arr[j] || arr[i]==arr[k] || arr[j]==arr[k]) continue;
                    int x = arr[i], y = arr[j], z = arr[k];
                    if(x > y) {x ^= y; y ^= x; x ^= y;}
                    if(x > z) {x ^= z; z ^= x; x ^= z;}
                    if(y > z) {y ^= z; z ^= y; y ^= z;}

                    if(x + y > z) ans++;
                }
            }
        }

        System.out.println(ans);
    }
}

Compiler output:
Main.java:3: error: class emne is public, should be declared in a file named emne.java
public class emne {
       ^
1 error
Language: C++

/*      Welcome to my Code      */

#include <bits/stdc++.h>
#define ll                      long long int
#define i(a,n)                  int a=n;
#define l(a,n)                  ll a=n;
#define d(a,n)                  double a=n;
#define s(a)                    string a;
#define c(a)                    ll a; cin>>a;a
#define cd(a)                   double a; cin>>a;
#define cs(a)                   string a; cin>>a;
#define ci(a)                   cin>>a;
#define co(a)                   cout<<a;
#define cos(a)                  cout<<a<<" ";
#define con(a)                  cout<<a<<endl;
#define yes                     cout<<"YES"<<endl
#define no                      cout<<"NO"<<endl
#define nl                      cout<<endl;
#define ca(arr,n)               for(ll i=0;i<n;i++) cin>>arr[i];
#define caa(arr,n)              c(n); ll arr[n]; for(ll i=0;i<n;i++) cin>>arr[i];
#define f0(i,a,n)               for(ll i=a;i>=n;i--)
#define f(i,n)                  for(ll i=0;i<n;i++)
#define f1(i,a,n)               for(ll i=a;i<n;i++)
#define lcm(a,b)                (a*b)/__gcd(a,b)
#define T                       ll t=1; cin>>t; while(t--)
#define fast                    ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL)
#define ret(x)                  return cout<<x,0;

using namespace std;

int main()
{
    fast;
    caa(a,n);
    l(t,0);
    sort(a,a+n);
    f(i,n) f1(j,i+1,n) f1(k,j+1,n) if((a[i]+a[j])>a[k] && a[i]!=a[j] && a[j]!=a[k]) t++
    con(t);
    return 0;
}

/*It's not who I am underneath, but what I do that defines me

MMMMMMMMMMMMMMMMMMMMM.                             MMMMMMMMMMMMMMMMMMMMM
 `MMMMMMMMMMMMMMMMMMMM           M\  /M           MMMMMMMMMMMMMMMMMMMM'
   `MMMMMMMMMMMMMMMMMMM          MMMMMM          MMMMMMMMMMMMMMMMMMM'
     MMMMMMMMMMMMMMMMMMM-_______MMMMMMMM_______-MMMMMMMMMMMMMMMMMMM
      MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
      MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
      MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
     .MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM.
    MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
                   `MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM'
                          `MMMMMMMMMMMMMMMMMM'
                              `MMMMMMMMMM'
                                 MMMMMM
                                  MMMM
                                   MM
*/


Compiler output:
a.cc: In function 'int main()':
a.cc:37:88: error: expected ';' before 'cout'
   37 |     f(i,n) f1(j,i+1,n) f1(k,j+1,n) if((a[i]+a[j])>a[k] && a[i]!=a[j] && a[j]!=a[k]) t++
      |                                                                                        ^
      |                                                                                        ;
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int) (n); i++)

int main(){
    int ans = 0;
    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((i + j + k) >= max(i, max(j , k)) * 2) ans++;
        }
    }
    cout << ans << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:25: error: no match for call to '(std::vector<int>) (int&)'
   10 |     rep(i, N)   cin >> l(i);
      |                        ~^~~
Language: C++

#include <bits.stdc++/h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int) (n); i++)

int main(){
    int ans = 0;
    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((i + j + k) >= max(i, max(j , k)) * 2) ans++;
        }
    }
    cout << ans << endl;
    return 0;
}

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

#include<stdio.h>

int main(){
  int i,j,k;
  
  int N;
  scanf("%d",&N);
  
  int L[N];
  for(i=0;i<N;i++){
    scanf("%d ",L[i]);
  }
  
  int c=0;
  
  for(i=0;i<N;i++){
    for(j=i+1;j<N;j++){
      for(k=j+1;k<N;k++){
        if(L[i]+L[j]>L[k]&&L[i]+L[K]>L[j]&&L[j]+L[k]>L[i]){
          c++;
        }
      }
    }
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:19:35: error: 'K' undeclared (first use in this function)
   19 |         if(L[i]+L[j]>L[k]&&L[i]+L[K]>L[j]&&L[j]+L[k]>L[i]){
      |                                   ^
main.c:19:35: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(void){
    int N;
    long long L[110]={};
    
    cin >> N;
    for(int i=0;i<N;i++) cin >> L[i];
    
    
    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++){
                long long l_side = max({L[i],L[j],L[k]});
                if(L[i]!=L[j] and L[i]!=L[k] and L[j]!=L[k] and L[i]+L[j]+L[k]>2*l_side) {
                    count++;
                  //  cout << L[i] << L[j] << L[k] << endl;
                }
            }
        }
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:22:6: error: expected '}' at end of input
   22 |     }
      |      ^
a.cc:3:15: note: to match this '{'
    3 | int main(void){
      |               ^
Language: C++

#include<bits/stdc++.h>

#define fi first
#define se second
#define pb push_back
 
#define limit (int) (2e5 + 5) 
#define mod (long long int) (1e9 + 7)
 
using namespace std;
using lli = long long int;
using ulli = unsigned long long int;
using ld = long double;

int l[102];

int main()
{
    ios_base::sync_with_stdio(false);cin.tie(NULL);
    int n;
    cin >> n;

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

    sort(l , l+n);

    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 (a[i]+a[j] > a[k])
                    ans++;
                else
                    break;
            }
        }
    }

    cout << ans;
    return 0;
}














Compiler output:
a.cc: In function 'int main()':
a.cc:38:21: error: 'a' was not declared in this scope
   38 |                 if (a[i]+a[j] > a[k])
      |                     ^
Language: C++

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

struct node {
    int data;
    node* left, *right;
};

struct node* create(int val) {
    struct  node* root = new node;
    root->data = val;
    root -> left = NULL;
    root -> right = NULL;
    return root;
}

int ans, sum;

void preorder(node* root) {
    if(root != NULL) {
        sum += root -> data;
        if(root -> left == NULL && root -> right == NULL) {
            ans = max(ans, sum);
        }
        preorder(root -> left);
        preorder(root -> right);
        sum -= root->data;
    }
}

int f(int x, int y) {
    if(x == 0 || y == 0) {
        return 1;
    }
    return f(x-1, y) + f(x, y-1);
}

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

Compiler output:
a.cc: In function 'int main()':
a.cc:48:20: error: 'a' was not declared in this scope
   48 |                 if(a[i] + a[j] > a[k]) ans++;
      |                    ^
Language: C++

#include <iostream>
#include <vector>

using namespace std;

int main(){
  	int N;
  	cin >> N;
  	vector<long long> L(N);
  	sort(L.begin(), L.end());
    int counter = 0;
  	for(int i=0;i<N;i++){
      	cin >> L[i];
      	for(int j=0;j<i;j++){
          	for(int k=0;k<j;k++){
              	if(L[i] > L[j] + L[k]) counter++;
            }
        }
    }
  	cout << counter << endl;
}

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

#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define all(v) (v).begin(),(v).end()

int main(void)
{
    ll n,cnt=0;
    cin >> n;
    vector<ll> l(n);
    rep(i,n) cin >> l[i];

    sort(all(l));
    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] && l[k]!=l[i]) cnt++;
            }
        }
    }

    cout << cnt << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: 'i' was not declared in this scope
   11 |     rep(i,n) cin >> l[i];
      |         ^
a.cc:11:5: error: 'rep' was not declared in this scope
   11 |     rep(i,n) cin >> l[i];
      |     ^~~
Language: C++

#include<bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < n; ++i)
#define rrep(i, n) for(int i = n-1; i >= 0; --i)
#define fi first
#define se second
using namespace std;
using lint = long long;
using uint = unsigned int;
using ulint = unsigned long long;
using ldouble = long double;
using pii = pair<int, int>;
using pli = pair<lint, lint>;
using pdd = pair<double, double>;
using pld = pair<ldouble, ldouble>;
using v1i = vector<int>;
using v1li = vector<lint>;
using v2i = vector<vector<int>>;
using v2li = vector<vector<lint>>;
using v3i = vector<vector<vector<int>>>;
using v3li = vector<vector<vector<lint>>>;
using v1b = vector<bool>;
using v2b = vector<vector<bool>>;
using v3b = vector<vector<vector<bool>>>;
using v1c = vector<char>;
using v2c = vector<vector<char>>;
using v3c = vector<vector<vector<char>>>;
constexpr lint mod1 = 1e9+7;
constexpr lint mod2 = 998244353;

int main(){
  int n, a = 0, b; cin >> n;
  map<int, int> m; vector<pii> v;
  rep(i, n){
    int in; cin >> in; m[in]++;
  }
  for(pii p: m) v.push_back(p);
  b = v.size();
  rep(i, b-2){
    rep(j, b-i-1){
      rep(k, b-i-j-2){
        if(v[i].fi != v[i+j+1].fi && v[i+j+1].fi != v[i+j+k+2].fi && v[i+j+k+2].fi != v[i].fi] && v[i].fi + v[i+j+1].fi > v[i+j+k+2].fi) a += v[i].se * v[i+j+1].se * v[i+j+k+2].se;
      }
    }
  }
  cout << a << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:41:94: error: expected ')' before ']' token
   41 |         if(v[i].fi != v[i+j+1].fi && v[i+j+1].fi != v[i+j+k+2].fi && v[i+j+k+2].fi != v[i].fi] && v[i].fi + v[i+j+1].fi > v[i+j+k+2].fi) a += v[i].se * v[i+j+1].se * v[i+j+k+2].se;
      |           ~                                                                                  ^
a.cc:41:94: error: expected primary-expression before ']' token
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < (n); i++)
using namespace std;
using ll = long long;

int main(void){
  int n, j, k, ans=0;
  cin >> n;
  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[l]) 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:15:19: error: invalid types 'int [n][int [n]]' for array subscript
   15 |       if(l[k] == l[l]) continue;
      |                   ^
a.cc:17:13: error: expected ';' before '}' token
   17 |       ans ++
      |             ^
      |             ;
   18 |     }
      |     ~
Language: C

#include <stdio.h>
#define rep(i,n) for(int i = 0; i < (n); i++)
using ll = long long;

int main(void){
  int n, i, j, k, ans=0;
  scanf("%d",&n);
  int l[n];
  scanf("%d",l);
  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[l]) 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:
main.c:3:1: error: unknown type name 'using'
    3 | using ll = long long;
      | ^~~~~
main.c:3:12: error: expected expression before 'long'
    3 | using ll = long long;
      |            ^~~~
main.c: In function 'main':
main.c:14:19: error: array subscript is not an integer
   14 |       if(l[k] == l[l]) continue;
      |                   ^
main.c:15:14: error: expected ')' before 'l'
   15 |       if((ll)l[i]+l[j]+l[k] <= max({l[i],l[j],l[k]})*2) continue;
      |         ~    ^
      |              )
main.c:16:13: error: expected ';' before '}' token
   16 |       ans ++
      |             ^
      |             ;
   17 |     }
      |     ~        
main.c:19:3: error: 'cout' undeclared (first use in this function)
   19 |   cout << ans << endl;
      |   ^~~~
main.c:19:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:19:18: error: 'endl' undeclared (first use in this function)
   19 |   cout << ans << endl;
      |                  ^~~~
Language: C++

#import <iostream>
 
int main() {
  int n;
  std::cin >> n;
  
  int data[n] = {};
  for (int i=0; i<n; i++) {
	  std::cin >> data[i];
  }
  
  if (n>3) {
    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++) {
          int a, b, c;
          if (data[i]>data[j] && data[i]>data[k]) {
            a = i;
            if (data[j]>data[k]) {
              b = j;
              c = k;
            } else {
              b = k;
              c = j;
            }
          } else if (data[j]>data[i] && data[j]>data[k]) {
            a = j;
            if (data[i]>data[k]) {
              b = i;
              c = k;
            } else {
              b = k;
              c = i;
            }
          } else {
            a = k;
            if (data[j]>data[i]) {
              b = j;
              c = i;
            } else {
              b = i;
              c = j;
            }
          }
          if (a<b+c) {
            count++;
          }
        }
      }
    }
    std::cout << count << std::endl;
  } else {
    std::cout << 0 << std::endl;
  }

Compiler output:
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
    1 | #import <iostream>
      |  ^~~~~~
a.cc: In function 'int main()':
a.cc:55:4: error: expected '}' at end of input
   55 |   }
      |    ^
a.cc:3:12: note: to match this '{'
    3 | int main() {
      |            ^
Language: C++

#import <iostream>
 
int main() {
  int n;
  std::cin >> n;
  
  int data[n] = {};
  for (int i=0; i<n; i++) {
	  std::cin >> data[i];
  }
  
  if (n>3) {
    int count=0;
    for (int i=0; i<n-2; i++) {
      for (int j=i+1; j<n-1; j++) {
        for (k=j+1; k<n; k++) {
          int a, b, c;
          if (data[i]>data[j] && data[i]>data[k]) {
            a = i;
            if (data[j]>data[k]) {
              b = j;
              c = k;
            } else {
              b = k;
              c = j;
            }
          } else if (data[j]>data[i] && data[j]>data[k]) {
            a = j;
            if (data[i]>data[k]) {
              b = i;
              c = k;
            } else {
              b = k;
              c = i;
            }
          } else {
            a = k;
            if (data[j]>data[i]) {
              b = j;
              c = i;
            } else {
              b = i;
              c = j;
            }
          }
          if (a<b+c) {
            count++;
          }
        }
      }
    }
    std::cout << count << std::endl;
  } else {
    std::cout << 0 << std::endl;
  }

Compiler output:
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
    1 | #import <iostream>
      |  ^~~~~~
a.cc: In function 'int main()':
a.cc:16:14: error: 'k' was not declared in this scope
   16 |         for (k=j+1; k<n; k++) {
      |              ^
a.cc:55:4: error: expected '}' at end of input
   55 |   }
      |    ^
a.cc:3:12: note: to match this '{'
    3 | int main() {
      |            ^
Language: C++

#import <iostram>

int main() {
  int n;
  std::cin >> n;
  
  int data[n] = {};
  for (int i=0; i<n; i++) {
	  std::cin >> data[i];
  }
  
  if (n>3) {
    int count=0;
    for (int i=0; i<n-2; i++) {
      for (int j=i+1; j<n-1; j++) {
        for (k=j+1; k<n; k++) {
          int a, b, c;
          if (data[i]>data[j] && data[i]>data[k]) {
            a = i;
            if (data[j]>data[k]) {
              b = j;
              c = k;
            } else {
              b = k;
              c = j;
            }
          } else if (data[j]>data[i] && data[j]>data[k]) {
            a = j;
            if (data[i]>data[k]) {
              b = i;
              c = k;
            } else {
              b = k;
              c = i;
            }
          } else {
            a = k;
            if (data[j]>data[i]) {
              b = j;
              c = i;
            } else {
              b = i;
              c = j;
            }
          }
          if (a<b+c) {
            count++;
          }
        }
      }
    }
    std::cout << count << std::endl;
  } else {
    std::cout << 0 << std::endl;
  }

Compiler output:
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
    1 | #import <iostram>
      |  ^~~~~~
a.cc:1:9: fatal error: iostram: No such file or directory
    1 | #import <iostram>
      |         ^~~~~~~~~
compilation terminated.
Language: Java

import java.util.*;


public class Main{
	public static boolean is_able_triangle(Integer a, Integer b, Integer c){
		int a_int = a.intValue();
		int b_int = b.intValue();
		int c_int = c.intValue();
		if(a_int == Math.max(a_int, Math.max(b_int, c_int)))
			return (a_int < c_int + b_int);
		if(b_int == Math.max(a_int, Math.max(b_int, c_int)))
			return (b_int < a_int + c_int);
		if(c_int == Math.max(a_int, Math.max(b_int, c_int)))
			return (c_int < a_int + b_int);
	};

	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.nextLine());
		long result = 0;

		HashMap<Integer, Integer> map = new HashMap<Integer, Integer>();

		String inputArray[] = sc.nextLine().split(" ");
		for(int i = 0; i < n; i++){
			int key =  Integer.parseInt(inputArray[i]);
			if(map.get(key) == null){
				map.put(key, 1);
			}
			else{
				map.put(key, map.get(key) + 1);
			}
		}

		Collection<Integer> keysToArray = map.keySet();
		Integer[] length_array = keysToArray.toArray(new Integer[keysToArray.size()]);

		for(int f = 0; f < map.size() - 2; f++){
			for(int s = f+1; s < map.size() - 1; s++){
				for(int t = s+1; t < map.size(); t++){
					if (is_able_triangle(length_array[f], length_array[s], length_array[t])){
						// System.out.println("this is triangle");
						result += map.get(length_array[f]) * map.get(length_array[s]) * map.get(length_array[t]);
						// System.out.println( map.get(length_array[f]) * map.get(length_array[s]) * map.get(length_array[t]));
					}
				}
			}
		}


		// map.keySet().forEach( key->{
		// 		System.out.println(key + " " + map.get(key));
		// 	}
		// );
		System.out.println(result);
	}
}


Compiler output:
Main.java:15: error: missing return statement
	};
	^
1 error
Language: Java

class Main {
  public static void main(String[] args){
            Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        long[] lst = new long[N];
        for(int i = 0; i < N; i++){
            lst[i] = sc.nextInt();
        }
        sc.close();

        int cnt = 0;
        for(int i = 0; i < N -2; i++){
            for(int j = i + 1; j < N -1; j++){
                if( lst[i] == lst[j]){
                    continue;
                }
                for(int k = j + 1; k < N; k++){
                    if( lst[i] == lst[k] || lst[j] == lst[k]){
                        continue;
                    }
                    long c = lst[i] + lst[j] + lst[k];
                    if ( lst[i] * 2 < c && lst[j] * 2 < c && lst[k] * 2 < c ){
                        cnt++;
                    }
                }
            }
        }
        System.out.println(cnt);
  }
}

Compiler output:
Main.java:3: error: cannot find symbol
            Scanner sc = new Scanner(System.in);
            ^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
            Scanner sc = new Scanner(System.in);
                             ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: C++

ll n;
    cin >> n;
    ll a[n], cnt = 0;
    for(ll i = 0; i < n; i++) cin >> a[i];
    for(ll i = 0; i < n; i++) {
        for(ll j = i + 1; j < n; j++) {
            for(ll k = j + 1; k < n; k++) {
                if(a[i] + a[j] > a[k] && a[j] + a[k] > a[i] && a[i] + a[k] > a[j] && a[i] != a[j] && a[j] != a[k] && a[i] != a[k]) cnt++;
            }
        }
    }
    cout << cnt << "\n";

Compiler output:
a.cc:1:1: error: 'll' does not name a type
    1 | ll n;
      | ^~
a.cc:2:5: error: 'cin' does not name a type
    2 |     cin >> n;
      |     ^~~
a.cc:3:5: error: 'll' does not name a type
    3 |     ll a[n], cnt = 0;
      |     ^~
a.cc:4:5: error: expected unqualified-id before 'for'
    4 |     for(ll i = 0; i < n; i++) cin >> a[i];
      |     ^~~
a.cc:4:19: error: 'i' does not name a type
    4 |     for(ll i = 0; i < n; i++) cin >> a[i];
      |                   ^
a.cc:4:26: error: 'i' does not name a type
    4 |     for(ll i = 0; i < n; i++) cin >> a[i];
      |                          ^
a.cc:5:5: error: expected unqualified-id before 'for'
    5 |     for(ll i = 0; i < n; i++) {
      |     ^~~
a.cc:5:19: error: 'i' does not name a type
    5 |     for(ll i = 0; i < n; i++) {
      |                   ^
a.cc:5:26: error: 'i' does not name a type
    5 |     for(ll i = 0; i < n; i++) {
      |                          ^
a.cc:12:5: error: 'cout' does not name a type
   12 |     cout << cnt << "\n";
      |     ^~~~
Language: C++

#include <iostream>
#include <functional>
#include <string>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;

int main()
{
    // input
    int n;
    std::cin >> n;
    vector<int> l(n);

    rep(i, n) cin >> l[i];
    int ans = 0;
    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 (l[i] + l[j] + l[k] <= max({l[i], l[j], l[k]}) * 2) continue;
            ans++;
        }
    }

    std::cout << ans << std::endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:42: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
   21 |             if (l[i] + l[j] + l[k] <= max({l[i], l[j], l[k]}) * 2) continue;
      |                                       ~~~^~~~~~~~~~~~~~~~~~~~
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:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 1 provided
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>;
//vector<int> a(n); rep(i, n)cin >> a[i];
int main() {
	//入力
	int n; cin >> n;
	vector<int> l(n); rep(i, n)cin >> l[i];
	//三重ループで全探索する
	int ans = 0;
	rep(i, n)rep(j, n)rep(k, n){
		if (i < j && j < k) {
			//三角形において２つの辺が同じ値になったら三角形にならないよね
			if (l[i] == l[j])continue;
			if (l[j] == l[k])continue;
			if (l[k] == l[i])continue;
			if (l[i] == l[j]== l[k])continue;
			if ((ll)l[i] + l[j] + l[k] <= max({ l[i],l[j],l[k] }) * 2) continue;
			ans++;
		}
	}
	//答えを出力
	cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:58: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
   21 |                         if ((ll)l[i] + l[j] + l[k] <= max({ l[i],l[j],l[k] }) * 2) continue;
      |                                                       ~~~^~~~~~~~~~~~~~~~~~~~
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:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 1 provided
Language: Java

public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		
	    Scanner s = new Scanner(System.in);
	    
	    int n = s.nextInt();
	    ArrayList<Long> list = new ArrayList<Long>();
	    
	    for(int i = 0; i < n; i++) {
	    	
	    	list.add(s.nextLong());
	    	
	    }
	    
	    Collections.sort(list);
	    
	    int cnt = 0;
	    
	    if(list.size() >= 3) {
	    
	    for(int i = 0; i < list.size()-2; i++) {
	    	
	    	for(int j = i+1; j < list.size()-1; j++) {
	    		
	    		for(int k = j+1; k < list.size(); k++) {
	    			
	    			if((list.get(i) != list.get(j) && list.get(j) != list.get(k) && list.get(i) != list.get(k)) && list.get(i) + list.get(j) > list.get(k))
	    				cnt += 1;
	    			
	    		}
	    		
	    	}
	    	
	    }
	    
	    }
	    
	    System.out.println(cnt);
	    
	}

}

Compiler output:
Main.java:6: error: cannot find symbol
	    Scanner s = new Scanner(System.in);
	    ^
  symbol:   class Scanner
  location: class Main
Main.java:6: error: cannot find symbol
	    Scanner s = new Scanner(System.in);
	                    ^
  symbol:   class Scanner
  location: class Main
Main.java:9: error: cannot find symbol
	    ArrayList<Long> list = new ArrayList<Long>();
	    ^
  symbol:   class ArrayList
  location: class Main
Main.java:9: error: cannot find symbol
	    ArrayList<Long> list = new ArrayList<Long>();
	                               ^
  symbol:   class ArrayList
  location: class Main
Main.java:17: error: cannot find symbol
	    Collections.sort(list);
	    ^
  symbol:   variable Collections
  location: class Main
5 errors
Language: Java

import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;

public class tri {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		
	    Scanner s = new Scanner(System.in);
	    
	    int n = s.nextInt();
	    ArrayList<Long> list = new ArrayList<Long>();
	    
	    for(int i = 0; i < n; i++) {
	    	
	    	list.add(s.nextLong());
	    	
	    }
	    
	    Collections.sort(list);
	    
	    int cnt = 0;
	    
	    for(int i = 0; i < list.size()-2; i++) {
	    	
	    	for(int j = i+1; j < list.size()-1; j++) {
	    		
	    		for(int k = j+1; k < list.size(); k++) {
	    			
	    			if((list.get(i) != list.get(j) && list.get(j) != list.get(k) && list.get(i) != list.get(k)) && list.get(i) + list.get(j) > list.get(k))
	    				cnt += 1;
	    			
	    		}
	    		
	    	}
	    	
	    }
	    
	    System.out.println(cnt);
	    
	}

}

Compiler output:
Main.java:5: error: class tri is public, should be declared in a file named tri.java
public class tri {
       ^
1 error
Language: C++

#include<bits/stdc++.h>
#define fastio ios_base::sync_with_stdio(false);cin.tie(NULL)
using namespace std;

int main()
{
    fastio;
    long long n,i,j,k,sum=0;
    static long long ara[103];
    cin>>n;
    for(i=0;i<n;i++)
        cin>>ara[i];
    for(i=0;i<n-2;i++)
    {
        for(j=i+1;j<n-1;j++)
        {
            if(ara[i]==ara[j])
                continue;
            else
            {
                for(k=j+1;k<n;k++)
                {
                    if(ara[j]==ara[k] || ara[i]==ara[j])
                        continue;
                    else
                    {
                        if(ara[i]+ara[j]>ra[k] && ara[i]+ara[k]>ara[j] && ara[j]+ara[k]>ara[i])
                            sum++;
                    }
                }
            }
        }
    }
    cout<<sum<<endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:27:42: error: 'ra' was not declared in this scope; did you mean 'ara'?
   27 |                         if(ara[i]+ara[j]>ra[k] && ara[i]+ara[k]>ara[j] && ara[j]+ara[k]>ara[i])
      |                                          ^~
      |                                          ara
Language: C++

#include<bits/stdc++.h>
#include<string.h>
#define ll long long 
#include<vector>
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
using namespace std;
const int mod=1e9+7;
int main(){
	IOS;
int n;
cin>>n;
vector<ll> v(n);
for(int i=0;i<n;i++){
	v[i];
}
ll ans=0;
sort(v.begin(), v.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(a[i]+a[j]>=a[k]&&a[i]!=a[j]&&a[j]!=a[k])
			ans++;
		}
	}
}
cout<<ans;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:12: warning: ignoring return value of 'std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](size_type) [with _Tp = long long int; _Alloc = std::allocator<long long int>; reference = long long int&; size_type = long unsigned int]', declared with attribute 'nodiscard' [-Wunused-result]
   14 |         v[i];
      |            ^
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_vector.h:1128:7: note: declared here
 1128 |       operator[](size_type __n) _GLIBCXX_NOEXCEPT
      |       ^~~~~~~~
a.cc:21:28: error: 'a' was not declared in this scope
   21 |                         if(a[i]+a[j]>=a[k]&&a[i]!=a[j]&&a[j]!=a[k])
      |                            ^
Language: C++

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

int main() {
  int n;
   cin >> n;
  vector<int> l(n);
  int ans = 0;
  sort (l.begin(), l.end());
  reverse (l.begin(), l.end());
  
  for (int i = 0; i < n; i++) cin >> i[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(l[i] != l[j] && l[j] != l[k] && l[i] < l[j] + l[k]) ans++;
      }
    }
  }
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:39: error: invalid types 'int[int]' for array subscript
   12 |   for (int i = 0; i < n; i++) cin >> i[i];
      |                                       ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
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; }
#define all(x) (x).begin(),(x).end()
#define pll pair<ll,ll>
#define pii pair<int,int>
#define rep(i,n) for(int i=0;i<n;i++)
#define For(i,a,b) for(int i=a;i<b;i++)
#define sz(x) ((ll)(x).size())
#define pb push_back
#define mp make_pair
#define bit(n) (1LL<<(n))
#define F first
#define S second
#define debug(x) cerr << x << endl
#define Complex complex<double>
int dx[4]={1,0,-1,0};
int dy[4]={0,1,0,-1};
const ll INF = 1LL<<60;
const ll mod = (int)1e9 + 7;

int main() {
    int n;
    cin >> n;
    int l[n];
    rep(i,n)cin >> l[i];
    int cnt=0;
    rep(i,n){
        rep(j,i){
            rep(k,j){
                if(l[i]==l[j] || l[j]==l[r] || l[r]==l[i])continue;
                if(max({l[i],l[j],l[k]})<l[i]+l[j]+l[k]-max({l[i],l[j],l[k]}))cnt++;
            }
        }
    }
    cout << cnt;

    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:33:42: error: 'r' was not declared in this scope
   33 |                 if(l[i]==l[j] || l[j]==l[r] || l[r]==l[i])continue;
      |                                          ^
Language: C++

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

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

#include <bits/stdc++.h>
#define ll long long int
using namespace std;
int main()
{
  int n;
  cin>>n;
  ll a[n];
  map<int, int> freq;
  for(int i=0; i<n; i++)
  {
    cin>>a[i];
    freq[a[i]]++
  }
  sort(a, a+n);
  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(a[i]+a[j]>a[k])
        {
          count+=freq[a[i]]*freq[a[j]]*freq[a[k]];
        }
      }
    }
  }
  cout<<count<<endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:17: error: expected ';' before '}' token
   13 |     freq[a[i]]++
      |                 ^
      |                 ;
   14 |   }
      |   ~
Language: C++

#include <bits/stdc++.h>
#define ll long long int
using namespace std;
int main()
{
  int n;
  cin>>n;
  ll a[n];
  map<int, int> freq;
  for(int i=0; i<n; i++)
  {
    cin>>a[i];
    freq[[a[i]]++
  }
  sort(a, a+n);
  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(a[j]+a[k]>a[i])
        {
          count+=freq[a[i]]*freq[[a[j]]*freq[a[k]];
        }
      }
    }
  }
  cout<<count<<endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:9: error: two consecutive '[' shall only introduce an attribute before '[' token
   13 |     freq[[a[i]]++
      |         ^
a.cc:25:33: error: two consecutive '[' shall only introduce an attribute before '[' token
   25 |           count+=freq[a[i]]*freq[[a[j]]*freq[a[k]];
      |                                 ^
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main()
{
  int N;
  vector <int> L(N);
  for (int i = 0; i < N; i++) cin >> L[i];
  sort(L.begin(), L.end(),
       [](const int&x, const int&y){return x > y;});

  int ans = 0;
  for (int i = 0; i < N-2; i++) {
    int a = L[i];
    for (int j = i+1; j < N-1; j++) {
      int b = L[j];
      if (b >= a) continue;
      for (int k = j+1; k < N; k++) {
        c = L[k];
        if (c < b) ans++;
      }
    }
  }
  cout << ans << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:9: error: 'c' was not declared in this scope
   20 |         c = L[k];
      |         ^
Language: C++

#include <iostream>
using namespace std;
int main(){
  int n, cnt = 0;
  cin >> n;
  vector<long long> stick(n);
  for(int i = 0; i < n; i++) cin >> stick[i];
  sort(stick.begin(), stick.end());
  for(int i = 0 ;i < n; i++){
    for(int j = i + 1; j < n; j++){
      for(int k = j + 1; j < n; k++){
        if(i + j > k) cnt++;
      }
    }
  }
  cout << cnt << "\n";
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'vector' was not declared in this scope
    6 |   vector<long long> stick(n);
      |   ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include <iostream>
  +++ |+#include <vector>
    2 | using namespace std;
a.cc:6:10: error: expected primary-expression before 'long'
    6 |   vector<long long> stick(n);
      |          ^~~~
a.cc:7:37: error: 'stick' was not declared in this scope
    7 |   for(int i = 0; i < n; i++) cin >> stick[i];
      |                                     ^~~~~
a.cc:8:8: error: 'stick' was not declared in this scope
    8 |   sort(stick.begin(), stick.end());
      |        ^~~~~
a.cc:8:3: error: 'sort' was not declared in this scope; did you mean 'short'?
    8 |   sort(stick.begin(), stick.end());
      |   ^~~~
      |   short
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:27: error: expected ')' before ';' token
    8 |  for(int i = 0; i = 0; i<n; i++)
      |     ~                     ^
      |                           )
a.cc:8:29: error: 'i' was not declared in this scope
    8 |  for(int i = 0; i = 0; i<n; i++)
      |                             ^
a.cc:9:21: error: 'j' was not declared in this scope
    9 |    for(int j = i+1; j<n; j++)
      |                     ^
a.cc:10:23: error: 'k' was not declared in this scope
   10 |      for(int k = j+1; k<n; k++){
      |                       ^