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

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

int main(void){
  int N;
  cin>>N;
  int cnt=0;
  vector<int> L(N,0);
  for(int i=0;i<N;i++){
    cin>>L[i];
  }
  for(int i=0;i<N-2;i++){
    vector<int> L3(3,0);
    L3[0]=L[i];
    for(int j=i+1;j<N-1;j++){
      if(L[i]==L[j])continue;
      L3[1]=L[j];
      for(int k=j+1;k<N;k++){
        if(L[j]==L[k] || L[i]==L[k])continue;
        L3[2]=L[k];
        vector<int> tmp;
        tmp =L3;
        sort(L3.begin(),L3.end());
        //cout<<"("<<i+1<<","<<j+1<<","<<k+1<<")"<<endl;
        if(L3[0]+L3[1]>L3[2]){cnt++;//cout<<L3[0]<<" "<<L3[1]<<" "<<L3[2]<<endl;}
        L3=tmp;
      }
    }
  }
  cout<<cnt<<endl;
  return 0;
}

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

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

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

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

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

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

int main(){
  cin >> N;
  int L[100];
  rep(i, N){
    cin >> L[i];
  }
  int count=0;
  sort(L[0],L[N-1]);
  rep(i, N){
    rep(j-i, N-i){
      if(L[i]!=L[j] && L[j]!=L[i+j]){
        if(L[i]+L[j] > L[i+j]){
          count++;
        }
      }
    }
  }
  cout << count << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:10: error: 'N' was not declared in this scope
    6 |   cin >> N;
      |          ^
a.cc:12:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   12 |   sort(L[0],L[N-1]);
      |   ^~~~
      |   short
a.cc:14:10: error: expected ';' before '-' token
   14 |     rep(j-i, N-i){
      |          ^
a.cc:3:28: note: in definition of macro 'rep'
    3 | #define rep(i, n) for (int i = 0; i < (int)(n); i++)
      |                            ^
a.cc:14:10: error: lvalue required as left operand of assignment
   14 |     rep(j-i, N-i){
      |          ^~
a.cc:3:28: note: in definition of macro 'rep'
    3 | #define rep(i, n) for (int i = 0; i < (int)(n); i++)
      |                            ^
a.cc:3:47: error: expected ')' before ';' token
    3 | #define rep(i, n) for (int i = 0; i < (int)(n); i++)
      |                       ~                       ^
a.cc:14:5: note: in expansion of macro 'rep'
   14 |     rep(j-i, N-i){
      |     ^~~
a.cc:14:9: error: 'j' was not declared in this scope
   14 |     rep(j-i, N-i){
      |         ^
a.cc:3:49: note: in definition of macro 'rep'
    3 | #define rep(i, n) for (int i = 0; i < (int)(n); i++)
      |                                                 ^
Language: C++

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

int main(){
  int N;
  cin >> N;
  vector<int> L(N);
  for(auto& l : L)
    cin >> l;
  int ans = 0;
  for(int i = 0; i < N; ++i){
    for(int j = i+1; j < N; ++j){
      for(int k = j+1; k < N; ++k){
        if(L[i] == L[j] or L[j] == L[k] or L[k] == L[i])
          continue;
        int ll = max({L[i],L[j],L[k]});
        if(ll >= L[i]+L[j]+L[k]-ll)
          continue;
        ++ans;
      }
    }
  }
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:21: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
   17 |         int ll = max({L[i],L[j],L[k]});
      |                  ~~~^~~~~~~~~~~~~~~~~~
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++

#pragma GCC target ("sse4")
#include <bits/stdc++.h>
#include <algorithm>
#define brijesh ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0)
#define pb push_back
#define popb pop_back
#define l1 long long
#define vi vector<int>
#define vl vector<l1>
#define vs vector<string>
using namespace std;
int main() {
    brijesh;
    l1 count = 0;
    int t;
    cin>>t;
    l1 v1[t];
    for(int i=0;i<t;i++)
        cin>>v1[i];
    sort(v1,v1+n);
    for(int i=0;i<t;i++) {
        for (int j = i + 1; j < t; j++) {
           if(v1[i]!=v1[j])
           {
               for(int k=j+1;k<t;k++)
               {
                   if(v1[i]!=v1[k]&&v1[j]!=v1[k]&&v1[i]+v1[j]>=v1[k])
                       count++;
               }
           }
        }
    }
    cout<<count;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:16: error: 'n' was not declared in this scope
   20 |     sort(v1,v1+n);
      |                ^
Language: C++

#include <bits/stdc++.h>
#define ll long long int
using namespace std;
int main()
{
  int n;
  cin>>n;
  ll a[n];
  for(int i=0; i<n; i++)
  {
    cin>>a[i];
  }
  sort(a, a+n);
  int count=0;
  for(int i=n-1; i>=2; i--)
  {
    for(int j=0; j<n; j++)
    {
      for(int k=i-1; k>=0; k--)
      {
        if((A[j]+A[k]>A[i]) && A[j]!=A[k] && A[k]!=A[i] && A[i]!=A[j])
        {
          count++;
        }
      }
    }
  }
  cout<<count<<endl;
  return 0;
}

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

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

int main() {
  int N;
  cin >> N;
  vector<int> L(N);
  for(int i = 0; i < N; i++) cin >> L[i];

  sort(L.begin(), L.end());
  int ans = 0;
  for(int i = 0; i < N - 2; i++) {
    for(int j = i + 1; j < N - 1; j++) {
      int x = L[i] + L[j];
      for(int k = j + 1; k < N; k++) {
        if(x < L[k]) ans++;
      }
    }
  }
  cout << ans << endl;
  
  return 0;
}


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

#pragma GCC target ("sse4")
#include <bits/stdc++.h>
#include <algorithm>
#define brijesh ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0)
#define pb push_back
#define popb pop_back
#define l1 long long
#define vi vector<int>
#define vl vector<l1>
#define vs vector<string>
using namespace std;
int main() {
    brijesh;
    l1 count = 0;
    int t;
    cin>>t;
    l1 v1[t];
    for(int i=0;i<t;i++)
        cin>>v1[i];
    sort(v1.begin(),v1.end());
    for(int i=0;i<t;i++) {
        for (int j = i + 1; j < t; j++) {
           if(v1[i]!=v1[j])
           {
               for(int k=j+1;k<t;k++)
               {
                   if(v1[i]!=v1[k]&&v1[j]!=v1[k]&&v1[i]+v1[j]>=v1[k])
                       count++;
               }
           }
        }
    }
    cout<<count;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:13: error: request for member 'begin' in 'v1', which is of non-class type 'long long int [t]'
   20 |     sort(v1.begin(),v1.end());
      |             ^~~~~
a.cc:20:24: error: request for member 'end' in 'v1', which is of non-class type 'long long int [t]'
   20 |     sort(v1.begin(),v1.end());
      |                        ^~~
Language: C++

#include <iostream>
using namespace std;

int main() {
  int N;
  cin >> N;
  vector<int> L(N);
  for(int i = 0; i < N; i++) cin >> L[i];

  sort(L.begin(), L.end());
  int ans = 0;
  for(int i = 0; i < N - 2; i++) {
    for(int j = i + 1; j < N - 1; j++) {
      int x = L[i] + L[j];
      for(int k = j + 1; k < N; k++) {
        if(x < L[k]) ans++;
      }
    }
  }
  cout << ans << endl;
  
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'vector' was not declared in this scope
    7 |   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 | using namespace std;
a.cc:7:10: error: expected primary-expression before 'int'
    7 |   vector<int> L(N);
      |          ^~~
a.cc:8:37: error: 'L' was not declared in this scope
    8 |   for(int i = 0; i < N; i++) cin >> L[i];
      |                                     ^
a.cc:10:8: error: 'L' was not declared in this scope
   10 |   sort(L.begin(), L.end());
      |        ^
a.cc:10:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   10 |   sort(L.begin(), L.end());
      |   ^~~~
      |   short
Language: C++

#include<iostream>
#include<string>
#include <bits/stdc++.h>
#include<vector>
#include <algorithm>
#include <functional>
#include <cmath>
#include <math.h>
#include <iomanip>
using namespace std;
using ll = long long;

int main(){
  int n,i,j,k;
  ll l[105],count=0;
  cin >>n;
  for(i=1;i<=n;i++){
    cin >> l[i];
  }
  for(i=1;i<=n-2;i++){
    for(j=i+1;j<=n-1;j++){
      for(k=j+1;k<=n;k++){
        if(l[i]!=l[j] && l[j]!=l[k] && l[i]+l[j]>l[k] && l[j]+l[k]>l[i] && l[k]+l[i]>l
        j){
          count++;
        }
      }
    }
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:23:85: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   23 |         if(l[i]!=l[j] && l[j]!=l[k] && l[i]+l[j]>l[k] && l[j]+l[k]>l[i] && l[k]+l[i]>l
      |                                                                            ~~~~~~~~~^~
a.cc:23:87: error: expected ')' before 'j'
   23 |         if(l[i]!=l[j] && l[j]!=l[k] && l[i]+l[j]>l[k] && l[j]+l[k]>l[i] && l[k]+l[i]>l
      |           ~                                                                           ^
      |                                                                                       )
   24 |         j){
      |         ~
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main(){
  int n;
  cin >> n;
  int a[n];
  int count =0;
  for(int i=0;i<n;i++){
  cin >> a[i];
    }
  sort(a.begin(),a.end());
  for(int i=0;i<n;i++){
    for(int j=0;j<n-2;j++){
      if((a[i]+a[i+1])>a[i+j+2]&&a[i]!=a[i+1]&&a[i]!=a[i+j+2]&&a[i+1]!=a[i+j+2]){
        count++;
      }
    }
  }
      
  
  
 
   
   
    cout << count <<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:10: error: request for member 'begin' in 'a', which is of non-class type 'int [n]'
   12 |   sort(a.begin(),a.end());
      |          ^~~~~
a.cc:12:20: error: request for member 'end' in 'a', which is of non-class type 'int [n]'
   12 |   sort(a.begin(),a.end());
      |                    ^~~
a.cc:12:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   12 |   sort(a.begin(),a.end());
      |   ^~~~
      |   short
Language: C++

int n;
int a[MAX_N];

int dp[MAX_N]; // DPテーブル

void solve() {
  int res = 0;
  for (int i = 0; i < n; i++) {
    dp[i] = 1;
    for (int j = 0; j < i; j++) if (a[j] < a[i]) {
      dp[i] = max(dp[i], dp[j] + 1);
    }
    res = max(res, dp[i]);
  }
  printf("%d\n", res);
}

Compiler output:
a.cc:2:7: error: 'MAX_N' was not declared in this scope
    2 | int a[MAX_N];
      |       ^~~~~
a.cc:4:8: error: 'MAX_N' was not declared in this scope
    4 | int dp[MAX_N]; // DPテーブル
      |        ^~~~~
a.cc: In function 'void solve()':
a.cc:9:5: error: 'dp' was not declared in this scope
    9 |     dp[i] = 1;
      |     ^~
a.cc:10:37: error: 'a' was not declared in this scope
   10 |     for (int j = 0; j < i; j++) if (a[j] < a[i]) {
      |                                     ^
a.cc:11:15: error: 'max' was not declared in this scope
   11 |       dp[i] = max(dp[i], dp[j] + 1);
      |               ^~~
a.cc:13:11: error: 'max' was not declared in this scope
   13 |     res = max(res, dp[i]);
      |           ^~~
a.cc:15:3: error: 'printf' was not declared in this scope
   15 |   printf("%d\n", res);
      |   ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int n;
Language: C++

#include <cstdio>
#include<algorithm>
using namespace std;
const int MAX_N = 100;
int main()
{
    int n, a[MAX_N];
    scanf("%d", &n);
    for (int i = 0; i < n; i++)
    {
        scanf("%d", &a[i]);
    }

    int ans = 0; //答え

    //棒を重複して選ばないように、i < j < kとなるようにしている
    for (int i = 0; i < n; i++)
    {
        for (int j = i + 1; j < n; j++)
        {
            for (int k = j + 1; k < n; k++)
            {
                int len = a[i] + a[j] + a[k];
                int ma = max(a[i], max(a[j] + a[k]));
                int rest = len - ma;

                if (ma < rest)
                {
                    //三角形が作れるので、答えを更新できれば更新
                    ans = max(ans, len);
                }
            }
        }
    }
    printf("%d\n", ans);

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:39: error: no matching function for call to 'max(int)'
   24 |                 int ma = max(a[i], max(a[j] + a[k]));
      |                                    ~~~^~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from a.cc:2:
/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
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   template argument deduction/substitution failed:
a.cc:24:39: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   24 |                 int ma = max(a[i], max(a[j] + a[k]));
      |                                    ~~~^~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   candidate expects 2 arguments, 1 provided
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int a[200];
  int i,j,k,cnt,tmp;
  int num =0;

  for(i=0;i<100;i++){
    cin >> a[i];
  }

    /* 数値を昇順にソート */
  for (i=0; i<100; ++i) {
    for (j=i+1; j<100; ++j) {
      if (a[i] > a[j]) {
        tmp =  a[i];
        a[i] = a[j];
        a[j] = tmp;
      }
    }
  }


  for(i=0;i<98;i++){
    for(j=i+1;j<99;j++){
      for(k=j+1;k<100;k++){
        if(a[i] > a[j] && a[k] > a[j]){
          if(a[i] + a[j] > a[k]) num++;
        }
      }
  }

    cout << num;
}


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


//入力
int n, a[MAX_N];
void solve(){
  int ans = 0; //答え

  //棒を重複して選ばないように、i<j<kとなるようにしている。
  for (int i = 0; i < n; i++){
      for(int j = i + 1; j < n; j++){
          for (int k = j+1; k < n; k++){
              int len = a[i] + a[j] + a[k]; //周長
              int ma = max(a[i], max([a[j], a[k]]));//もっとも長い棒の長さ
              int rest = len - ma;

              if (ma < rest){
                  //三角形が作れるので、答えを更新できれば更新
                  ans = max(ans, len);
              }
          }
      }
  }
  //出力
  printf("%d\n", ans);
}

Compiler output:
a.cc:3:10: error: 'MAX_N' was not declared in this scope
    3 | int n, a[MAX_N];
      |          ^~~~~
a.cc: In function 'void solve()':
a.cc:11:25: error: 'a' was not declared in this scope
   11 |               int len = a[i] + a[j] + a[k]; //周長
      |                         ^
a.cc:12:40: error: expected ',' before '[' token
   12 |               int ma = max(a[i], max([a[j], a[k]]));//もっとも長い棒の長さ
      |                                        ^
      |                                        ,
a.cc:12:40: error: expected identifier before '[' token
a.cc:12:43: error: expected ']' before ',' token
   12 |               int ma = max(a[i], max([a[j], a[k]]));//もっとも長い棒の長さ
      |                                           ^
      |                                           ]
a.cc: In lambda function:
a.cc:12:43: error: expected '{' before ',' token
a.cc: In function 'void solve()':
a.cc:17:25: error: 'max' was not declared in this scope; did you mean 'ma'?
   17 |                   ans = max(ans, len);
      |                         ^~~
      |                         ma
a.cc:23:3: error: 'printf' was not declared in this scope
   23 |   printf("%d\n", ans);
      |   ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 |
Language: Java

import java.util.Scanner;

// 提出時にclass Main に書き換え
public class Main {
	public static void main(String[] args)  {
		// 標準入力を受け取る
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt(); // int Nを受け取る

		int[] L = new int[N]; // L[N]を格納する配列

		for (int i = 0; i < N; i++) {
			L[i] = sc.nextInt(); // int L[i]を受け取る
		}
		sc.close(); // 標準入力を終了

		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++) {
					// L[i],L[j],L[k]が全て異なる値かどうか判定
					if(L[i] != L[j] && L[i] != L[k] && L[j] != L[k]) {
                       // 3辺の長さがL[i],L[j],L[k]の三角形があるかどうか判定
						if(Math.abs(L[i] - L[j]) < L[k] && L[k] < L[i] + L[j]) {ans += 1;}
					}
				}
			}
		}
		System.out.println(ans);
	}


Compiler output:
Main.java:31: error: reached end of file while parsing
	}
	 ^
1 error
Language: C++

#include <iostream>
#include <map>
#include <algorithm>
using namespace std;
 
int checkSimilarity(int a, int b, int c)
{
	if((a-b==0)|(b-c==0)|(a-c==0))
       {
         return 0;
       }
    return 1;
}
       
int findTriangles(vector<int> v, int size)
{ 
  int count;
  for(int i=0; i<size; i++)
  {
    for(int j= i+1; j<size; j++)
    {
      for(int k=j+1; k<size; k++)
      {
        if((v.at(i)+v.at(j) > v.at(k)) && (checkSimilarity(v.at(i), v.at(j), v.at(k)))
           {
             count++;
           }
      }
    }
  }
  return count;
}
           
int main()
{
	int size, element;
  	int count = 0;
  	vector<int> v;
  	cin >> size;
  	for(int i = 0; i<size; i++)
    {
      cin >> element;
      v.push_back(element);
    }
  	sort(v.begin(),v.end());
  	findTriangles(v, v.size());
}


Compiler output:
a.cc:15:19: error: 'vector' was not declared in this scope
   15 | int findTriangles(vector<int> v, int size)
      |                   ^~~~~~
a.cc:4:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    3 | #include <algorithm>
  +++ |+#include <vector>
    4 | using namespace std;
a.cc:15:26: error: expected primary-expression before 'int'
   15 | int findTriangles(vector<int> v, int size)
      |                          ^~~
a.cc:15:34: error: expected primary-expression before 'int'
   15 | int findTriangles(vector<int> v, int size)
      |                                  ^~~
a.cc:15:42: error: expression list treated as compound expression in initializer [-fpermissive]
   15 | int findTriangles(vector<int> v, int size)
      |                                          ^
a.cc: In function 'int main()':
a.cc:38:9: error: 'vector' was not declared in this scope
   38 |         vector<int> v;
      |         ^~~~~~
a.cc:38:9: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
a.cc:38:16: error: expected primary-expression before 'int'
   38 |         vector<int> v;
      |                ^~~
a.cc:43:7: error: 'v' was not declared in this scope
   43 |       v.push_back(element);
      |       ^
a.cc:45:14: error: 'v' was not declared in this scope
   45 |         sort(v.begin(),v.end());
      |              ^
a.cc:46:34: error: 'findTriangles' cannot be used as a function
   46 |         findTriangles(v, v.size());
      |                                  ^
Language: C++

//デバッグ用オプション：-fsanitize=undefined,address

//コンパイラ最適化
#pragma GCC optimize("Ofast")

//インクルードなど
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;

//マクロ
//forループ
//引数は、(ループ内変数,動く範囲)か(ループ内変数,始めの数,終わりの数)、のどちらか
//Dがついてないものはループ変数は1ずつインクリメントされ、Dがついてるものはループ変数は1ずつデクリメントされる
//FORAは範囲for文(使いにくかったら消す)
#define REP(i,n) for(ll i=0;i<ll(n);i++)
#define REPD(i,n) for(ll i=n-1;i>=0;i--)
#define FOR(i,a,b) for(ll i=a;i<=ll(b);i++)
#define FORD(i,a,b) for(ll i=a;i>=ll(b);i--)
#define FORA(i,I) for(const auto& i:I)
//xにはvectorなどのコンテナ
#define ALL(x) x.begin(),x.end() 
#define SIZE(x) ll(x.size()) 
//定数
#define INF 1000000000000 //10^12:∞
#define MOD 1000000007 //10^9+7:合同式の法
#define MAXR 100000 //10^5:配列の最大のrange
//略記
#define PB push_back //挿入
#define MP make_pair //pairのコンストラクタ
#define F first //pairの一つ目の要素
#define S second //pairの二つ目の要素

signed main(){
    //入力の高速化用のコード
    //ios::sync_with_stdio(false);
    //cin.tie(nullptr);
  int N=0,d=0,s=0;
  cin >> N;
  vector<int> D;
  for (int i=0; i<N;i++) {
    cin >> d;
    D.push_back(d);
  }
  if(N<3){
    cout << 0;
  else{
    for(int i=0; i<N-1;i++){
      for(int j=i+1;j<N;j++){
        if(D[i]==D[k]){
          break;
        }else{
          for(int k=j+1;k<N+1;k++){
            if(D[k]==D[i]　||　D[k]==D[j]){
              break;
            }else{
              s++;
            }
          }
        }
      }
    }
    cout << s;
}

Compiler output:
a.cc:54:26: error: extended character 　 is not valid in an identifier
   54 |             if(D[k]==D[i]　||　D[k]==D[j]){
      |                          ^
a.cc:54:30: error: extended character 　 is not valid in an identifier
   54 |             if(D[k]==D[i]　||　D[k]==D[j]){
      |                              ^
a.cc: In function 'int main()':
a.cc:47:3: error: expected '}' before 'else'
   47 |   else{
      |   ^~~~
a.cc:45:10: note: to match this '{'
   45 |   if(N<3){
      |          ^
a.cc:50:20: error: 'k' was not declared in this scope
   50 |         if(D[i]==D[k]){
      |                    ^
a.cc:54:26: error: expected ')' before '\U00003000'
   54 |             if(D[k]==D[i]　||　D[k]==D[j]){
      |               ~          ^~
      |                          )
a.cc:64:2: error: expected '}' at end of input
   64 | }
      |  ^
a.cc:34:14: note: to match this '{'
   34 | signed main(){
      |              ^
Language: C++

#include<iostream>
using namespace std;
int count =0;
int main(){
  cin << N;
  vector<int> L(N);
  for (int i=0; i<N;i++){
    cin << L.at(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[k]) && (L[k]+L[j]>L[i]) && (L[i]+L[k]>L[j])){
          count +=1;
        }
      }
    }     
  }  
  cout << count <<endl;
}
            
  


Compiler output:
a.cc: In function 'int main()':
a.cc:5:10: error: 'N' was not declared in this scope
    5 |   cin << N;
      |          ^
a.cc:6:3: error: 'vector' was not declared in this scope
    6 |   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 | using namespace std;
a.cc:6:10: error: expected primary-expression before 'int'
    6 |   vector<int> L(N);
      |          ^~~
a.cc:8:12: error: 'L' was not declared in this scope
    8 |     cin << L.at(i);
      |            ^
a.cc:13:14: error: 'L' was not declared in this scope
   13 |         if ((L[i]+L[j]>L[k]) && (L[k]+L[j]>L[i]) && (L[i]+L[k]>L[j])){
      |              ^
Language: Java

import java.util.*;
public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        // 整数の入力
        int N = sc.nextInt();

        int [] Li =new int[101];
		for(int i=0;i<N;i++){
        	Li[i] = sc.nextInt();
        }
		
        
        int [] Lii =new int[101];
		for(int i=0;i<N;i++){
        	Lii[i] = Li[i]*Li[i];
        }
        
		int step;
        step=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(Lii[i]+Lii[j]=Lii[k] || Lii[i]+Lii[j]=Lii[k] ||Lii[i]+Lii[j]=Lii[k]){
                      step=step+1;
                    }
        		}
        	}
        }        
      
        // 出力
        System.out.println(step);
    }
}

Compiler output:
Main.java:25: error: unexpected type
                	if(Lii[i]+Lii[j]=Lii[k] || Lii[i]+Lii[j]=Lii[k] ||Lii[i]+Lii[j]=Lii[k]){
                	         ^
  required: variable
  found:    value
Main.java:25: error: bad operand types for binary operator '||'
                	if(Lii[i]+Lii[j]=Lii[k] || Lii[i]+Lii[j]=Lii[k] ||Lii[i]+Lii[j]=Lii[k]){
                	                        ^
  first type:  int
  second type: int
Main.java:25: error: bad operand types for binary operator '||'
                	if(Lii[i]+Lii[j]=Lii[k] || Lii[i]+Lii[j]=Lii[k] ||Lii[i]+Lii[j]=Lii[k]){
                	                                                ^
  first type:  int
  second type: int
3 errors
Language: C

#include <stdio.h>

int sankakukei(int a[]);
void swap3(int a, int b, int c);

int main(void){
  int i, j, k, max;
  int array[max];
  int num;

  scanf("%d", &max);
  for(int a = 0; a < max; a++){
    scanf("%d", &array[a]);
  }

  if(max < 3) num = 0;
  else num = sankakukei(array, max);

  printf("%d", num);

  return 0;
}

int sankakukei(int a[], int max){
  int i, j, k;
  int num;
  for(i = 0; i < max - 2; i++){
    for(j = i + 1; j < max - 1; j++){
      for(k = j + 1; k < max; k++){
        swap3(a[i], a[j], a[k]);
        if(a[i] < a[j] + a[k]) num++;
      }
    }
  }
  return num;
}
void swap3(int a, int b, int c){
  int n;
  if(a < b){n = a; a = b; b = n}
  if(a < c){n = a; a = c; c = n}
}

Compiler output:
main.c: In function 'main':
main.c:17:14: error: too many arguments to function 'sankakukei'
   17 |   else num = sankakukei(array, max);
      |              ^~~~~~~~~~
main.c:3:5: note: declared here
    3 | int sankakukei(int a[]);
      |     ^~~~~~~~~~
main.c: At top level:
main.c:24:5: error: conflicting types for 'sankakukei'; have 'int(int *, int)'
   24 | int sankakukei(int a[], int max){
      |     ^~~~~~~~~~
main.c:3:5: note: previous declaration of 'sankakukei' with type 'int(int *)'
    3 | int sankakukei(int a[]);
      |     ^~~~~~~~~~
main.c: In function 'swap3':
main.c:39:32: error: expected ';' before '}' token
   39 |   if(a < b){n = a; a = b; b = n}
      |                                ^
      |                                ;
main.c:40:32: error: expected ';' before '}' token
   40 |   if(a < c){n = a; a = c; c = n}
      |                                ^
      |                                ;
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
int a;
  cin>>a;
  int b[a],sum=0;
  for(int i=0;i<a;i++)cin>>b[i];
  for(int i=0;i<a-2;i++){
  for(int j=i+1;j<a-1;j++){
  for(int k=j+1;k<a;k++){
  if(b[i]+b[j]>b[k])sum++;
  
  }
    
    }
  }


cout<<sum;
retun 0;}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:1: error: 'retun' was not declared in this scope
   20 | retun 0;}
      | ^~~~~
Language: C++

#include <iostream>
#include <map>
#include <algorithm>
using namespace std;
 
int checkSimilarity(int a, int b, int c)
{
	if((a-b==0)|(b-c==0)|(a-c==0))
       {
         return 1;
       }
    return 0;
}
       
int findTriangles(vector<int> v, int size)
{ 
  int count;
  for(int i=0; i<size; i++)
  {
    for(int j= i+1; j<size; j++)
    {
      for(int k=j+1; k<size; k++)
      {
        
           
         if((v.at(i)+v.at(j) > v.at(k)) && (checkSimilarity(v.at(i), v.at(j), v.at(k)))
           {
             count++;
           }
      }
    }
  }
  return count;
}
           
int main()
{
	int size, element;
  	int count = 0;
  	vector<int> v;
  	cin >> size;
  	for(int i = 0; i<size; i++)
    {
      cin >> element;
      v.push_back(element);
    }
  	sort(v.begin(),v.end());
  	findTriangles(v, v.size());
}


Compiler output:
a.cc:15:19: error: 'vector' was not declared in this scope
   15 | int findTriangles(vector<int> v, int size)
      |                   ^~~~~~
a.cc:4:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    3 | #include <algorithm>
  +++ |+#include <vector>
    4 | using namespace std;
a.cc:15:26: error: expected primary-expression before 'int'
   15 | int findTriangles(vector<int> v, int size)
      |                          ^~~
a.cc:15:34: error: expected primary-expression before 'int'
   15 | int findTriangles(vector<int> v, int size)
      |                                  ^~~
a.cc:15:42: error: expression list treated as compound expression in initializer [-fpermissive]
   15 | int findTriangles(vector<int> v, int size)
      |                                          ^
a.cc: In function 'int main()':
a.cc:40:9: error: 'vector' was not declared in this scope
   40 |         vector<int> v;
      |         ^~~~~~
a.cc:40:9: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
a.cc:40:16: error: expected primary-expression before 'int'
   40 |         vector<int> v;
      |                ^~~
a.cc:45:7: error: 'v' was not declared in this scope
   45 |       v.push_back(element);
      |       ^
a.cc:47:14: error: 'v' was not declared in this scope
   47 |         sort(v.begin(),v.end());
      |              ^
a.cc:48:34: error: 'findTriangles' cannot be used as a function
   48 |         findTriangles(v, v.size());
      |                                  ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
     
  int main(){
    int N;
    int c=0;
    cin >> N;
    vector<long long> L(N);
    for (int i=0; i<N; i++){
      cin >> L[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((L[i]==L[j] || L[j]==L[k]) || L[k]==L[i]){
            break
          }
          if((L[i]<L[j]+L[k] || L[j]<L[i]+L[k]) || L[k]<L[i]+L[j]){
            c++;
          }
          
    cout << c;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:18: error: expected ';' before '}' token
   16 |             break
      |                  ^
      |                  ;
   17 |           }
      |           ~       
a.cc:23:2: error: expected '}' at end of input
   23 | }
      |  ^
a.cc:13:34: note: to match this '{'
   13 |       for (int j=i+1; j<N-1; j++){
      |                                  ^
a.cc:23:2: error: expected '}' at end of input
   23 | }
      |  ^
a.cc:12:30: note: to match this '{'
   12 |     for (int i=0; i<N-2; i++){
      |                              ^
a.cc:23:2: error: expected '}' at end of input
   23 | }
      |  ^
a.cc:4:13: note: to match this '{'
    4 |   int main(){
      |             ^
Language: C

#include <bits/stdc++.h>
using namespace std;
     
  int main(){
    int N;
    int c=0;
    cin >> N;
    vector<long long> L(N);
    for (int i=0; i<N; i++){
      cin >> L[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((L[i]==L[j] || L[j]==L[k]) || L[k]==L[i]){
            break
          }
          if((L[i]<L[j]+L[k] || L[j]<L[i]+L[k]) || L[k]<L[i]+L[j]){
            c++;
          }
          
    cout << c;
}


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

#include <bits/stdc++.h>
using namespace std;
     
  int main(){
    int N;
    int c=0;
    cin >> N;
    vector<long long> L(N);
    for (int i=0; i<N; i++){
      cin >> L[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((L[i]==L[j] || L[j]==L[k]) || L[k]==L[i]){
            break
          }
          if((L[i]<L[j]+L[k] || L[j]<L[i]+L[k]) || L[k]<L[i]+L[j]){
            c++;
          }
          
    cout << c;
}

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<bits/stdc++.h>
using namespace std;


int main() {
    int n, x;
    //cin>>n;
    vector<int>l;
    vector<int>l;
    map<int, int>m;
    for(int i=0; i<n; i++)
    {
        cin>>x;
        if(m.find(x) != m.end())
            m[x]++;
        else
        {
            m[x]=1;
            l.push_back(x);
        }
    }
    int ans = 0;
    sort(l.begin(), l.end());
    for(int i=0; i<l.size(); i++)
    {
        for(int j=i+1; j<l.size(); j++)
        {
            for(int k=j+1; k<l.size(); k++)
            {
                if(l[i]+l[j]>l[k] )
                    ans+=(m[l[i]]*m[l[j]]*m[l[k]]);
            }
        }
    }
    cout<<ans;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:16: error: redeclaration of 'std::vector<int> l'
   10 |     vector<int>l;
      |                ^
a.cc:9:16: note: 'std::vector<int> l' previously declared here
    9 |     vector<int>l;
      |                ^
Language: C++

#include <iostream>
#include <map>
#include <algorithm>
using namespace std;
 
int checkSimilarity(int a, int b, int c)
{
	if((a-b==0)|(b-c==0)|(a-c==0))
       {
         return 1;
       }
    return 0;
}
       
int findTriagnles(vector<int> v, int size)
{ 
  int count;
  for(int i=0; i<size; i++)
  {
    for(int j= i+1; j<size; j++)
    {
      for(int k=j+1; k<size; k++)
      {
        if(checkSimilarity(v.at(i), v.at(j), v.at(k)))
           { continue;
           }
         if(v.at(i)+v.at(j) > v.at(k))
           {
             count++;
           }
      }
    }
  }
  return count;
}
           
int main()
{
	int size, element;
  	int count = 0;
  	vector<int> v;
  	cin >> size;
  	for(int i = 0; i<size; i++)
    {
      cin >> element;
      v.push_back(element);
    }
  	sort(v.begin(),v.end());
  	findTriangles(v, v.size());
}


Compiler output:
a.cc:15:19: error: 'vector' was not declared in this scope
   15 | int findTriagnles(vector<int> v, int size)
      |                   ^~~~~~
a.cc:4:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    3 | #include <algorithm>
  +++ |+#include <vector>
    4 | using namespace std;
a.cc:15:26: error: expected primary-expression before 'int'
   15 | int findTriagnles(vector<int> v, int size)
      |                          ^~~
a.cc:15:34: error: expected primary-expression before 'int'
   15 | int findTriagnles(vector<int> v, int size)
      |                                  ^~~
a.cc:15:42: error: expression list treated as compound expression in initializer [-fpermissive]
   15 | int findTriagnles(vector<int> v, int size)
      |                                          ^
a.cc: In function 'int main()':
a.cc:41:9: error: 'vector' was not declared in this scope
   41 |         vector<int> v;
      |         ^~~~~~
a.cc:41:9: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
a.cc:41:16: error: expected primary-expression before 'int'
   41 |         vector<int> v;
      |                ^~~
a.cc:46:7: error: 'v' was not declared in this scope
   46 |       v.push_back(element);
      |       ^
a.cc:48:14: error: 'v' was not declared in this scope
   48 |         sort(v.begin(),v.end());
      |              ^
a.cc:49:9: error: 'findTriangles' was not declared in this scope; did you mean 'findTriagnles'?
   49 |         findTriangles(v, v.size());
      |         ^~~~~~~~~~~~~
      |         findTriagnles
Language: C++

#include <iostream>
#include <map>
#include <algorithm>
using namespace std;
 
int checkSimilarity(int a, int b, int c)
{
	if((a-b==0)|(b-c==0)|(a-c==0))
       {
         return 1;
       }
    return 0;
}
       
int findTriagnles(vector<int> v, int size)
{ 
  int count;
  for(int i=0; i<size; i++)
  {
    for(int j= i+1; j<size; j++)
    {
      for(int k=j+1; k<size; k++)
      {
        if(checkSimilarity(v.at(i), v.at(j), v.at(k)) 
           { continue;
           }
         if(v.at(i)+v.at(j) > v.at(k))
           {
             count++;
           }
      }
    }
  }
  return count;
}
           
int main()
{
	int size, element;
  	int count = 0;
  	vector<int> v;
  	cin >> size;
  	for(int i = 0; i<size; i++)
    {
      cin >> element;
      v.push_back(element);
    }
  	sort(v.begin(),v.end());
  	findTriangles(v, v.size());
}


Compiler output:
a.cc:15:19: error: 'vector' was not declared in this scope
   15 | int findTriagnles(vector<int> v, int size)
      |                   ^~~~~~
a.cc:4:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    3 | #include <algorithm>
  +++ |+#include <vector>
    4 | using namespace std;
a.cc:15:26: error: expected primary-expression before 'int'
   15 | int findTriagnles(vector<int> v, int size)
      |                          ^~~
a.cc:15:34: error: expected primary-expression before 'int'
   15 | int findTriagnles(vector<int> v, int size)
      |                                  ^~~
a.cc:15:42: error: expression list treated as compound expression in initializer [-fpermissive]
   15 | int findTriagnles(vector<int> v, int size)
      |                                          ^
a.cc: In function 'int main()':
a.cc:41:9: error: 'vector' was not declared in this scope
   41 |         vector<int> v;
      |         ^~~~~~
a.cc:41:9: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
a.cc:41:16: error: expected primary-expression before 'int'
   41 |         vector<int> v;
      |                ^~~
a.cc:46:7: error: 'v' was not declared in this scope
   46 |       v.push_back(element);
      |       ^
a.cc:48:14: error: 'v' was not declared in this scope
   48 |         sort(v.begin(),v.end());
      |              ^
a.cc:49:9: error: 'findTriangles' was not declared in this scope; did you mean 'findTriagnles'?
   49 |         findTriangles(v, v.size());
      |         ^~~~~~~~~~~~~
      |         findTriagnles
Language: C++

#include<stdio.h>
#include<iostream>
#include<math.h>
#include<string>
#include<vector>
#include<map>
#include<queue>
#include<cmath>
using namespace std;
using ll = long long int;
 
typedef pair<int,int> P;
 
int main(void){
 int N;
 cin >>N;
 vector<int> L(N);
 for(int a=0;a<N;a++){
     cin >> L[a];
 }
    sort(L.begin(),L.end());
    ll ans=0;
    int a,b,nagasa;
    for(int k=0;k<N;k++){
        for(int m=k+1;m<N;m++){
            nagasa=L[k]+L[m];
            int c = m+1;
            if(c==N)break;
            while(nagasa>L[c]){
                //if(nagasa)
                if(L[k]==L[m]||L[k]==L[c]||L[m]==L[c]){
                    c++;
                }else{
                    ans++;c++;
                }
                if(c==N)break;
            }
        }
    }
    cout << ans<<endl;;

}

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

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

int main() {
  int N;
  cin >> N;
  if (N < 3) {
    cout << 0 << endl;
  }
  else {
    vector<int> L(N);
    int ans = 0;
    for (int i = 0; i < N; i++) {
      cin >> L.at(i);
    }
    sort(L.begin(), L.end());
    for (int i = 0; i < (N - 2); i++) {
      for (int j = i + 1; j < (N - 1); j++) {
        if (L.at(i) == L.at(j)) {
          break;
        }
        for (int k = i + 2); k < N; k++) {
          if (L.at(j) == L.at(k)) {
            break;
          }
          ans++;
        }
      }
    }
    cout << ans << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:27: error: expected ';' before ')' token
   22 |         for (int k = i + 2); k < N; k++) {
      |                           ^
      |                           ;
a.cc:22:27: error: expected primary-expression before ')' token
a.cc:22:27: error: expected ';' before ')' token
   22 |         for (int k = i + 2); k < N; k++) {
      |                           ^
      |                           ;
a.cc:22:30: error: 'k' was not declared in this scope
   22 |         for (int k = i + 2); k < N; k++) {
      |                              ^
Language: C++

#include <iostream>
#include <map>
#include <algorithm>
using namespace std;
 
int checkSimilarity(int a, int b, int c)
{
	if((a-b==0)|(b-c==0)|(a-c==0))
       {
         return 1;
       }
    return 0;
}
       
int findTriagnles(vector<int,int> v, int size)
{ 
  int count;
  for(int i=0; i<size; i++)
  {
    for(int j= i+1; j<size; j++)
    {
      for(int k=j+1; k<size; k++)
      {
        if(checkSimilarity(v.at(i), v.at(j), v.at(k)) 
           { continue;
           }
         if(v.at(i)+v.at(j) > v.at(k))
           {
             count++;
           }
      }
    }
  }
  return count;
}
           
int main()
{
	int size, element;
  	int count = 0;
  	vector<int> v;
  	cin >> size;
  	for(int i = 0; i<size; i++)
    {
      cin >> element;
      v.push_back(element);
    }
  	sort(v.begin(),v.end());
  	findTriangles(v, v.size());
}


Compiler output:
a.cc:15:19: error: 'vector' was not declared in this scope
   15 | int findTriagnles(vector<int,int> v, int size)
      |                   ^~~~~~
a.cc:4:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    3 | #include <algorithm>
  +++ |+#include <vector>
    4 | using namespace std;
a.cc:15:26: error: expected primary-expression before 'int'
   15 | int findTriagnles(vector<int,int> v, int size)
      |                          ^~~
a.cc:15:30: error: expected primary-expression before 'int'
   15 | int findTriagnles(vector<int,int> v, int size)
      |                              ^~~
a.cc:15:38: error: expected primary-expression before 'int'
   15 | int findTriagnles(vector<int,int> v, int size)
      |                                      ^~~
a.cc:15:46: error: expression list treated as compound expression in initializer [-fpermissive]
   15 | int findTriagnles(vector<int,int> v, int size)
      |                                              ^
a.cc: In function 'int main()':
a.cc:41:9: error: 'vector' was not declared in this scope
   41 |         vector<int> v;
      |         ^~~~~~
a.cc:41:9: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
a.cc:41:16: error: expected primary-expression before 'int'
   41 |         vector<int> v;
      |                ^~~
a.cc:46:7: error: 'v' was not declared in this scope
   46 |       v.push_back(element);
      |       ^
a.cc:48:14: error: 'v' was not declared in this scope
   48 |         sort(v.begin(),v.end());
      |              ^
a.cc:49:9: error: 'findTriangles' was not declared in this scope; did you mean 'findTriagnles'?
   49 |         findTriangles(v, v.size());
      |         ^~~~~~~~~~~~~
      |         findTriagnles
Language: C++

#include<cstdio>
#include<cstdlib>
#include<cmath>
#include<algorithm>
#include<vector>
#include<set>
#include<queue>
#include<iostream>
#include<map>
#include<cstring>
#define INF 0x3f3f3f3f
#define eps 1e-10
using namespace std;
set<int> a;
map<int,int>tim;
int n,l[1000000000],ans,maxn,other;
int main(){
    scanf("%d",&n);
    for(int i=1;i<=n;i++){
        scanf("%d",&l[i]);
    }
    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[k]){
                    if(l[i]==l[j]||l[j]==l[k]||l[i]==l[k])
                        continue;
                maxn=max(l[i],max(l[j],l[k]));
                other=l[i]+l[j]+l[k]-maxn;
                    if(other>maxn)
                        ans++;
                }
            }
    printf("%d",ans);
}


Compiler output:
/tmp/ccHbWO3D.o: in function `main':
a.cc:(.text+0x1f5): relocation truncated to fit: R_X86_64_PC32 against symbol `maxn' defined in .bss section in /tmp/ccHbWO3D.o
a.cc:(.text+0x246): relocation truncated to fit: R_X86_64_PC32 against symbol `maxn' defined in .bss section in /tmp/ccHbWO3D.o
a.cc:(.text+0x24e): relocation truncated to fit: R_X86_64_PC32 against symbol `other' defined in .bss section in /tmp/ccHbWO3D.o
a.cc:(.text+0x254): relocation truncated to fit: R_X86_64_PC32 against symbol `other' defined in .bss section in /tmp/ccHbWO3D.o
a.cc:(.text+0x25a): relocation truncated to fit: R_X86_64_PC32 against symbol `maxn' defined in .bss section in /tmp/ccHbWO3D.o
a.cc:(.text+0x264): relocation truncated to fit: R_X86_64_PC32 against symbol `ans' defined in .bss section in /tmp/ccHbWO3D.o
a.cc:(.text+0x26d): relocation truncated to fit: R_X86_64_PC32 against symbol `ans' defined in .bss section in /tmp/ccHbWO3D.o
a.cc:(.text+0x2af): relocation truncated to fit: R_X86_64_PC32 against symbol `ans' defined in .bss section in /tmp/ccHbWO3D.o
collect2: error: ld returned 1 exit status