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

#include<stdio.h>

int main(void){
    int n;
    scanf("%d",&n);
    int l[n];
    int i, j, k;
    int s;
    int ans = 0;
    for(i=0;i<n;i++){
        scanf("%d",&l[i]);
    }
    for(i=0;i<n;i++){
        for(j=i+1;j<n;j++){
            for(k=j+1;k<n;k++){
                if(b+c>a){
                    if(c+a>b){
                        if(a+b>c){
                            ans++
                        }
                    }
                }
                    ans++;
            }
        }
    }
    printf("%d",ans);
    return 0;
    
}


Compiler output:
main.c: In function 'main':
main.c:16:20: error: 'b' undeclared (first use in this function)
   16 |                 if(b+c>a){
      |                    ^
main.c:16:20: note: each undeclared identifier is reported only once for each function it appears in
main.c:16:22: error: 'c' undeclared (first use in this function)
   16 |                 if(b+c>a){
      |                      ^
main.c:16:24: error: 'a' undeclared (first use in this function)
   16 |                 if(b+c>a){
      |                        ^
main.c:19:34: error: expected ';' before '}' token
   19 |                             ans++
      |                                  ^
      |                                  ;
   20 |                         }
      |                         ~
Language: C++

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

int main() {
int n;
cin >> n;
vector<int>vec(2500);
for(int i = 0; i<n ;i++){
    cin >> vec.at(i);
}
int cnt=0;
for(int i = 0; i<n ; i++){
    if(i==j || j==k || i==k)continue;
    for(int j = 0; j<n ;j++){
        if(i==j || j==k || i==k)continue;
        for(int k=0;k<n ;k++){
            if(i==j || j==k || i==k)continue;
            int a=vec.at(i);
            int b=vec.at(j);
            int c=vec.at(k);

            int maximum=max(max(a,b),c);
            int minimum=min(min(a,b),c);
            int medium=a+b+c-minimum-maximum;
            if(maximum<minimum+medium){
            if(!(i==j || j==k || i==k)){cnt+=1;}


                }

        }
    }
}
cout << cnt/6 << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:11: error: 'j' was not declared in this scope
   13 |     if(i==j || j==k || i==k)continue;
      |           ^
a.cc:13:19: error: 'k' was not declared in this scope
   13 |     if(i==j || j==k || i==k)continue;
      |                   ^
a.cc:15:23: error: 'k' was not declared in this scope
   15 |         if(i==j || j==k || i==k)continue;
      |                       ^
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main() {
    ios::sync_with_stdio(false);
    cin.tie(NULL);

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

Compiler output:
a.cc: In function 'int main()':
a.cc:14:5: error: expected ',' or ';' before 'for'
   14 |     for (int i = 0; i < N - 2; ++i) {
      |     ^~~
a.cc:14:21: error: 'i' was not declared in this scope
   14 |     for (int i = 0; i < N - 2; ++i) {
      |                     ^
Language: C++

#include<stdio.h>
#include<algorithm>
#include<functional>
#include<cmath>
#include<numeric>
#include<queue>
#include<string>
#include<vector>
#define ll long long
#define rep(i,n) for(int i=0;i<n;i++)
ll mod = 1000000007;
using namespace std;
priority_queue<ll int>A;//きゅー
int tri(int a, int b, int c) {
	int y = 0;
	if (a < b + c) {
		if (b < a + c) {
			if (c < a + b) {
				y++;
			}
		}
	}
	return y;
}
int main(void)
{
	int N, S[100010], sum[1000100],p = 0,w = 0;
	long long int ans = 0;
	scanf("%d", &N);
	for (int i = 0; i < N; i++) {
		scanf("%d",&S[i][0][0]);
	}
	for (int i = 0; i < N -1; i++) {
		for (int j = i + 1; j < N; j++) {
			sum[p] = S[i] + S[j];
			p++;
		}
	}
	for (int i = 0; i < N; i++) {
		for (int j = 0; j < p; j++) {
			if (S[i] < sum[j]) {
				ans++;
			}
		}
	}
	printf("%lld", ans);
	return 0;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:31:33: error: invalid types 'int[int]' for array subscript
   31 |                 scanf("%d",&S[i][0][0]);
      |                                 ^
Language: C++

#include<cstdio>
#include<algorithm>
using namespace std;
const int N=2e3+10;
int n,a[N],ans;
int main()
{
	scanf("%d",&n);
	for(int i=1;i<=n;i++)
		scanf("%d",&a[i]);
	sort(a+1,a+1+n);
	for(int i=1;i<=n;i++)
		for(int j=i+1;j<=n;j++)
			ans+=max(0,lower_bound(a+1+j,a+1+n,a[i]+a[j])-upper_bound(a+1+j,a+1+n,a[j]-a[i]));
	printf("%d",ans);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:33: error: no matching function for call to 'max(int, long int)'
   14 |                         ans+=max(0,lower_bound(a+1+j,a+1+n,a[i]+a[j])-upper_bound(a+1+j,a+1+n,a[j]-a[i]));
      |                              ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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:   template argument deduction/substitution failed:
a.cc:14:33: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'long int')
   14 |                         ans+=max(0,lower_bound(a+1+j,a+1+n,a[i]+a[j])-upper_bound(a+1+j,a+1+n,a[j]-a[i]));
      |                              ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/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, 2 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:   candidate expects 1 argument, 2 provided
/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:   template argument deduction/substitution failed:
a.cc:14:33: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   14 |                         ans+=max(0,lower_bound(a+1+j,a+1+n,a[i]+a[j])-upper_bound(a+1+j,a+1+n,a[j]-a[i]));
      |                              ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

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

int main(){
    ll N,L,total=0;
    cin >> N;
    vector<ll> nagasa(2001,0);
    vector<ll> nagasa2(2001,0);
    for(ll i=1;i<N+1;i++){
        cin >> L;
        nagasa[L]++;
    }
    nagasa2[1] = nagasa[1];
    for(ll i=2;i<2001;i++){
        nagasa2[i] = nagasa[i]+nagasa2[i-1];
    }
    
    for(ll i=1;i<1001;i++){
        for(ll j=i;j<1001;j++){
            if(i==j){
                if(nagasa[i]<=1) continue;
                else{
                    total+=nagasa[i]*(nagasa[i]-1)*(nagasa2[2*i-1]-nagasa2[i])/2;
                }
                if(nagasa[i]>=3){
                    total+=nagasa[i]*(nagasa[i]-1)*(nagasa[i]-2)/6;
                }
            }else{
                if(nagasa[j]==0) continue;
                if(nagasa[i]==0) continue;
                total+=nagasa[i]*nagasa[j]*(nagasa2[i+j-1]-nagasa2[j]);
                if(nagasa[j] >= 2) total+=nagasa[i]*nagasa[j]*(nagasa[j]-1)/2;
            }
        }
    }
    
    cout << total << endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:40:27: error: expected '}' at end of input
   40 |     cout << total << endl;
      |                           ^
a.cc:7:11: note: to match this '{'
    7 | int main(){
      |           ^
Language: C++

#include "pch.h"
#include <iostream>
#include <vector>
#include <algorithm>
#include <functional>

using namespace std;

int main()
{
	int N;
	int ans;

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

	sort(Li.begin(), Li.end());

	ans = 0;

	for (int i = N - 1; i >= 2; i++) {
		for (int j = i = 1; j >= 1; j++) {
			if (Li[i] < Li[j] * 2) {
				for (int k = j - 1; k >= 0; k--)
				{
					if (Li[i] < (Li[j] + Li[k]))
					{
						ans++;
					}
					else
					{
						break;
					}
				}
			}
			else {
				break;
			}
		}
	}
	cout << ans;
	//cin >> N;
	return 0;

}


Compiler output:
a.cc:1:10: fatal error: pch.h: No such file or directory
    1 | #include "pch.h"
      |          ^~~~~~~
compilation terminated.
Language: C

#include <stdio.h>
int main()
{
int a, b, c; 
  int tr;
 int x, y, z;
  printf("enter the bthree diffrent value to form a tringle: %d, %d, %d", a, b, c);
  scanf("%d%d%d", &a, &b, &c);
  x==a<b+c;
  y==b<c+a;
  z==c<a+b;
  t==x&&t==y&&t==z;
 printf("no. of triangle form:", t);
  return t;
}

Compiler output:
main.c: In function 'main':
main.c:12:3: error: 't' undeclared (first use in this function)
   12 |   t==x&&t==y&&t==z;
      |   ^
main.c:12:3: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include <iostream>
using namespace std;
int isTriangle(int a, int b, int c){
    if(a<b+c){
        if(b<c+a){
            if(c<a+b){
                return 1;
            }
        }
    }
    return 0;
}
int main(){
    int n;
    int d[2000];
    int ans = 0;
    cin >> n;
    for(int i = 0; i < n; i++){
        cin >> d[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++){
                ans += isTriangle(d[i],d[j],d[k])
            }
        }
    }
    cout << ans << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:50: error: expected ';' before '}' token
   24 |                 ans += isTriangle(d[i],d[j],d[k])
      |                                                  ^
      |                                                  ;
   25 |             }
      |             ~
Language: C++

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

int main()
{
	vector<int> l;
   int i, j, k, s;
	int n;
	cin >> n;
   s=0;
	for (i = 0; i < n; i++)
   {
		int x;
		cin >> x;
		l.push_back(x);
	}

   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]>abs(l[j]-l[k])){
               if(l[i] < l[j] + l[k]){
                  if(l[i]>abs(l[j]-l[k])){
                     s++;
                  }
               }

               }
            }
      }
   }
   cout << s;
   return 0;
}

Compiler output:
a.cc:35:4: error: 'cout' does not name a type
   35 |    cout << s;
      |    ^~~~
a.cc:36:4: error: expected unqualified-id before 'return'
   36 |    return 0;
      |    ^~~~~~
a.cc:37:1: error: expected declaration before '}' token
   37 | }
      | ^
Language: Java

import java.util.*;
public class Triangle{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
    ArrayList<Integer> array = new ArrayList<>();
		// 整数の入力
		int number = sc.nextInt();
		for(int i = 0; i < number; i++){
      array.add(sc.nextInt());
    }

    Collections.sort(array, Collections.reverseOrder());
    int total = 0;
    for(int i = 0; i < array.size()-2; i++){
      if(array.get(i) < array.get(i+1)+array.get(i+2)){
        for(int j = 1+i; j < array.size()-1; j++){
          if(array.get(i) < array.get(j)+array.get(j+1)){
            for(int k = 1+j; k < array.size(); k++){
              int a = array.get(i);
              int b = array.get(j);
              int c = array.get(k);
              //System.out.printf("%d %d %d \n",a,b,c);
              if(a<b+c && b < a+c && c < a+b)
                total++;
            }
          }
        }
      }
    }

    System.out.println(total);
	}
}

Compiler output:
Main.java:2: error: class Triangle is public, should be declared in a file named Triangle.java
public class Triangle{
       ^
1 error
Language: Java

import java.util.*;
public class Triangle{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
    ArrayList<Integer> array = new ArrayList<>();
		// 整数の入力
		int number = sc.nextInt();
		for(int i = 0; i < number; i++){
      array.add(sc.nextInt());
    }

    Collections.sort(array, Collections.reverseOrder());
    int total = 0;
    for(int i = 0; i < array.size()-2; i++){
      if(array.get(i) < array.get(i+1)+array.get(i+2)){
        for(int j = 1+i; j < array.size()-1; j++){
          if(array.get(i) < array.get(k)+array.get(k+1)){
            for(int k = 1+j; k < array.size(); k++){
              int a = array.get(i);
              int b = array.get(j);
              int c = array.get(k);
              //System.out.printf("%d %d %d \n",a,b,c);
              if(a<b+c && b < a+c && c < a+b)
                total++;
            }
          }
        }
      }
    }

    System.out.println(total);
	}
}

Compiler output:
Main.java:2: error: class Triangle is public, should be declared in a file named Triangle.java
public class Triangle{
       ^
Main.java:17: error: cannot find symbol
          if(array.get(i) < array.get(k)+array.get(k+1)){
                                      ^
  symbol:   variable k
  location: class Triangle
Main.java:17: error: cannot find symbol
          if(array.get(i) < array.get(k)+array.get(k+1)){
                                                   ^
  symbol:   variable k
  location: class Triangle
3 errors
Language: C++

#include<iostream>
using namespace std;
int main()
{
  int n,i,j,k,count=0;
  cin>>n;
  int a[n];
  for(i=0;i<n;i++)
  {
    cin>>a[i];
  }
  for(i=0;i<n;i++)
  {
    for(j=i+1;j<n;j++)
    {
      if(a[i]>a[j])
      {
        temp=a[i];
        a[i]=a[j];
        a[j]=temp;
      }
    }
  }
  for(i=0;i<n;i++)
  {
    for(j=i+1;j<n;j++)
    {
      for(k=j+1;k<n;k++)
      {
        if(a[i]+a[j]<=a[k])
          break;
        else
          count++;
      }
    }
  }
  cout<<count;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:9: error: 'temp' was not declared in this scope; did you mean 'tm'?
   18 |         temp=a[i];
      |         ^~~~
      |         tm
Language: C++

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

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

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

#include <stdio.h>
#include <string.h>

int bubbleSort(int* A, int N)
{
	int flag=1;
	int i,tmp;
	while(flag){
		flag = 0;
		
		for(i=N-1;i>0;i--){
			if(A[i]<A[i-1]){
				tmp = A[i];
				A[i]=A[i-1];
				A[i-1]=tmp;
				flag=1;
				cnt++;
			}
		}
	}
	return 0;
}

int main(){

	long int N,cnt=0,tmp=1;
	int L[2010];
	long int i,j,k;
	scanf("%ld",&N);
	
	for(i=0;i<N;i++)scanf("%d",&L[i]);
	
	bubbleSort(L,N);
	#if 1
	// tmp x x x i 
	//           tmp x x x x
	for(i=0;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[k]) &&(L[j]<L[k]+L[i])&&(L[k]<L[j]+L[i]) ) cnt++;
		else break;
		//printf("%ld,",tmp++);
	}
	}
	}
	#endif
	
	printf("%ld\n",cnt);
	return 0;
 }

Compiler output:
main.c: In function 'bubbleSort':
main.c:17:33: error: 'cnt' undeclared (first use in this function); did you mean 'int'?
   17 |                                 cnt++;
      |                                 ^~~
      |                                 int
main.c:17:33: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main() {
  int n = 0;
  cin >> n;
  vector<int> a(n, 0);
  for(int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  
  sort(a.being(), a.end());
  int result = 0;
  for(int i = 0; i < n - 2; ++i) {
    for(int j = i + 1; j < n - 1; ++j) {
      for(int k = j + 1; k < n; ++k) {
        if(a[i] < a[j] + a[k] && a[j] < a[i] * a[k] && a[k] < a[i] * a[j]) {
          result += 1;
        }
      }
    }
  }
  cout << result << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:10: error: 'class std::vector<int>' has no member named 'being'
   13 |   sort(a.being(), a.end());
      |          ^~~~~
Language: C++

#include <iostream>
#include <vector>
using namespace std;
int main() {
  int n = 0;
  cin >> n;
  vector<int> a(n, 0);
  for(int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  
  sort(a.being(), a.end());
  int result = 0;
  for(int i = 0; i < n - 2; ++i) {
    for(int j = i + 1; j < n - 1; ++j) {
      for(int k = j + 1; k < n; ++k) {
        if(a[i] < a[j] + a[k] && a[j] < a[i] * a[k] && a[k] < a[i] * a[j]) {
          result += 1;
        }
      }
    }
  }
  cout << result << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:10: error: 'class std::vector<int>' has no member named 'being'
   12 |   sort(a.being(), a.end());
      |          ^~~~~
a.cc:12:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   12 |   sort(a.being(), a.end());
      |   ^~~~
      |   short
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:21:20: error: expected ';' before ':' token
   21 |             count++:
      |                    ^
      |                    ;
Language: C++

#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007;
const long long INF = 9999999999999999;
using ll = long long;
int main(){
  int N;
  cin>>N;
  int a[N];
  for(int i = 0;i<N;i++){
    cin>>a[i];
  }
  int l[N][N];
  int t = 0;
  for(int i = 0;i<N;i++){
    for(int k = 0;k<N;k++){
      l[i][k] = a[i]+a[k];
    }
  }
  

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

#include<stdio.h>

max(int a,int b,int c){
    if(a>=b&&a>=c)
        return a;
    else if(b>a&&b>=c)
        return b;
    else
        return c;
}

int main(void){
    int n;
    scanf("%d",&n);
    int l[n];
    int i, j, k;
    int s;
    int ans = 0;
    for(i=0;i<n;i++){
        scanf("%d",&l[i]);
    }
    for(i=0;i<n;i++){
        for(j=i+1;j<n;j++){
            for(k=j+1;k<n;k++){
                s = l[i] + l[j] + l[k];
                if(2*max(l[i],l[j],l[k])-a > 0)
                    ans++;
            }
        }
    }
    printf("%d\n",ans);
    return 0;
    
}


Compiler output:
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
    3 | max(int a,int b,int c){
      | ^~~
main.c: In function 'main':
main.c:26:42: error: 'a' undeclared (first use in this function)
   26 |                 if(2*max(l[i],l[j],l[k])-a > 0)
      |                                          ^
main.c:26:42: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

// n = int(input())
// l = list(map(int, input().split())) 
// s = 0
// for i in range(n):
//    for j in range(i+1,n):
//       for k in range(j+1, n):
//          if (l[i] < l[j] + l[k] and l[i]>abs(l[j]-l[k])):
//             s+=1

// print(s)

#include <iostream>
#include <sstream>
#include <vector>
#include <cmath>
using namespace std;
 
int main()
{
	vector<int> l;
  	int i, j, k, s;
	int n;
	cin >> n;
   s=0;
	for (i = 0; i < n; i++)
   {
		int x;
		cin >> x;
		l.push_back(x);
	}
​
	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]>abs(l[j]-l[k])){
                  s++;
               }
            }
      }
   }
​
  	cout << s;
 	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:31:1: error: '\U0000200b' was not declared in this scope
   31 | ​
      |  
a.cc:32:31: error: expected ';' before ')' token
   32 |         for (i = 0; i < n; i++) {
      |                               ^
      |                               ;
a.cc:41:1: error: expected ';' before 'cout'
   41 | ​
      | ^
      | ;
   42 |         cout << s;
      |         ~~~~
Language: C++

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

int main(){
  int a,s;
  int b[2100];
  cin >> a ;
  for(int i=0;i<a;i++){
    cin >> b[i];
  }
  for(int i=0;i<a;i++){
    if(b[i]>b[i+1])continue;
    for(int j=i+1;j<a;j++){
      if(b[k]>b[k+1])continue;
      for(int k=j+1;k<a;k++){
        if(b[j]>b[j+1])continue;
        if(b[i]<b[j]+b[k]&&b[j]<b[i]+b[k]&&b[k]<b[j]+b[i]){
          s=s+1;
        }
      }
    }
  }


  cout << s << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:12: error: 'k' was not declared in this scope
   15 |       if(b[k]>b[k+1])continue;
      |            ^
Language: C

#include <stdio.h>
#include <algorithm>

int main(void){
    int N, L[2005], x, y, r, i, j, k[3];
    scanf("%d", &N);
    for (i=1; i<=N; i++) {
        scanf("%d", &L[i]);
        L[i]=-L[i];
    }
    std::sort(L+1, L+N+1);
    for (i=1; i<=N; i++) L[i]=-L[i];
    // for (i=1; i<=N; i++) printf("%d ", L[i]);
    
    x=0;
    for (i=1; i<=N-2; i++) {
        for (j=i+1; j<=N-1; j++) {
            // printf("!");
            r=L[i]-L[j];
            // printf("(%d, %d): %d\n", i, j, r);
            k[0]=j+1, k[1]=N;
            while (1) {
                k[2]=(k[0]+k[1])/2;
                // printf("(%d, %d, %d)\n", k[0], k[1], k[2]);
                if (k[1]-k[0]<=1) {
                    if (k[1]-k[0]==1) {
                        if (L[k[1]]>r) {
                            y=k[1]-j;
                            break;
                        }
                    }
                    if (k[0]==j+1) {
                        if (L[k[0]]>r) y=1;
                        else y=0;
                        break;
                    }
                    y=k[0]-j;
                    break;
                }
                if (L[k[2]]>r) {
                    k[0]=k[2];
                }
                else {
                    k[1]=k[2]-1;
                }
            }
            x+=y;
        }
    }
    printf("%d", x);
    return 0;
}

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

#include<stdio.h>

max(int a,int b,int c){
    if(a>=b&&a>=c)
        return a;
    else if(b>a&&b>=c)
        return b;
    else
        return c;
}

int main(void){
    int n;
    scanf("%d",&n);
    int l[n];
    int i, j, k;
    int s;
    int ans = 0;
    for(i=0;i<n;i++){
        scanf("%d",&l[i]);
    }
    for(i=0;i<n;i++){
        for(j=i+1;j<n;j++){
            for(k=j+1;k<n;k++){
                s = l[i] + l[j] + l[k];
                if(2*max(a,b,c)-a > 0)
                    ans++;
            }
        }
    }
    printf("%d\n",ans);
    return 0;
    
}


Compiler output:
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
    3 | max(int a,int b,int c){
      | ^~~
main.c: In function 'main':
main.c:26:26: error: 'a' undeclared (first use in this function)
   26 |                 if(2*max(a,b,c)-a > 0)
      |                          ^
main.c:26:26: note: each undeclared identifier is reported only once for each function it appears in
main.c:26:28: error: 'b' undeclared (first use in this function)
   26 |                 if(2*max(a,b,c)-a > 0)
      |                            ^
main.c:26:30: error: 'c' undeclared (first use in this function)
   26 |                 if(2*max(a,b,c)-a > 0)
      |                              ^
Language: C++

//#include <bits/stdc++.h>
#include <iostream>
#include <vector>
#include <string>
using namespace std;
typedef long long ll;
const double EPS = 1e-9;
typedef vector<int> vint;
typedef pair<int, int> pint;
#define inf 1e+9
#define rep(i, n) REP(i, 0, n)
#define all(v) v.begin(), v.end()
#define msg(a) cout << #a << " " << a << endl;
#define REP(i, x, n) for(int i = x; i < n; i++)
#define pri(a) cout << a << endl;

int main(){
  cin.tie(nullptr);
	ios::sync_with_stdio(false);

  ll n,ans=0,c=0;
  cin >> n;
  //ll n,k,ans=0;
  //cin >> n >> k;
  // stirng s;
  // cin >> s;
  vint l(n);
  rep(i,n){
    cin >> l[i];
  }

	std::sort(l.begin(), l.end());

  rep(i,n-2){
    for(int j=i+1;j<n-1;j++){
      for(int k=n-1;k>j;k--){
        if(l[k]<l[i]+l[j]){
          ans += k-j;
          //cout << i << j << k;
          c=1;
          break;
        }
      }
    }
  }


  cout << ans << endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:14: error: 'sort' is not a member of 'std'; did you mean 'qsort'?
   32 |         std::sort(l.begin(), l.end());
      |              ^~~~
      |              qsort
Language: C++

#include <bits/stdc++.h>
#include <iostream>
#include <algolithm>
using namespace std;
int main(){
  int N;
  cin >> N;
  vector<int> L(N);
  int S = 0;
  for(int i=0;i<N;++i){
    cin >> L.at(i);
  }
  sort(L,L+N,greater<int>());
  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.at(k)>L.at(i)-L.at(j)){
        ++S;
       }
      }
    }
  }
   cout<<S<<endl;
}

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

//#include <bits/stdc++.h>
#include <iostream>
#include <vector>
#include <string>
using namespace std;
typedef long long ll;
const double EPS = 1e-9;
typedef vector<int> vint;
typedef pair<int, int> pint;
#define inf 1e+9
#define rep(i, n) REP(i, 0, n)
#define all(v) v.begin(), v.end()
#define msg(a) cout << #a << " " << a << endl;
#define REP(i, x, n) for(int i = x; i < n; i++)
#define pri(a) cout << a << endl;

int main(){
  cin.tie(nullptr);
	ios::sync_with_stdio(false);

  ll n,ans=0,c=0;
  cin >> n;
  //ll n,k,ans=0;
  //cin >> n >> k;
  // stirng s;
  // cin >> s;
  vint l(n);
  rep(i,n){
    cin >> l[i];
  }

	rep(i,n){
    	sort(l.begin(),l.end());
	}

  rep(i,n-2){
    for(int j=i+1;j<n-1;j++){
      for(int k=n-1;k>j;k--){
        if(l[k]<l[i]+l[j]){
          ans += k-j;
          //cout << i << j << k;
          c=1;
          break;
        }
      }
    }
  }


  cout << ans << endl;

}


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

//#include <bits/stdc++.h>
#include <iostream>
#include <vector>
#include <string>
using namespace std;
typedef long long ll;
const double EPS = 1e-9;
typedef vector<int> vint;
typedef pair<int, int> pint;
#define inf 1e+9
#define rep(i, n) REP(i, 0, n)
#define all(v) v.begin(), v.end()
#define msg(a) cout << #a << " " << a << endl;
#define REP(i, x, n) for(int i = x; i < n; i++)
#define pri(a) cout << a << endl;

int main(){
  cin.tie(nullptr);
	ios::sync_with_stdio(false);

  ll n,ans=0,c=0;
  cin >> n;
  //ll n,k,ans=0;
  //cin >> n >> k;
  // stirng s;
  // cin >> s;
  vint l(n);
  rep(i,n){
    cin >> l[i];
  }

	rep(i,n-1){
    	sort(l.begin(),l.end());
	}

  rep(i,n-2){
    for(int j=i+1;j<n-1;j++){
      for(int k=n-1;k>j;k--){
        if(l[k]<l[i]+l[j]){
          ans += k-j;
          //cout << i << j << k;
          c=1;
          break;
        }
      }
    }
  }


  cout << ans << endl;

}

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

#include <iostream>
using namespace std;

int main() {
  int N;
  int L[3000];
  int total = 0;
  
  cin >> N;
  
  for (int i = 0; i < N; ++i) cin >> L[i];
  sort(L, L + N); 
  for (int a = 0; a < N - 2; ++a) {
    for (int b = a + 1; b < N - 1; ++b) {
      for (int c = b + 1; c < N; ++c) {
        
        if (L[b] + L[a] > L[c]){
          total += 1;
          
        }
        
      }
    }
  }
  cout << total << endl;
}


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

//#include <bits/stdc++.h>
#include <iostream>
#include <vector>
#include <string>
using namespace std;
typedef long long ll;
const double EPS = 1e-9;
typedef vector<int> vint;
typedef pair<int, int> pint;
#define inf 1e+9
#define rep(i, n) REP(i, 0, n)
#define all(v) v.begin(), v.end()
#define msg(a) cout << #a << " " << a << endl;
#define REP(i, x, n) for(int i = x; i < n; i++)
#define pri(a) cout << a << endl;

int main(){
  cin.tie(nullptr);
	ios::sync_with_stdio(false);

  ll n,ans=0,c=0;
  cin >> n;
  //ll n,k,ans=0;
  //cin >> n >> k;
  // stirng s;
  // cin >> s;
  vint l(n);
  rep(i,n){
    cin >> l[i];
  }

	rep(i,n-1){
    	std::sort(l.begin(),l.end());
	}

  rep(i,n-2){
    for(int j=i+1;j<n-1;j++){
      for(int k=n-1;k>j;k--){
        if(l[k]<l[i]+l[j]){
          ans += k-j;
          //cout << i << j << k;
          c=1;
          break;
        }
      }
      // if(c==1){
      //   c=0;
      //   break;
      // }
    }
  }


  cout << ans << endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:33:14: error: 'sort' is not a member of 'std'; did you mean 'qsort'?
   33 |         std::sort(l.begin(),l.end());
      |              ^~~~
      |              qsort
Language: C++

#include <iostream>
using namespace std;

int main() {
  int N;
  int L[3000];
  int total = 0;
  
  cin >> N;
  
  for (int i = 0; i < N; ++i) cin >> L[i];
  sort(L, L + N, greater<int>());
  for (int a = 0; a < N - 2; ++a) {
    for (int b = a + 1; b < N - 1; ++b) {
      for (int c = b + 1; c < N; ++c) {
        
        if (L[b] + L[c] > L[a]){
          total += 1;
          
        }
        
      }
    }
  }
  cout << total << endl;
}


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

#include <iostream>
using namespace std;

int main() {
  int N;
  int L[3000];
  int total = 0;
  
  cin >> N;
  
  for (int i = 0; i < N; ++i) cin >> L[i];
  std::sort(L, L + N);
  for (int a = 0; a < N - 2; ++a) {
    for (int b = a + 1; b < N - 1; ++b) {
      for (int c = b + 1; c < N; ++c) {
        
        if (L[b] + L[c] > L[a]){
          total += 1;
          
        }
        
      }
    }
  }
  cout << total << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:8: error: 'sort' is not a member of 'std'; did you mean 'qsort'?
   12 |   std::sort(L, L + N);
      |        ^~~~
      |        qsort
Language: C++

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

inline bool suffice(int a, int b, int c)
{
  return
    a < b + c &&
    b < c + a &&
    c < a + b;
}

int main()
{
  int n;
  cin >> n;
  vector<int> list(n);
  for(int i = 0; i < n; ++i)
  {
    cin >> list[i];
  }
  
  sort(list.begin(), list.end());
  vector<int> skip(n, 1);
  {
    int pos = 0;
    while(pos < n)
    {
      int from = pos;
      int value = list[pos];
      int skip_count = 1;
      ++pos;
      while(pos < n && list[pos] == value) { ++skip_count; }
      skip[from] = skip_count;
    }
  }
  
  long long result = 0;
  for(int i = 0; i < n; i += skip[i])
  for(int j = i + 1; j < n; j += skip[j])
  for(int k = j + 1; k < n; k += skip[k])
  {
    if(suffice(list[i], list[j], list[k])
    {
      result += skip[i] * skip[j] * skip[k];
    }
  }
  cout << result << endl;
  
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:44:42: error: expected ')' before '{' token
   44 |     if(suffice(list[i], list[j], list[k])
      |       ~                                  ^
      |                                          )
   45 |     {
      |     ~                                     
a.cc:48:3: error: expected primary-expression before '}' token
   48 |   }
      |   ^
Language: C++

// Last Change: 10/19/2019 21:53:01.
#include <algorithm>
#include <array>
#include <bitset>
#include <cmath>
#include <cstdlib>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <memory>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>

using namespace std;
using ll = long long;

int main() {
  ll N;
  cin >> N;
  vector<ll> L(N);
  for (auto &&e : L) {
    cin >> e;
  }
  sort(L.begin(), L.end());

  ll ans = 0;
  {
    ll a, b, aMb, aPb;
    for (auto i = L.begin(); i != L.end(); ++i) {
      for (auto j = i + 1; j != L.end(); ++j) {
        a = *i;
        b = *j;
        // cout << "a: " << a << " b: " << b << endl;
        aMb = b - a;
        aPb = a + b;
        auto left = upper_bound(i + 1, j, aMb);
        auto right = lower_bound(i + 1, j, aPb);
        auto res = distance(left, right);

        /*
        if (aMb < a and a < aPb) {
          --res;
        }
        if (aMb < b and b < aPb) {
          --res;
        }*/
        res = max(0LL, res);
        // cout << ' ' << res << endl;
        ans += res;
      }
    }
  }
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:53:18: error: no matching function for call to 'max(long long int, long int&)'
   53 |         res = max(0LL, res);
      |               ~~~^~~~~~~~~~
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:   template argument deduction/substitution failed:
a.cc:53:18: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'long int')
   53 |         res = max(0LL, res);
      |               ~~~^~~~~~~~~~
/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, 2 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:   candidate expects 1 argument, 2 provided
/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:   template argument deduction/substitution failed:
a.cc:53:18: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   53 |         res = max(0LL, res);
      |               ~~~^~~~~~~~~~
Language: C++

#include <iostream>
using namespace std;

int main() {
  int N;
  int L[3000];
  int total = 0;
  
  cin >> N;
  
  for (int i = 0; i < N; ++i) cin >> L[i];
  sort(L, L + N);
  for (int a = 0; a < N - 2; ++a) {
    for (int b = a + 1; b < N - 1; ++b) {
      for (int c = b + 1; c < N; ++c) {
        
        if (L[b] + L[c] > L[a]){
          total += 1;
          
        }
        
      }
    }
  }
  cout << total << endl;
}


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

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

int main(){
    int N; cin >> N;
    vector<int> L(N);
    ll ans =0;

    rep(i,N){
        cin >> L[i];
    }

    sort(L.begin(), L.end());

    for (int i= 0; i< N-2; i++) {

            if (L[i+2] < L[i] + L[i+1]){
                ans++;
            }

    }

    cout << ans << endl;
}





}



Compiler output:
a.cc:32:1: error: expected declaration before '}' token
   32 | }
      | ^
Language: C++

#include<iostream>
#include<string>
#include<vector>
#include<algorithm>//sort,reverse
#include<utility>//pair
using namespace std;
int main()
{ 
    int n;
    cin>>n;
    int l[n];
    for(int i=0;i<n;i++){
        cin>>l[i];
    }
    sort(l,l+n);
    //10^6orderで以上長さlistの作成
    int m[1002];
    m[0]=0;
    int cnt=n;
    int k=0;
    for(int i=1;i<1002;i++){
        while(i>l[k]&&k<n){
            cnt--;
            k++;
        }
        m[i]=cnt;
    }
    long long int cnt=0;
    //10^6orderで組み合わせ.ただし最長が同じ長さのものは除く
    for(int i=0;i<n-2;i++){
        for(int j=i+1;j<n-1;j++){
            if(l[i]+l[j]>=1000){
                cnt=cnt+m[l[j]+1];
            }
            else{
                cnt=cnt+m[l[j]+1]-m[l[i]+l[j]];
            }
        }
    }
    //最長が同じものを計算
    int x=0;
    for(int i=2;i<1001;i++){
        x=m[i]-m[i+1];
        if(x>1){
            //長さiのものが2本以上
            cnt=cnt+(n-m[i])*x*(x-1)/2;
            //長さi未満
        }
    }
    cout<<cnt<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:19: error: conflicting declaration 'long long int cnt'
   28 |     long long int cnt=0;
      |                   ^~~
a.cc:19:9: note: previous declaration as 'int cnt'
   19 |     int cnt=n;
      |         ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
 
int main() {
    ll n;
    cin>>n;
    vector<ll> a(n);
    rep(i,n){
        cin>>a[i];
    }
    ll i,j,k;
    ll co=0;
    sort(a.begin(),a.end());
    for(i=0;i<n-2;i++){
        for(j=i+1;j<n-1;j++){
            for(k=j+1;k<n;k++){
                co++;
                if(a[i]+a[j]<=a[k]]){
                    break;
                }
            }
        }
    }
  cout<<co<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:35: error: expected ')' before ']' token
   20 |                 if(a[i]+a[j]<=a[k]]){
      |                   ~               ^
      |                                   )
a.cc:20:35: error: expected primary-expression before ']' token
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n;
  cin >> n;
  
  vector<int> cont(n);
  
  for(int i = 0 ; i < n ; i++){
    cin >> cont.at(i);
  }
  
  sort(cont.begin() ; cont.end());
  
  int a = 0;
  int b = 0;
  int c = 0;
  int ans = 0;
  for(int i = 0 ; i < n ; i++){
    a = cont.at(i);
    for(int j = i+1 ; j < n ; j++){
      b = cont.at(j);
      if(a+b <= cont.at(j+1)){
        break;
      }
      for(int k = j+1 ; k < n ; k++){
        c = cont.at(k);
        if(a+b > c && b+c > a && c+a > b){
          ans++;
        }
        else{
          break;
        }
      }
    }
  }
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:20: error: expected ')' before ';' token
   13 |   sort(cont.begin() ; cont.end());
      |       ~            ^~
      |                    )
a.cc:13:33: error: expected ';' before ')' token
   13 |   sort(cont.begin() ; cont.end());
      |                                 ^
      |                                 ;
a.cc:13:31: warning: ignoring return value of 'std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::end() [with _Tp = int; _Alloc = std::allocator<int>; iterator = std::vector<int>::iterator]', declared with attribute 'nodiscard' [-Wunused-result]
   13 |   sort(cont.begin() ; cont.end());
      |                       ~~~~~~~~^~
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:893:7: note: declared here
  893 |       end() _GLIBCXX_NOEXCEPT
      |       ^~~
Language: C++

#include<iostream>
#include<algorithm>
#include<cmath>
#include<iomanip>
#include<set>
#include<map>
#include<queue>
#include<vector>
using namespace std;
typedef long long ll;
const int MOD=1e9+7;
int main() {
  ll n,a[2000]={},ans=0;
  cin >> n;
  for(int i=0; i<n; i++) {
    cin >> a[i];
  }
  sort(a,a+n);
  int x,y,z;
  for(int i=0; i<n-2; i++) {
    for(int j=i+1; j<n-1; j++) {
      x=a[i],y=a[j];
      int ite=upper_bound(a,a+n,x+y)-a.begin();
      int xx=n-1-ite+1;
      ans+=xx;
    }
  }
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:40: error: request for member 'begin' in 'a', which is of non-class type 'll [2000]' {aka 'long long int [2000]'}
   23 |       int ite=upper_bound(a,a+n,x+y)-a.begin();
      |                                        ^~~~~
Language: C++

#include <bits/stdc++.h>
#define ROOP(i, N) for(int i=0; i++; i<N)
#define RVROOP(i, N) for(int i=N; i--; i>=0)
#define INF 1e9
#define ALL(v) v.begin(), v.end()
using namespace std;
typedef long long ll;

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

  vector<int> L(N); 
  for(int i=0; i<N; i++){
    cin>>L.at(i);
  } 

  sort(L.begin(), L.end());
  
  int ans=0;

  for(int i=N-1; i>0; i--){
    if(L.at(0)+L.at(1)>L.at(i)){
      ans+=(i+1)*i
    }
    else{
      for(int j=i-1; j>0; j--){
        for(int k=j-1; k>=0; k--){
          if(L.at(k)+L.at(j)>L.at(i)){
            ans++;
          }
          else{
            break;
          }
        }
      }
    }
  }

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

Compiler output:
a.cc: In function 'int main()':
a.cc:23:19: error: expected ';' before '}' token
   23 |       ans+=(i+1)*i
      |                   ^
      |                   ;
   24 |     }
      |     ~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n;
  cin >> n;
  
  vector<int> cont(n);
  
  for(int i = 0 ; i < n ; i++){
    cin >> cont.at(i);
  }
  
  sort(cont.begin() ; cont.end());
  
  int a = 0;
  int b = 0;
  int c = 0;
  int ans = 0;
  for(int i = 0 ; i < n ; i++){
    a = cont.at(i);
    for(int j = i+1 ; j < n ; j++){
      b = cont.at(j);
      for(int k = j+1 ; k < n ; k++){
        c = cont.at(k);
        if(a+b > c && b+c > a && c+a > b){
          ans++;
        }
        else{
          break;
        }
      }
    }
  }
  
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:20: error: expected ')' before ';' token
   13 |   sort(cont.begin() ; cont.end());
      |       ~            ^~
      |                    )
a.cc:13:33: error: expected ';' before ')' token
   13 |   sort(cont.begin() ; cont.end());
      |                                 ^
      |                                 ;
a.cc:13:31: warning: ignoring return value of 'std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::end() [with _Tp = int; _Alloc = std::allocator<int>; iterator = std::vector<int>::iterator]', declared with attribute 'nodiscard' [-Wunused-result]
   13 |   sort(cont.begin() ; cont.end());
      |                       ~~~~~~~~^~
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:893:7: note: declared here
  893 |       end() _GLIBCXX_NOEXCEPT
      |       ^~~
Language: C++

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

int main() {
  int N;
  int ans = 0; 
  cin >> N;
  vector<int> bou(N);
  for (int i=0; i < N; i++) {
    cin >> bou.at(i);
  }
  sort(bou.begin(), bou.end());
  for (int i=0; i < N - 2; i++) {
    int bi = bou.at(i)
    int j = i + 1;
    while (j < N - 1) {
      int bj = bou.at(j);
      int k = j + 1;
      while (k < N) {
        int bk = bou.at(k);
        if (bi < bj + bk && bj < bk + bi &&
            bk < bi + bj) {
          ans++;
        }
        k++;
      }
      j++;
    }
  }
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:5: error: expected ',' or ';' before 'int'
   15 |     int j = i + 1;
      |     ^~~
a.cc:16:12: error: 'j' was not declared in this scope
   16 |     while (j < N - 1) {
      |            ^
Language: C++

#include <bits/stdc++.h>

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

Compiler output:
a.cc: In function 'int main()':
a.cc:16:12: error: expected ';' before '}' token
   16 |         ++S
      |            ^
      |            ;
   17 |        }
      |        ~