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

#include <bits/stdc++.h>
//Remove below header file if c++ version greater than 14
#include <vector>
#include <algorithm>
#include <set>
#include <map>
#include <set>
#include <unordered_set>
#include <unordered_map>

#define ll long long int
#define pb push_back
#define mp make_pair
#define all(X) X.begin(), X.end()
#define fastIO ios_base::sync_with_stdio(false); cin.tie(nullptr);
#define endl '\n'
#define deb(x) cout << #x << " "<< x << endl;
#define fo(i, n) for(i=0; i<n; i++)
#define Fo(i, k, n) for(i=k; i<n; i++)

using namespace std;
using mii=map<int, int>;
using mll=map<ll, ll>;
using pii=pair<int,int>;
using pll=pair<ll,ll>;
using vi=vector<int>;
using vll=vector<ll>;
const int mod = 1000000007;

ll desc(ll x, ll y)
{
    return x > y;
}

int main() {
    fastIO
    int n, i;
    cin >> n;

    vector<int> arr(n, 0);

    fo(i, n)
    cin >> arr[i];

    int max_count = INT_MIN;
    int cur = 0;
    for(i = n - 2; i >= 0; i--)
    {
        if(arr[i] >= arr[i + 1])
            cur += 1;
        else
            cur = 0;

        max_count = __max(max_count, cur);
    }
    cout << max_count << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:54:21: error: '__max' was not declared in this scope
   54 |         max_count = __max(max_count, cur);
      |                     ^~~~~
Language: C++

#include<iostream>

using namespace std;

int max(int n, int dp[n]){
    int ans = 0;

    for(int i = 0; i < n; i++){
        if(ans < dp[i]){
            ans = dp[i];
        }
    }
    return ans;
}

int main(){
    int n;
    int j = 0;
    cin >> n;

    int array[n];
    int dp[n];

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

    for(int i = 0; i < n - 1; i++){
        if(array[i] >= array[i + 1]){
            dp[j]++;
            //cout << "h";
        }else{
            //cout << "w";
            j++;
        }
    }

    int ans = max(n, dp);

    cout << ans;
}


Compiler output:
a.cc:5:24: error: use of parameter outside function body before ']' token
    5 | int max(int n, int dp[n]){
      |                        ^
a.cc: In function 'int max(...)':
a.cc:8:24: error: 'n' was not declared in this scope
    8 |     for(int i = 0; i < n; i++){
      |                        ^
a.cc:9:18: error: 'dp' was not declared in this scope
    9 |         if(ans < dp[i]){
      |                  ^~
Language: C

#include <stdio.h>

int main(){
  int i,j,l=0,m,n=0,o=0;
  scanf("%d",j);
  for(i=0;i<j;i++){
    scanf("%d",m);
    if(l>=n){
      n++
    }else{
      if(n>o){
        o=n;
      }
      n=0;
    }
    l=m;
  }
  if(n>o){
  	o=n;
  }
  printf("%d",o);
}

Compiler output:
main.c: In function 'main':
main.c:9:10: error: expected ';' before '}' token
    9 |       n++
      |          ^
      |          ;
   10 |     }else{
      |     ~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
    long logn int t,a=0;
    cin >> t;
    vector<long long int> v(t);
    for(int i=0;i<t;i++)
        cin >> v[i];
    for(int i=t-2;i>=0;i--){
        if(v[i]>=v[i+1])
            a++;
        else
        break;
    }
       
        cout << a<< endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:15: error: expected initializer before 'int'
    4 |     long logn int t,a=0;
      |               ^~~
a.cc:5:12: error: 't' was not declared in this scope; did you mean 'tm'?
    5 |     cin >> t;
      |            ^
      |            tm
a.cc:11:13: error: 'a' was not declared in this scope
   11 |             a++;
      |             ^
a.cc:16:17: error: 'a' was not declared in this scope
   16 |         cout << a<< endl;
      |                 ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
// マクロ
#define rep(i,n) for (int i = 0; i < (int)(n); i++)
// 型エイリアス
using ll = long long;
using vi = vector<int>;
using vs = vector<string>;
using vvi = vector<vi>;
using vvs = vector<vs>;

int main() {
    int n;
    cin >> n;
    vi h(n);
    rep(i,n) cin >> h[i];
    int ans = 0;
    for(int i = 0; i < n-1; ) {
        if(h[i] >= h[i+1]) {
            while(i != n && h[i] >= h[i+1]) {
                ans++;
                i += 1;
            }
        }
        else if(i++;)
    }
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:21: error: expected primary-expression before ')' token
   25 |         else if(i++;)
      |                     ^
a.cc:26:5: error: expected primary-expression before '}' token
   26 |     }
      |     ^
Language: C++

#include <bits/stdc++.h>
#define int long long
#define rep(i,n) for(int i=0;i<n;++i)
#define all(a) a.begin(),a.end()
#define P pair<long long,long long>
#define double long double
using namespace std;
//桁
int kt(int a){
  double b=a;
  b=log10(b);
  int c=b;
  return c+1;
 }
int lcm(int a,int b){
  int d=a,e=b,f;
  if(a<b)
    swap(a,b);
  int c,m=1;
  while(m){
    c=a%b;
    if(c==0){
       f=b;
      m--;
    }
    else{
      a=b;
      b=c;
 }
  }
  return d*e/f;
    }
  int gcm(int a,int b){
      int d=a,e=b,f;
  if(a<b)
    swap(a,b);
  int c,m=1;
  while(m){
    c=a%b;
    if(c==0){
       f=b;
      m--;
    }
    else{
      a=b;
      b=c;
 }
  }
  return f;
  }
signed main(){
  int a;
  cin>>a;
  vector<int> b(a);
  rep(i,a)
    cin>>b[i];
  int d=0;
  rep(i,a-1){
    if(b[i]<b[i+1])
      c=0;
  else{
    c++;
    if(d<c)
      d=c;
  }
  }
  cout<<d;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:60:7: error: 'c' was not declared in this scope
   60 |       c=0;
      |       ^
a.cc:62:5: error: 'c' was not declared in this scope
   62 |     c++;
      |     ^
Language: C++

num = int(input())
A = [int(i) for i in input().split()]
max_move=0
tmp=0
for i in range(0,num-1):
    if(A[i] >= A[i+1]):
        tmp=tmp+1
        if(i+1==num-1 and max_move< tmp):
            max_move=tmp
    else:
        if(max_move<tmp):
            max_move=tmp
        tmp=0
print(max_move)


Compiler output:
a.cc:1:1: error: 'num' does not name a type; did you mean 'enum'?
    1 | num = int(input())
      | ^~~
      | enum
Language: C++

#include <bits/stdc++.h>
#define int long long
#define rep(i,n) for(int i=0;i<n;++i)
#define all(a) a.begin(),a.end()
#define P pair<long long,long long>
#define double long double
using namespace std;
//桁
int kt(int a){
  double b=a;
  b=log10(b);
  int c=b;
  return c+1;
 }
int lcm(int a,int b){
  int d=a,e=b,f;
  if(a<b)
    swap(a,b);
  int c,m=1;
  while(m){
    c=a%b;
    if(c==0){
       f=b;
      m--;
    }
    else{
      a=b;
      b=c;
 }
  }
  return d*e/f;
    }
  int gcm(int a,int b){
      int d=a,e=b,f;
  if(a<b)
    swap(a,b);
  int c,m=1;
  while(m){
    c=a%b;
    if(c==0){
       f=b;
      m--;
    }
    else{
      a=b;
      b=c;
 }
  }
  return f;
  }
signed main(){
  int a;
  cin>>a;
  vector<int> b(a);
  rep(i,a)
    cin>>b[i];
  int d=0;
  rep(i,a-1){
    if(b[i]<b[i+1])
      c=0;
  else{
    c++;
    if(d<c)
      d=c;
  }
  }
  cout<<c;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:60:7: error: 'c' was not declared in this scope
   60 |       c=0;
      |       ^
a.cc:62:5: error: 'c' was not declared in this scope
   62 |     c++;
      |     ^
a.cc:67:9: error: 'c' was not declared in this scope
   67 |   cout<<c;
      |         ^
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[] H = new int[N];
        int max = 0;
        int count = 0;
        for(int i = 0; i < N; i++){
        	H[i] = sc.nextInt();
        }
      	for(int j = 0; j < N-1; j++){
        	if(H[j] >= H[i+1]){
            	count++;
            }else{
            	if(max < count){
                	max = count;
                }
                count = 0;
            }
          
        }
      	if(max < count){
                max = count;
        }
        System.out.println(max);
	}
 
}

Compiler output:
Main.java:14: error: cannot find symbol
        	if(H[j] >= H[i+1]){
        	             ^
  symbol:   variable i
  location: class Main
1 error
Language: C++

using namespace std;
int main()
{
  int n;
  int h[100100];
  cin >> n;
  for (int i = 0; i < n; ++i) {
    cin >> h[i];
  }
  int ans = 1, curans = 1;
  for (int i = n - 2; i >= 0; --i) {
    if (h[i + 1] <= h[i])
      curans++;
    else {
      ans = max(curans, ans);
      curans = 1;
    }
  }
  std::cout << max(curans, ans) - 1 << std::endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin >> n;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:15:13: error: 'max' was not declared in this scope
   15 |       ans = max(curans, ans);
      |             ^~~
a.cc:19:8: error: 'cout' is not a member of 'std'
   19 |   std::cout << max(curans, ans) - 1 << std::endl;
      |        ^~~~
a.cc:19:8: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:19:16: error: 'max' was not declared in this scope
   19 |   std::cout << max(curans, ans) - 1 << std::endl;
      |                ^~~
a.cc:19:45: error: 'endl' is not a member of 'std'
   19 |   std::cout << max(curans, ans) - 1 << std::endl;
      |                                             ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | using namespace std;
Language: C++

from sys import stdin

if __name__ == '__main__':
    N = int( stdin.readline().rstrip() )
    H = [int(x) for x in stdin.readline().rstrip().split()]
    
    H = dict( zip( range(len(H)), H ) )

    maxv = 0
    count = 0
    for i in range( len(H) - 1 ):
        a = H[i]
        b = H[i+1]
        if a >= b:
            count += 1
        else:
            if maxv < count:
                maxv = count
            count = 0
    if maxv < count:
        maxv = count
    print(maxv)

Compiler output:
a.cc:3:16: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
    3 | if __name__ == '__main__':
      |                ^~~~~~~~~~
a.cc:1:1: error: 'from' does not name a type
    1 | from sys import stdin
      | ^~~~
Language: C++

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

int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    int n, ans = 0, fans = 0;
    cin >> n;
    ll pr, curr;
    pr = curr = 0;
    for (int i = 0; i < n; i++)
    {
        cin >> cur;
        if (pr == 0)
        {
            pr = cur;
            continue;
        }
        if (cur - pr <= 0)
        {
            ans++;
        }
        else
        {
            fans = max(ans, fans);
            ans = 0;
        }
        pr = cur;
    }
    cout << fans << endl;
    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:15:16: error: 'cur' was not declared in this scope; did you mean 'curr'?
   15 |         cin >> cur;
      |                ^~~
      |                curr
Language: C++

#include <stdio.h>
int main(){
  int num=0,i=0,j=0,temp=0;
  scanf("%d",&num);
  int height[num],times[num]={0};
  scanf("%d",height);
  for(i=0;i<num;i++){
    for(j=1;j<num-i;j++){
      while(height[i+j-1]>=height[i+j]){
        times[i]++;
      }
    }
  }
  for(i=1;i<num;i++){
    if(times[0]<time[i]){
      times[0]=times[i];
    }
  }
  printf("%d\n",height[0]);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:17: error: 'time' was not declared in this scope
   15 |     if(times[0]<time[i]){
      |                 ^~~~
a.cc:2:1: note: 'time' is defined in header '<ctime>'; this is probably fixable by adding '#include <ctime>'
    1 | #include <stdio.h>
  +++ |+#include <ctime>
    2 | int main(){
Language: Java

public class Main {

    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int N = s.nextInt();
        int H[] = new int[N];
        for (int i = 0; i < N; i++) {
            H[i] = s.nextInt();
        }

        int longestStreak = 0;
        int streak = 0;
        int h = H[0];
        for (int i = 1; i < N; i++) {
            if (H[i-1] >= H[i]) {
                streak += 1;
            } else {
                if (longestStreak < streak) {
                    longestStreak = streak;
                }
                streak = 0;
            }
        }
        if (longestStreak < streak) {
            longestStreak = streak;
        }

        System.out.println(longestStreak);
    }

}


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

#include<stdio.h> 
#include<string.h> 
int main() { 
  int n,a[100000],i,s;
  scanf("℅d",&n);
  for(i=0;i<n;i++){ 
    scanf("%d",&a[i]); 
   
  sort(a.begin(),a.end()); 
   } 
  s = a[0]-1;
  printf("℅d",s);
  return 0;
  }

Compiler output:
main.c: In function 'main':
main.c:9:3: error: implicit declaration of function 'sort' [-Wimplicit-function-declaration]
    9 |   sort(a.begin(),a.end());
      |   ^~~~
main.c:9:9: error: request for member 'begin' in something not a structure or union
    9 |   sort(a.begin(),a.end());
      |         ^
main.c:9:19: error: request for member 'end' in something not a structure or union
    9 |   sort(a.begin(),a.end());
      |                   ^
Language: C++

#include<bits/stdc++.h>
#define pb push_back
#define mp make_pair
const int MAXN = 1e6+20;
const long long INF = 1e16;
using namespace std;

int n,ans,kol;
int a[MAXN];
int main()
{
 
	ios_base::sync_with_stdio(0);
 
//	freopen("longpath.in", "r", stdin);
//	freopen("longpath.out", "w", stdout);



	cin>>n;
	ans = 0;
	for (int i=1; i<=n; i++) cin>>a[i];
	for (int i=n-1; i>=1; i--)
	{
		if (a[i] >= a[i+1]) kol++;
		ans = max(ans,kol);
		if (a[i]<a[i+1]) kol = 0;
	}
	)
	cout<<ans<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:29:9: error: expected primary-expression before ')' token
   29 |         )
      |         ^
Language: C++

#include <set>
#include <map>
#include <list>
#include <queue>
#include <stack>
#include <cmath>
#include <ctime>
#include <cstdio>
#include <vector>
#include <string>
#include <bitset>
#include <cctype>
#include <cstdlib>
#include <cstring>
#include <utility>
#include <numeric>
#include <complex>
#include <sstream>
#include <fstream>
#include <iomanip>
#include <cassert>
#include <iostream>
#include <iterator>
#include <algorithm>
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++)
template<class T, class C> void chmax(T& a, C b){ a>b?:a=b; }
template<class T, class C> void chmin(T& a, C b){ a<b?:a=b; }

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

    ll n,k,ans1=0,ans2=0;
	cin >> n;
	ll h[n];
	rep(i,n){
		cin >> h[i];
	}

	rep(i,n-1){
		if(h[i]>=h[i+1]){
			ans2++;
		}
		else if(ans2>ans1){
			ans1=ans2
			ans2=0;
		}
	}

	cout << ans1 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:54:34: error: expected ';' before 'ans2'
   54 |                         ans1=ans2
      |                                  ^
      |                                  ;
   55 |                         ans2=0;
      |                         ~~~~
Language: C++



  for(i=1;i<n+1;i++){
    if(max<b[i])max=b[i];
  }

  cout << max << endl;
  return 0;
}

Compiler output:
a.cc:3:3: error: expected unqualified-id before 'for'
    3 |   for(i=1;i<n+1;i++){
      |   ^~~
a.cc:3:11: error: 'i' does not name a type
    3 |   for(i=1;i<n+1;i++){
      |           ^
a.cc:3:17: error: 'i' does not name a type
    3 |   for(i=1;i<n+1;i++){
      |                 ^
a.cc:7:3: error: 'cout' does not name a type
    7 |   cout << max << endl;
      |   ^~~~
a.cc:8:3: error: expected unqualified-id before 'return'
    8 |   return 0;
      |   ^~~~~~
a.cc:9:1: error: expected declaration before '}' token
    9 | }
      | ^
Language: C++

#include <set>
#include <map>
#include <list>
#include <queue>
#include <stack>
#include <cmath>
#include <ctime>
#include <cstdio>
#include <vector>
#include <string>
#include <bitset>
#include <cctype>
#include <cstdlib>
#include <cstring>
#include <utility>
#include <numeric>
#include <complex>
#include <sstream>
#include <fstream>
#include <iomanip>
#include <cassert>
#include <iostream>
#include <iterator>
#include <algorithm>
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++)
template<class T, class C> void chmax(T& a, C b){ a>b?:a=b; }
template<class T, class C> void chmin(T& a, C b){ a<b?:a=b; }

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

    int n,k,ans1=0,ans2=0;
	cin >> n;
	ll h[n];
	rep(i,n){
		cin >> h[i];
	}

	rep(i,n-1){
		if(h[i]>=h[i+1]){
			ans2++;
		}
		else if(ans2>ans1){
			ans1=ans2
			ans2=0;
		}
	}

	cout << ans1 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:54:34: error: expected ';' before 'ans2'
   54 |                         ans1=ans2
      |                                  ^
      |                                  ;
   55 |                         ans2=0;
      |                         ~~~~
Language: Java

import java.util.Scanner;
public class Main{
 public static void main(String[] args){
   Scanner sc = new Scanner(System.in);
   int N = sc.nextInt();
   int[] Hi = new int Hi[N];
   int count =0;
   int countmem =0;
   for(int i=0;i<N;i++) Hi[i]= sc.nextInt();
   for(int i =0;i<N-1;i++){
    if(Hi[i] >= Hi[i+1]) count++;
    else{
     if(countmem < count) countmem = count;
     count =0;
    }
   }
   
   
System.out.println(countmem);   
   
 }
}

Compiler output:
Main.java:6: error: '[' expected
   int[] Hi = new int Hi[N];
                     ^
Main.java:6: error: ']' expected
   int[] Hi = new int Hi[N];
                           ^
2 errors
Language: C++

#include<bits/stdc++.h>
 
using namespace std;
const int maxn=1e5+100;
int dp[maxn],a[maxn];
 
int Lis(int n)
{
    int len=1,i,low,high,mid;
    dp[1]=a[1];
    for(i=2;i<=n;i++)
    {
       low=1;
       high=len;
       while(low<=high)
       {
           mid=(low+high)/2;
           if(a[i]<dp[mid])
               low=mid+1;
           else
               high=mid-1;
       }
       dp[low]=a[i];
       if(low>len)
           len=low;
    }
    return len;
}
int main()
{
    int n,i,ans;
	scanf("%d",&n);
        for(i=1;i<=n;i++)
        {
            scanf("%d",&a[i]);
        }
        int ans=0,maxx=0;
       	for(int i=1;i<n;i++){
       		if(a[i]>=a[i+1]){
       			ans++;	
       			maxx=max(ans,maxx);
			}else{
				ans=0;
			}
		}
		cout<<maxx<<endl; 
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:37:13: error: redeclaration of 'int ans'
   37 |         int ans=0,maxx=0;
      |             ^~~
a.cc:31:13: note: 'int ans' previously declared here
   31 |     int n,i,ans;
      |             ^~~
Language: C++

#include<bits/stdc++.h>
#define N 100005
using namespace std;
int n;
int H[N];
int dp[N];
void solve(){
	scanf("%d",&n);
	for(int i=1;i<=n;i++)
		scanf("%d",&H[i]);
	int ans=0;
	dp[n+1]=-1;
	for(int i=n;i>=1;i--){
		if(H[i]>=aH[i+1])dp[i]=dp[i+1]+1;
		else dp[i]=0;
		ans=max(ans,dp[i]);
	}
	printf("%d\n",ans);
}
int main(){
    solve();
    return 0;
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:14:26: error: 'aH' was not declared in this scope; did you mean 'H'?
   14 |                 if(H[i]>=aH[i+1])dp[i]=dp[i+1]+1;
      |                          ^~
      |                          H
Language: C++

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

int main() {
  int n;
  cin>>n;
  vector<int> mao(n);
  for (int i=0; i<n; i++) {
    cin>>mao.at(i);
  }
  
  int answer=0;
  int research =0;
  for (int i=0; i<n-1; i++) {
    if (mao.at(i) >= mao.(i+1))
      research++;
    
    else {
      if (answer<research)
        answer = research;
      
      research = 0;
    }
  }
  
  cout<< answer<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:26: error: expected unqualified-id before '(' token
   15 |     if (mao.at(i) >= mao.(i+1))
      |                          ^
Language: C++

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

ll num[101010];

int main() {
    int N;
    cin >> N;
    vector<ll> H(N);
    rep(i, N) cin >> H[i];

    rep(i, N-1) {
        if (H[i] >= H[i+1]) {
            num[i] = 1;
        }
    }
    rep(i, N+1) 

    ll ma = 0;
    for (int i=1; i<=N; ++i) {
        if (num[i-1] != 0 and num[i] != 0) {
            num[i] += num[i-1];
            ma = max(ma, num[i]);
        }
    }

    cout << ma << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:26:13: error: 'ma' was not declared in this scope; did you mean 'fma'?
   26 |             ma = max(ma, num[i]);
      |             ^~
      |             fma
a.cc:30:13: error: 'ma' was not declared in this scope; did you mean 'fma'?
   30 |     cout << ma << endl;
      |             ^~
      |             fma
Language: C++

#include<iostream>
#include<bits/stdc++.h>
using namespace std;
#define ll long long int
int main()
{
  ll n;cin>>n;
  ll a[n];
  for(ll i=0;i<n;++i)
    cin>>a[i];
  ll maxx=0,f=0;
  for(ll i=1;i<n;++i)
  {
     if(a[i] >= a[i-1]
        ++f;
     else
        f=0;
        maxx=max(maxx,f);
  }
        cout<<maxx;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:11: error: expected ';' before 'f'
   15 |         ++f;
      |           ^
      |           ;
a.cc:16:6: error: expected primary-expression before 'else'
   16 |      else
      |      ^~~~
a.cc:15:13: error: expected ')' before 'else'
   15 |         ++f;
      |             ^
      |             )
   16 |      else
      |      ~~~~    
a.cc:14:8: note: to match this '('
   14 |      if(a[i] >= a[i-1]
      |        ^
Language: C++

#include <bits/stdc++.h>
#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#define FOR(i,j,n) for(int i=(j);i<=((int)n);++i)
#define N 1000005
#define MOD 1000000007
#define all(c) (c).begin(),(c).end()
#define tr(container, it) for(__typeof(container.begin()) it = container.begin(); it != container.end(); it++)
#define present(container, element) (container.find(element) != container.end())
#define cpresent(c,x) (find(all(c),x) != (c).end())
#define pb push_back
typedef long long int ll;
typedef std::vector< int > vi;
typedef std::vector< vi > vvi;
typedef std::pair< int,int > ii;
using namespace std;

vector <int>g[N];
void init()
{
	for(int i = 0; i < N; i++) {
		g[i].clear();
	}
}


int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int n;
    cin>>n;
    int h[n+6];
    FOR(i,1,n)
    cin>>a[i];
    int x[n+5];
    x[n]=0;
    int m=0;
    for (int i=n-1;i>=1;i--)
    {
    	if (h[i]>=h[i+1])
    	x[i]=1+x[i+1];
    	else
    	x[i]=0;
    	m=max(m,x[i]);
	}
	cout<<m<<endl;
}





Compiler output:
a.cc: In function 'int main()':
a.cc:41:10: error: 'a' was not declared in this scope
   41 |     cin>>a[i];
      |          ^
Language: C++

#include<bits/stdc++.h>

using namespace std;

typedef unsigned long long ull;
typedef long long ll;
typedef pair<int, int> ii;
typedef vector<ii> vii;
typedef vector<int> vi;

#define PI (2*acos(0.0))
#define eps 1e-9
#define pcase cout<<"Case "<<++cs<<": "
#define pb push_back
#define endl "\n"
#define watch(x) cout << (#x) << " is " << (x) << endl;
#define show(v) for(int fi = 0; fi < v.size(); fi++) cout << v[fi] << " "; cout << endl;
#define showpair(v) for(int fi = 0; fi < v.size(); fi++) cout << v[fi].first << " " << v[fi].second << endl;
#define mp make_pair
#define ff first
#define ss second
#define fu cout << "lol" << endl;
#define precision(n) cout << fixed << setprecision(n);
#define lb lower_bound
#define up upper_bound
#define vscan for(i = 0;i<n;i++){cin>>in; v.pb(in);}
#define all(a) a.begin(), a.end()

int main()
{
    int i = 0, j = 0, cs = 0, in;
    int n; cin>>n;
    vi v; vscan; v.pb(-1);
    cnt = 0;
    for(i = 0; i < v.size(); i++){
        if(v[i+1] > v[i]) break;
        else cnt++;
    }
    
    cout  << cnt << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:34:5: error: 'cnt' was not declared in this scope; did you mean 'int'?
   34 |     cnt = 0;
      |     ^~~
      |     int
Language: C

#include <iostream>

using namespace std;

int main(){
  int N;
  cin >> N;
  int H[N];
  int i, j;
  for(i=0; i<N; i++)
    cin >> H[i];

  int max = 0;
  int count = 0;
  for(i=N-1; i>0; i=j-1){
    count = 0;
    j = i;
    while(H[j-1] >= H[j]){
      //  cout << H[j-1] << "&" << H[j] << endl;
      count++;
      j--;
    }
    if(max < count)
      max = count;
    
  }

  cout << max << endl;

  return 0;
}


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

#include <bits/stdc++.h>
#define ll long long
#define rep(X,N) for(ll X = 0; X < (N); X++)
#define PI (acos(-1.0))
#define pback push_back
#define mpair make_pair
#define MODN 1000000007
#define ALL(V) (V).begin(),(V).end()

using namespace std;

int main(){

    int m;
    cin >> n;

    vector<int> v;
    rep(i,n){
        int tmp;
        cin >> tmp;

        v.pback(tmp);
    }

    int ans = 0;
    int tmp = 0;

    rep(i,n - 1){
        if(v[i] >= v[i + 1]){
            tmp++;
        }else{
            tmp = 0;
        }
        ans = max(ans,tmp);
    }

    cout << ans << endl;

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:12: error: 'n' was not declared in this scope
   15 |     cin >> n;
      |            ^
Language: C++

#include<iostream>
#include<vector>
#include<map>
#define rep(i, n) for (lli i = 0; i < (n); i++)
#define rrep(i, n) for (lli i = (n)-1; i >= 0; i--)
using namespace std;
using lli = long long int;
int main(){
	int n;
	cin >> n;
	vector<lli> h(n);
	rep(i,n)cin >> h[i];
	vector<lli> ans(n);
	rrep(i,n){
	  if(i==n-1)ans[i]=0;
	  else {
		  if(h[i] >= h[i+1]){
			  ans[i]  = ans[i+1] + 1;
		  }else{
			  ans[i] = 0;
		  }
	  }
	}
	cout << *std::max_element(ans.begin(),ans.end())<<endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:24:23: error: 'max_element' is not a member of 'std'; did you mean 'tuple_element'?
   24 |         cout << *std::max_element(ans.begin(),ans.end())<<endl;
      |                       ^~~~~~~~~~~
      |                       tuple_element
Language: C++

#include<btis/stdc++.h>
using namespace std;
int main(){
  long long n;
  cin>>n;
  --n;
  cout<<(n*(n-1))/2-1<<'\n';
  return 0;
}

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

#include <bits/stdc++.h>
using namespace std;
#define ll long long int

int main() {
	ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    ll n;
    cin>>n;
   ll ans= n*(n-1);
  if(ans==0)
    cout<<ans;
  else
    cout<<ans/=2;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:14: error: no match for 'operator/=' (operand types are 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} and 'int')
   14 |     cout<<ans/=2;
      |     ~~~~~~~~~^~~
Language: C

main(long n){scanf("%ld",&n);printf("%ld",n*n--/2);}

Compiler output:
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
    1 | main(long n){scanf("%ld",&n);printf("%ld",n*n--/2);}
      | ^~~~
main.c: In function 'main':
main.c:1:14: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    1 | main(long n){scanf("%ld",&n);printf("%ld",n*n--/2);}
      |              ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | main(long n){scanf("%ld",&n);printf("%ld",n*n--/2);}
main.c:1:14: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    1 | main(long n){scanf("%ld",&n);printf("%ld",n*n--/2);}
      |              ^~~~~
main.c:1:14: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:30: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    1 | main(long n){scanf("%ld",&n);printf("%ld",n*n--/2);}
      |                              ^~~~~~
main.c:1:30: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:30: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:1:30: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C++

#include<bits/stdc++.h>
int main(){
  long long n;
  cin>>n;
  cout<<n*(n-1)/2;
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    4 |   cin>>n;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:5:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    5 |   cout<<n*(n-1)/2;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

#include<iostream> 
using namespace std;

int main()
{
  int n;
  cin>>n;
  ll ans=n-1;
  ans=ans*(ans+1)/2;
  cout<<ans;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: 'll' was not declared in this scope
    8 |   ll ans=n-1;
      |   ^~
a.cc:9:3: error: 'ans' was not declared in this scope; did you mean 'abs'?
    9 |   ans=ans*(ans+1)/2;
      |   ^~~
      |   abs
Language: C

#include<stdio.h>
int main()
{
long long int n;
  scanf("%lld",&n);
  printf("%lld",(n*(n-1))/2)
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:29: error: expected ';' before 'return'
    6 |   printf("%lld",(n*(n-1))/2)
      |                             ^
      |                             ;
    7 | return 0;
      | ~~~~~~
Language: C++

#include <bits/stdc++.h>
#define REP(i,n) for (int i = 0; i <(n); ++i)
#define REP2(i,x,n) for (int i = x; i <(n); ++i)
#define ALL(v) v.begin(), v.end()
#define RALL(v) v.rbegin(), v.rend()
using namespace std;
using ll = long long;
using P = pair<int,int>;
static const double PI = acos(-1);
static const int INF = 1e9+7;



int main(){
  int n;
  cin >> n;
  ll ans = 0;
  REP(i,n) ans += i;

  cout << ans
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:14: error: expected ';' before 'return'
   20 |   cout << ans
      |              ^
      |              ;
   21 |   return 0;
      |   ~~~~~~
Language: C++

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

int32_t main(){
	boost;
	int n;
	cin >> n;
	int ans = (n - 1)*(n)/2;
	cout << ans << endl;	
}



Compiler output:
a.cc: In function 'int32_t main()':
a.cc:6:9: error: 'boost' was not declared in this scope
    6 |         boost;
      |         ^~~~~
Language: Java

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();
		
		long ans = N * (N - 1) / 2;
		System.out.println(ans);
	}

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

#include <iostream>
using namespace std;

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

    ans=(N-1)*N/2;

    cout << ans << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
    8 |     ans=(N-1)*N/2;
      |     ^~~
      |     abs
Language: C++

#include <bits/stdc++.h>  // include all standard C++ libraries

using namespace std;

// Loops
#define _overload3(_1,_2,_3,name,...) name
#define _rep(i,n) repi(i,0,n)
#define repi(i,a,b) for(int i=int(a);i<int(b);++i)
#define _rrep(i,n) rrepi(i,n,0)
#define rrepi(i,a,b) for(int i=int(a)-1;i>=int(b);--i)

#define rep(...) _overload3(__VA_ARGS__,repi,_rep,)(__VA_ARGS__)
#define rrep(...) _overload3(__VA_ARGS__,rrepi,_rrep,)(__VA_ARGS__)
#define each(xi, x) for (auto&& xi : x)
// Note: we can use rep(i,N) or rep(i,from,to)


// typedef
template <class T> using vec = vector<T>;
using ll = long long;
using vi   = vec<int>;
using vvi  = vec<vi>;
using vvvi = vec<vvi>;
using pii  = pair<int, int>;


// Constants

// Shorter repr for frequently used terms
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define Fi first
#define Se second


// Algorithms
#define all(x) (x).begin(), (x).end()
#define uniq(v) v.erase( unique(all(v)), v.end() )
#define perm(c) sort(all(c));for(bool c##p=1;c##p;c##p=next_permutation(all(c)))

template<class T> pair<T, size_t> max(vector<T> &x){ auto it = max_element(all(x)); return mp(*it, it-x.begin()); }
template<class T> pair<T, size_t> min(vector<T> &x){ auto it = min_element(all(x)); return mp(*it, it-x.begin()); }

template<class T> inline bool chmax(T &maxval, const T &newval) { if (maxval<newval) { maxval=newval; return 1; } return 0; }
template<class T> inline bool chmin(T &minval, const T &newval) { if (minval>newval) { minval=newval; return 1; } return 0; }

// Utilities
// Grid world utilities
int dx[4]={0,1,0,-1};
int dy[4]={1,0,-1,0};
#define inside(H,W,y,x) 0<=(x) && (x)<(W) && 0<=(y) && (y)<(H)

inline int in() {int x; cin >> x; return x;} // read int from cin
inline  ll IN() {ll x; cin >> x; return x;}  // read ll from cin



// Debug
#ifdef LOCAL
  #include "dump.hpp"
  #define debug(x) cerr << #x << ": " << x << '\n'
#else
  #define dump(...)
  #define debug(x)
#endif

// Paste snippets here!!

// 

int main(){
  cin.tie(0); ios::sync_with_stdio(false);    // Magic for faster cin
  ll n = In();
  cout << n * (n-1)  / 2 << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:74:10: error: 'In' was not declared in this scope; did you mean 'in'?
   74 |   ll n = In();
      |          ^~
      |          in
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
	long long n;cin>>n;
  cout<<(n(*n+1))/2-n;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:12: error: invalid type argument of unary '*' (have 'long long int')
    5 |   cout<<(n(*n+1))/2-n;
      |            ^~
a.cc:5:16: error: 'n' cannot be used as a function
    5 |   cout<<(n(*n+1))/2-n;
      |                ^
Language: Java

import java.util.Scanner;

public calss Main {
  public static void main (String[] args) {
    Scanner in = new Scanner(System.in);
    
    while (in.hasNext()) {
      long N = in.nextLong();
      
      System.out.println( (N * (N - 1)) / 2);
    }
  }
}

Compiler output:
Main.java:3: error: class, interface, enum, or record expected
public calss Main {
       ^
Main.java:4: error: unnamed classes are a preview feature and are disabled by default.
  public static void main (String[] args) {
                ^
  (use --enable-preview to enable unnamed classes)
Main.java:13: error: class, interface, enum, or record expected
}
^
3 errors
Language: C++

#include<bits//stdc++.h>
using namespace std;
int main(){
  int n;cin >> n;
  cout << n * (n - 1) / 2;<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:27: error: expected primary-expression before '<<' token
    5 |   cout << n * (n - 1) / 2;<<endl;
      |                           ^~
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;

#define vi vector<int>
#define vl vector<long long>
#define vvi vector< vector<int> >
#define vvl vector< vector<ll> >
#define vp vector<P>
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define REPD(i, n) for (int i = (int)(n-1); i >= 0; i--)
#define FOR(i, a, b) for (int i = (int)(a); i < (int)(b); i++)
#define FORD(i, a, b) for (int i = (int)(a); i >= (int)(b); i--)
#define INF 1e18
#define INFTY 1e9
const int mod = 998244353;
#define SIZE_OF_ARRAY(array) (sizeof(array)/sizeof(array[0]))

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

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

//cout << fixed << setprecision(10) << y << endl;
struct edge {int to, cost;};
vector< vector<edge> > es;
const int MAX_N = 10010;

int main() {
    int n;
    cin >> n;
    ll res = n*(n-1)/2;
    cout << res << endl;
    return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:46:14: error: expected '}' at end of input
   46 |     return 0;
      |              ^
a.cc:41:12: note: to match this '{'
   41 | int main() {
      |            ^
Language: C++

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

int main(){
  ll n;
  cin >> n;

  cout << (n*(n+1)/2)-n << endl;

  return 0;
}


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

#include<bits/stdc++.h>
#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
	long long n;
  	cin >> n;
  	long long ans = 0
  	ans = (n-1)*n/2;
  	cout << ans <<endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: expected ',' or ';' before 'ans'
   10 |         ans = (n-1)*n/2;
      |         ^~~
Language: C++

#include<bits/stdc++.h>
#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
	int n;
  	cin >> n;
  	int ans = 0
  	ans = (n-1)*n/2;
  	cout << ans <<endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: expected ',' or ';' before 'ans'
   10 |         ans = (n-1)*n/2;
      |         ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll =long long int;
constexpr ll mod = 1e12;
int main()
{
	int n; cin >> n;
	ll ans = 0;
	n--;
    cout<<n(n+1)/2;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:12: error: 'n' cannot be used as a function
   10 |     cout<<n(n+1)/2;
      |           ~^~~~~
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int,int>;
 
int main() {
  cin >> N;
  N = N * (N-1) /2;
  cout << N << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:10: error: 'N' was not declared in this scope
    8 |   cin >> N;
      |          ^
Language: C++

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

int main() {
  cin << N;
  N = N * (N-1) /2;
  cout >> N >> endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:10: error: 'N' was not declared in this scope
    8 |   cin << N;
      |          ^
Language: C++

#include<iostream>
#include<list>
 
using namespace std;
int main(){
	long N;
 
	cin >> N;
 
	cout << N * ( N – 1 ) / 2;
	return 0;
}

Compiler output:
a.cc:10:25: error: extended character – is not valid in an identifier
   10 |         cout << N * ( N – 1 ) / 2;
      |                         ^
a.cc: In function 'int main()':
a.cc:10:24: error: expected ')' before '\U00002013'
   10 |         cout << N * ( N – 1 ) / 2;
      |                     ~  ^~
      |                        )
Language: C++

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

int main() {
  int N, ans;
  cin >> N;
  
  ans = N * (N-1) / 2;
  
  cout << ans << endl;

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

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

#define rep(inc, bgn, end) for (int inc = bgn; inc < end; ++inc)
#define repe(inc, bgn, end) for (int inc = bgn; inc <= end; ++inc)

using ll = long long;
using namespace std;

//  -d
int main() {
    int n;
    cin >> n;
    ll ans = n * (n - 1);
    ll ans /= 2;
    printf("%lld\n", ans);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:12: error: expected initializer before '/=' token
   17 |     ll ans /= 2;
      |            ^~
Language: C

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

int main(){
    long long N;
    cin >> N;
    long long ans = 0LL;
    for(int i=1; i<= N-1; i++){
        ans += i;
    }
    cout << ans << endl;
    return 0;
}

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

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

int main(){
  int n;
  cin >> n
  
  long long ans = n*(n-1)/2;
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:11: error: expected ';' before 'long'
    6 |   cin >> n
      |           ^
      |           ;
    7 | 
    8 |   long long ans = n*(n-1)/2;
      |   ~~~~     
a.cc:9:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
    9 |   cout << ans << endl;
      |           ^~~
      |           abs
Language: C++

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

int main(){
  ll N;
  cin>>N;
  cout<<(1+N)(N-1)/2<<endl;
  
}



Compiler output:
a.cc: In function 'int main()':
a.cc:8:14: error: expression cannot be used as a function
    8 |   cout<<(1+N)(N-1)/2<<endl;
      |         ~~~~~^~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
  ll n,c,m=0;
  cin>>n;
/*  int ar[n],j=1;
  ar[1]=n;
  for(int i=2;i<=n;i++){
    ar[i]=j;
    j++;
  }
  for(int k=1;k<=n;k++) 
    m=m+ar[k]%k;*/
  m=n(n-1)/2;
  cout<<m;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:6: error: 'n' cannot be used as a function
   15 |   m=n(n-1)/2;
      |     ~^~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=1;i<(int)(n);i++)
#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
typedef long long ll;
#define _GLIBCXX_DEBUG
typedef vector<int> vec;
typedef vector<ll> lvec;
typedef vector<char>cvec;
typedef pair<ll, ll> LP;
typedef tuple<ll, ll, ll> LT;
typedef pair<int, int> P;
typedef tuple<int, int, int> T;
int main()	{
  ll n;
  ll sum=0;
  cin>>n;
  sum=n*(n-1)/2;
  }
  cout<<sum<<endl;
}

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

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=1;i<(int)(n);i++)
#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
typedef long long ll;
#define _GLIBCXX_DEBUG
typedef vector<int> vec;
typedef vector<ll> lvec;
typedef vector<char>cvec;
typedef pair<ll, ll> LP;
typedef tuple<ll, ll, ll> LT;
typedef pair<int, int> P;
typedef tuple<int, int, int> T;
int main()	{
  ll n;
  ll sum=0;
  cin>>n;
  sum=n(n-1)/2;
  }
  cout<<sum<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:8: error: 'n' cannot be used as a function
   19 |   sum=n(n-1)/2;
      |       ~^~~~~
a.cc: At global scope:
a.cc:21:3: error: 'cout' does not name a type
   21 |   cout<<sum<<endl;
      |   ^~~~
a.cc:22:1: error: expected declaration before '}' token
   22 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
  ll N;
  cin>>N;
  cout<<N*(N-1)/2<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'll' was not declared in this scope
    4 |   ll N;
      |   ^~
a.cc:5:8: error: 'N' was not declared in this scope
    5 |   cin>>N;
      |        ^
Language: C++

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


int main(){
  long long N;
  cin>>N;
  cout<<(N-1)*N/2
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:18: error: expected ';' before '}' token
    8 |   cout<<(N-1)*N/2
      |                  ^
      |                  ;
    9 | }
      | ~
Language: C++

#define _GLIBCXX_DEBUG
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define rep(i,N) for(int i = 0;i < (int)(N);i++)
int main(){
  ll h;
  cin>>n;
  cout<<n*(n-1)/2<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:8: error: 'n' was not declared in this scope
    8 |   cin>>n;
      |        ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define lvector vector<ll> 
#define lque queue<ll>
#define lpque priority_queue<ll>
#define dlpque priority_queue<ll,lvector,greater<ll>>
#define P pair<ll,ll>
#define ALL(a) (a).begin(),(a).end()
#define rep(i,n) for(ll (i)=0; (i)<(n); ++(i))
#define print(a) cout << (a) << endl

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  ll n;cin>>n;
  print(n(n-1)/2);
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:10: error: 'n' cannot be used as a function
   17 |   print(n(n-1)/2);
      |         ~^~~~~
a.cc:11:27: note: in definition of macro 'print'
   11 | #define print(a) cout << (a) << endl
      |                           ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define lvector vector<ll> 
#define lque queue<ll>
#define lpque priority_queue<ll>
#define dlpque priority_queue<ll,lvector,greater<ll>>
#define P pair<ll,ll>
#define ALL(a) (a).begin(),(a).end()
#define rep(i,n) for(ll (i)=0; (i)<(n); ++(i))
#define print(a) cout << (a) << endl

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  ll n;
  print(n(n-1)/2);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:10: error: 'n' cannot be used as a function
   17 |   print(n(n-1)/2);
      |         ~^~~~~
a.cc:11:27: note: in definition of macro 'print'
   11 | #define print(a) cout << (a) << endl
      |                           ^
Language: C++

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


int main() {
  int64_t n;
  cin >> n;
  int64_t k;
  k = n * (n-1) / 2
  cout << k << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:20: error: expected ';' before 'cout'
    9 |   k = n * (n-1) / 2
      |                    ^
      |                    ;
   10 |   cout << k << endl;
      |   ~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll,ll>;
using Map = map<string,ll>;

int main(){
    ll N;
    cin >> N;
    cout<<N(N-1)/2<<endl;
return 0;
}  



Compiler output:
a.cc: In function 'int main()':
a.cc:10:12: error: 'N' cannot be used as a function
   10 |     cout<<N(N-1)/2<<endl;
      |           ~^~~~~
Language: C++

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

const ll inf = 1e18+7
const ll mod = 1e9+7

int main () {
	int N;
  	cin >> N;
  	cout << N * (N-1) / 2 << endl;
  	return 0;
}


Compiler output:
a.cc:4:7: error: 'll' does not name a type
    4 | const ll inf = 1e18+7
      |       ^~
Language: C++

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

const ll inf = 1e18+7
const ll mod = 1e9+7

int main () {
	int N;
  	cin >> N;
  	cout << N * (N-1) / 2 << endl;
}


Compiler output:
a.cc:4:7: error: 'll' does not name a type
    4 | const ll inf = 1e18+7
      |       ^~