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

#include<stdio.h>
int main()
{
	int n,h[100000];
	int i,j,cnt;
	x=0;
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d",&h[i]);
	}
	cnt=0;
	for(i=0;i<n-1;i++){
		if(h[i]>=h[i+1]){
			cnt++;
			if(x<=cnt){
				x=cnt;
			}
		}
		else{
			cnt=0;
		}
	}
	printf("%d\n",x);
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:6:9: error: 'x' undeclared (first use in this function)
    6 |         x=0;
      |         ^
main.c:6:9: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
int main(void)
{
	int n,h[100000];
	int i,j,cnt;
	x=0;
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d",&h[i]);
	}
	cnt=0;
	for(i=0;i<n-1;i++){
		if(h[i]>=h[i+1]){
			cnt++;
			if(x<=cnt){
				x=cnt;
			}
		}
		else{
			cnt=0;
		}
	}
	printf("%d\n",x);
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:6:9: error: 'x' undeclared (first use in this function)
    6 |         x=0;
      |         ^
main.c:6:9: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
int main(void)
{
	int i,j,n,h[100000],m,w;
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d",&p[i]);
	}
	m=0;
	w=0;
	for(i=n;i>0;i--){
		if(h[i-1]>m){
			m=h[i-1];
			w++;
		}
	}
	printf("%d",w){
	return 0;
	
}

Compiler output:
main.c: In function 'main':
main.c:7:29: error: 'p' undeclared (first use in this function)
    7 |                 scanf("%d",&p[i]);
      |                             ^
main.c:7:29: note: each undeclared identifier is reported only once for each function it appears in
main.c:17:23: error: expected ';' before '{' token
   17 |         printf("%d",w){
      |                       ^
      |                       ;
main.c:20:1: error: expected declaration or statement at end of input
   20 | }
      | ^
Language: C++

#include <iostream>
using namespace std; 
int main(){
  
  int n;
  cin >> n;
  long long  arr[n];
  for (int i = 0; i < n; i++){
    cin >> arr[i];
  }
  int maxi = -1;
  for(int i = 0; i < n - 1; i++){
    if(arr[i] >= arr[i + 1]){
      cnt += 1;
      maxi = max(maxi,cnt);
      continue;
    }
    cnt = 0;
  }
  cout << cnt;
    

Compiler output:
a.cc: In function 'int main()':
a.cc:14:7: error: 'cnt' was not declared in this scope; did you mean 'int'?
   14 |       cnt += 1;
      |       ^~~
      |       int
a.cc:18:5: error: 'cnt' was not declared in this scope; did you mean 'int'?
   18 |     cnt = 0;
      |     ^~~
      |     int
a.cc:20:11: error: 'cnt' was not declared in this scope; did you mean 'int'?
   20 |   cout << cnt;
      |           ^~~
      |           int
a.cc:20:15: error: expected '}' at end of input
   20 |   cout << cnt;
      |               ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: Java

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

public class Java {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc=new Scanner(System.in);
		
		int n=sc.nextInt();
		ArrayList<Long>masu=new ArrayList<>(); 
		
		int a=0;
		int count=0;
		
		for(int i=0;i<n;i++) {
			masu.add(sc.nextLong());
		}
		System.out.println(masu);
		
		for(int i=0;i<n-1;i++) {
			if(masu.get(i+1)<=masu.get(i)) {
				count++;
			}else {
				count=0;
			}
			if(a<count) {
				a=count;
			}
		}
		
		System.out.println(a);
		sc.close();
	}
}

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

import java.util.Scanner;

public class Main {
  public static void main (String[] args) {
    Scanner in = new Scanner(System.in);

    while (in.hasNext()) {
      int N = in.nextInt():
      int[] H = new int[N];

      for (int i = 0; i < H.length; ++i) {
        H[i] = in.nextInt();
      }

      int max = 1;
      int count = 1;
      for (int i = 1; i < H.length; ++i) {
        if (H[i] <= H[i - 1]) {
          ++count;
        } else {
          max = Math.max(max, count);
          count = 1;
        }
      }
      max = Math.max(max, count);

      System.out.println(max);
    }
  }
}

Compiler output:
Main.java:8: error: ';' expected
      int N = in.nextInt():
                          ^
1 error
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:15:14: error: expected ';' before '}' token
   15 |         ans=0
      |              ^
      |              ;
   16 |       }
      |       ~       
a.cc:19:18: error: expected ';' before '}' token
   19 |   cout<<max<<endl
      |                  ^
      |                  ;
   20 | }
      | ~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main()
{
    int N;
    cin >> N;
    vector<int> A(N);
    for(int i=0; i<N; i++)
    {
        cin >> A.at(i);
    }
    int count=0;
    int max=0;
    for(int i=0; i<N-1; i++)
    {
        if(A.at(i)>=A.at(i+1))
        {
            count++;
        }
        if(max<count)
        {
            max=count;
        }
        if(A.at(i)<A.at(i+1))
        {
            count=0;
        }

    }
    cout << max << endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:30:25: error: expected '}' at end of input
   30 |     cout << max << endl;
      |                         ^
a.cc:4:1: note: to match this '{'
    4 | {
      | ^
Language: C++

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

int main(void){
    int n;
    cin >> n;
    vector<int> a(n);
    for(int i = 0;i < n;i++){
        cin >> a[i];
    }
    a.push_back(INT_MAX);
    int t = 0;
    int ans = 0;
    for(int i = 1;i < n;i++){
        if(a[i - 1] >= a[i]){
            t++;
        }else{
            ans = max(ans,t);
            t = 0;
        }
    }
    cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:17: error: 'INT_MAX' was not declared in this scope
   12 |     a.push_back(INT_MAX);
      |                 ^~~~~~~
a.cc:3:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    2 | #include <vector>
  +++ |+#include <climits>
    3 | using namespace std;
Language: C++

#include <bits/stdc++.h>
#include <math.h>
using namespace std;
#define rep(i,n) for(int i = 0; i < (int) (n); i++)
#define ll long long
ll INF = 9e17;
ll mod = 1e9 + 7;

int main() {
	int n; cin >> n;
	ll h[n];
	rep(i,n) cin >> h[i];
	reverse(h.begin(), h.end());

	int ans = 0;
	int val = 0;
	for(int i=1;i<n;i++) {
		if(h[i-1] <= h[i]) val++;
		else val = 0;
		ans = max(ans,val);
	}
	cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:19: error: request for member 'begin' in 'h', which is of non-class type 'long long int [n]'
   13 |         reverse(h.begin(), h.end());
      |                   ^~~~~
a.cc:13:30: error: request for member 'end' in 'h', which is of non-class type 'long long int [n]'
   13 |         reverse(h.begin(), h.end());
      |                              ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
    ll N;
    cin>>N;
    long long b[N];
    long long mi=0;
    long long ma=0;
    for(long long i=0;i<N;i++){
    cin>>b[i];}
    for(long long i=0;i<N;i++){
    if(b[i]>=b[i+1]){
    ma++;}
    else{
    mb=max(ma,mb);
    ma=0;}}
    cout<<mb<<endl;}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:5: error: 'mb' was not declared in this scope; did you mean 'ma'?
   16 |     mb=max(ma,mb);
      |     ^~
      |     ma
a.cc:18:11: error: 'mb' was not declared in this scope; did you mean 'ma'?
   18 |     cout<<mb<<endl;}
      |           ^~
      |           ma
Language: C++

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



int main(){

 int n; cin>>n;
 int a[n];
 for(int i=0;i<n;i++) cin>>a[i];

  int c=0;m=0;
 for(int i=0;i<n-1;i++){

    if(a[i] >= a[i+1]){
        c++;
        continue; }

    m = max(m,c);
    c = 0;
 }

 m = max(m,c);
 cout<<m<<endl;

return 0;
}

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

#include <numeric>
#include <map>
#include <cmath>
#include <iomanip>
#include <queue>
using ll =long long;
using vi = vector<int>;
using vl = vector<ll>;
using vvi = vector<vi>;
using vs = vector<string>;

int main() {
    ll N;
    cin >> N;
    vl H(N);

    for(ll i=0; i<N; i++){
        cin >> H.at(i);
    }
    ll ma = 0;
    ll sum = 0;
    for(ll i=N-1; i>0; i--){
        if(H.at(i) <= H.at(i-1)){
            sum++;
        }
        else{
            ma = max(sum, ma);
            sum = 0;
        }
    }
    cout << ma << endl;
}

Compiler output:
a.cc:7:12: error: 'vector' does not name a type
    7 | using vi = vector<int>;
      |            ^~~~~~
a.cc:8:12: error: 'vector' does not name a type
    8 | using vl = vector<ll>;
      |            ^~~~~~
a.cc:9:13: error: 'vector' does not name a type
    9 | using vvi = vector<vi>;
      |             ^~~~~~
a.cc:10:12: error: 'vector' does not name a type
   10 | using vs = vector<string>;
      |            ^~~~~~
a.cc: In function 'int main()':
a.cc:14:5: error: 'cin' was not declared in this scope; did you mean 'sin'?
   14 |     cin >> N;
      |     ^~~
      |     sin
a.cc:15:5: error: 'vl' was not declared in this scope; did you mean 'll'?
   15 |     vl H(N);
      |     ^~
      |     ll
a.cc:18:16: error: 'H' was not declared in this scope
   18 |         cin >> H.at(i);
      |                ^
a.cc:23:12: error: 'H' was not declared in this scope
   23 |         if(H.at(i) <= H.at(i-1)){
      |            ^
a.cc:27:18: error: 'max' was not declared in this scope; did you mean 'std::max'?
   27 |             ma = max(sum, ma);
      |                  ^~~
      |                  std::max
In file included from /usr/include/c++/14/bits/stl_tree.h:63,
                 from /usr/include/c++/14/map:62,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: 'std::max' declared here
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
a.cc:31:5: error: 'cout' was not declared in this scope
   31 |     cout << ma << endl;
      |     ^~~~
a.cc:31:19: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   31 |     cout << ma << endl;
      |                   ^~~~
      |                   std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/bits/quoted_string.h:38,
                 from /usr/include/c++/14/iomanip:50,
                 from a.cc:4:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include"bits/stdc++.h"
using namespace std;
#define ll long long


int main() {
    int n;
	cin >> n;
	ll ans = 0;
	ll no = 0;
	vector<LL> v(n);
	for (int i = 0; i < n; i++) {
		cin >> v[i];
		if (i > 0) {
			if (v[i] > v[i - 1]) {
				ans = max(ans, no);
				no = 0;
			}
			else {
				no++;
			}
		}
	}
	ans = max(ans, no);
	cout << ans << endl;

	return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:11:16: error: 'LL' was not declared in this scope; did you mean 'll'?
   11 |         vector<LL> v(n);
      |                ^~
      |                ll
a.cc:11:18: error: template argument 1 is invalid
   11 |         vector<LL> v(n);
      |                  ^
a.cc:11:18: error: template argument 2 is invalid
a.cc:13:25: error: invalid types 'int[int]' for array subscript
   13 |                 cin >> v[i];
      |                         ^
a.cc:15:30: error: invalid types 'int[int]' for array subscript
   15 |                         if (v[i] > v[i - 1]) {
      |                              ^
a.cc:15:37: error: invalid types 'int[int]' for array subscript
   15 |                         if (v[i] > v[i - 1]) {
      |                                     ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
typedef long long ll;
int main() {
  ll n; cin>>n;
  vector<ll> a(n);
  rep(i, n) cin>>a.at(i);
  ll cnt=0;
  vector<ll> b;
  rep(i, n) {
    if(a.at(i)>=a.at(i+1)) cnt++;
    else {
      b.push_back(cnt);
      cnt=0;
    }
  }
  sort(b.begin(), b.end());
  reverse(b.begn, b.end());
  cout << b.at(0) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:13: error: 'class std::vector<long long int>' has no member named 'begn'; did you mean 'begin'?
   19 |   reverse(b.begn, b.end());
      |             ^~~~
      |             begin
Language: C++

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

void fnInput(vector<int>& rvnSeq)
{
  int nSeqSiz;
  cin >> nSeqSiz;
  rvnSeq.resize(nSeqSiz);

  for (int& rnSeq : rvnSeq)
    cin >> rnSeq;
}
  
int fnLowerCnt(const vector<int>& cnrvnSeq)
{
  int nMaxSeqCnt = 0;
  int nBgn = 0;

  while (nBgn < cnrvnSeq.size() - 1)
  {
    int nSeqCnt = 0;
    int nFoward + 1;

    while ( nFoward < cnrvnSeq.size()  &&
            cnrvnSeq[nBgn] >= cnrvnSeq[nFoward] )
    {
      nSeqCnt++;
      nFoward++;
    }
    nMaxSeqCnt = max(nMaxSeqCnt, nSeqCnt);
    nBgn = nFoward;
  }
  return nMaxSeqCnt;
}
  
int main()
{
  vector<int> vnSeq;

  fnInput(vnSeq);
  cout << fnLowerCnt(vnSeq) << endl;

  return 0;
}

Compiler output:
a.cc: In function 'int fnLowerCnt(const std::vector<int>&)':
a.cc:22:17: error: expected initializer before '+' token
   22 |     int nFoward + 1;
      |                 ^
a.cc:24:13: error: 'nFoward' was not declared in this scope; did you mean 'nexttoward'?
   24 |     while ( nFoward < cnrvnSeq.size()  &&
      |             ^~~~~~~
      |             nexttoward
a.cc:31:12: error: 'nFoward' was not declared in this scope; did you mean 'nexttoward'?
   31 |     nBgn = nFoward;
      |            ^~~~~~~
      |            nexttoward
Language: C++

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

#define ll long long
#define pb push_back

const int maxn = 3e5 + 20;

int dp[maxn];

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

	int n;
	cin >> n;

	for(int i = 0; i < n; i++)
		cin >> a[i];

	dp[n - 1] = 1;
	for(int i = n - 2; i >= 0; i--)
	{
		if(a[i + 1] <= a[i])
			dp[i] = dp[i + 1] + 1;
		else
			dp[i] = 1;
	}

	cout << *max_element(dp , dp + n) << endl;
}







Compiler output:
a.cc: In function 'int main()':
a.cc:21:24: error: 'a' was not declared in this scope
   21 |                 cin >> a[i];
      |                        ^
a.cc:26:20: error: 'a' was not declared in this scope
   26 |                 if(a[i + 1] <= a[i])
      |                    ^
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for(int i=0; i<(n); ++i)
using namespace std;
int main() {
    int n;
    cin >> n;
    vector<int>h(n);
    rep(i,n) cin >> h[i];
    int ans=-1;
    int cnt=0;
    rep(i,n) {
        if(h[i]>=h[i+1]) cnt++;

        else {
          cnt=0;}
      ans=max(ans,cnt);}

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

Compiler output:
a.cc:19:5: error: 'cout' does not name a type
   19 |     cout << ans << endl;
      |     ^~~~
a.cc:20:5: error: expected unqualified-id before 'return'
   20 |     return 0;
      |     ^~~~~~
a.cc:21:1: error: expected declaration before '}' token
   21 | }
      | ^
Language: C++

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

void fnInput(vector<int>& rvnSeq)
{
  int nSeqSiz;
  cin >> nSeqSiz;
  rvnSeq.resize(nSeqSiz);

  for (int& rnSeq : rvnSeq)
    cin >> rnSeq;
}
  
int fnLowerCnt(const vector<int>& cnrvnSeq)
{
  int nMaxSeqCnt = 0;
  int nBgn = 0;

  while (nBgn < cnrfnSeq.size() - 1)
  {
    int nSeqCnt = 0;
    int nFoward;

    for (nFoward = nBgn; nFoward < cnrfnSeq.size() - 1; nFoward++)
      if (cnrfnSeq[nFoward] >= cnrfnSeq[nFoward + 1])
        nSeqCnt++;
      else
        break;

    nBgn = nFoward + 1;
    nMaxSeqCnt = max(nMaxSeqCnt, nSeqCnt);
  }
  return nMaxSeqCnt;
}
  
int main()
{
  vector<int> vnSeq;

  fnInput(vnSeq);
  cout << fnLowerCnt(vnSeq) << endl;

  return 0;
}

Compiler output:
a.cc: In function 'int fnLowerCnt(const std::vector<int>&)':
a.cc:19:17: error: 'cnrfnSeq' was not declared in this scope; did you mean 'cnrvnSeq'?
   19 |   while (nBgn < cnrfnSeq.size() - 1)
      |                 ^~~~~~~~
      |                 cnrvnSeq
Language: C++

#include<algorithm>
using namespace std;
int main() {
	int N;
	cin >> N;
	vector<int> H(N + 1);
	for (int i = 0; i < N; i++) {
		cin >> H[i];
	}
	int sum = 0;
	int rec = 0;
	H[N] = 100100;
	for (int i = 0; i < N ; i++) {
		if (H[i] >= H[i + 1]) {
			sum++;
		}
		else {
			rec = max(rec, sum);
			sum = 0;
		}
	}
	cout << rec << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: 'cin' was not declared in this scope
    5 |         cin >> N;
      |         ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include<algorithm>
  +++ |+#include <iostream>
    2 | using namespace std;
a.cc:6:9: error: 'vector' was not declared in this scope
    6 |         vector<int> H(N + 1);
      |         ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include<algorithm>
  +++ |+#include <vector>
    2 | using namespace std;
a.cc:6:16: error: expected primary-expression before 'int'
    6 |         vector<int> H(N + 1);
      |                ^~~
a.cc:8:24: error: 'H' was not declared in this scope
    8 |                 cin >> H[i];
      |                        ^
a.cc:12:9: error: 'H' was not declared in this scope
   12 |         H[N] = 100100;
      |         ^
a.cc:22:9: error: 'cout' was not declared in this scope
   22 |         cout << rec << endl;
      |         ^~~~
a.cc:22:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:22:24: error: 'endl' was not declared in this scope
   22 |         cout << rec << endl;
      |                        ^~~~
a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    1 | #include<algorithm>
  +++ |+#include <ostream>
    2 | using namespace std;
Language: C++

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

int main(){
	int n;
	cin>>n;
	int a[n+1];
	memset(a,0,sizeof(a))
	for(int i=1;i<=n;i++){
		cin>>a[i];
	}
	int l=1,s=0;
	int ans=-1;
	while(l<=n){
		if(a[l+1]<=a[l]){
			s++;
		}else{
			ans=max(ans,s);
			s=0;
		}
		l++;
	}
	ans=max(ans,s);
	cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:30: error: expected ';' before 'for'
    8 |         memset(a,0,sizeof(a))
      |                              ^
      |                              ;
    9 |         for(int i=1;i<=n;i++){
      |         ~~~                   
a.cc:9:21: error: 'i' was not declared in this scope
    9 |         for(int i=1;i<=n;i++){
      |                     ^
Language: C++

#include <iostream>
using namespace std; 
/* run this program using the console pauser or add your own getch, system("pause") or input loop */

int main() {
	int a;
	cin>>a;
	int n[a];
	int m[99999999]={0};
	int cnt=0,cnt1=0;
	for(int i=0;i<a;i++){
		for(int j=i+1;j<a;j++){
			if(n[j]<=n[i])cnt++;
			else {
			    m[cnt1]=cnt;
			    cnt=0;
			    cnt1++
		    }
		} 
	}
	sort[m,m+cnt1];
	cout<<m[99999998];
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:35: error: expected ';' before '}' token
   17 |                             cnt1++
      |                                   ^
      |                                   ;
   18 |                     }
      |                     ~              
a.cc:21:9: error: 'sort' was not declared in this scope; did you mean 'short'?
   21 |         sort[m,m+cnt1];
      |         ^~~~
      |         short
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main() {

	long n;
	cin >> n;

	long maxcount = 0;
	long counter = 0;
	long h=0;
	long oldh = 0;
	for (long i = 0; i < n; i++) {
		cin >> h;
		if (h <= oldh) { counter++; }
		else {
			maxcount = max(maxcount, counter);
			counter = 0; }
		oldh = h;
	}


	cout <<  max(maxcount, counter); << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:42: error: expected primary-expression before '<<' token
   24 |         cout <<  max(maxcount, counter); << endl;
      |                                          ^~
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main() {

	long n;
	cin >> n;

	long maxcount = 0;
	long counter = 0;
	long h=0;
	long oldh = 0;
	for (long i = 0; i < n; i++) {
		cin >> h;
		if (h <= oldh) { counter++; }
		else {
			maxcount = max(maxcount, counter);
			counter = 0; }
		oldh = h;
	}


	cout << maxcount = max(maxcount, counter); << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:49: error: no match for 'operator=' (operand types are 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} and 'const long int')
   24 |         cout << maxcount = max(maxcount, counter); << endl;
      |                                                 ^
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127,
                 from a.cc:1:
/usr/include/c++/14/ostream:458:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator=(std::basic_ostream<_CharT, _Traits>&&) [with _CharT = char; _Traits = std::char_traits<char>]'
  458 |       operator=(basic_ostream&& __rhs)
      |       ^~~~~~~~
/usr/include/c++/14/ostream:458:33: note:   no known conversion for argument 1 from 'const long int' to 'std::basic_ostream<char>&&'
  458 |       operator=(basic_ostream&& __rhs)
      |                 ~~~~~~~~~~~~~~~~^~~~~
a.cc:24:52: error: expected primary-expression before '<<' token
   24 |         cout << maxcount = max(maxcount, counter); << endl;
      |                                                    ^~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'll' was not declared in this scope
    5 |   ll ar[n];
      |   ^~
a.cc:8:11: error: 'ar' was not declared in this scope
    8 |      cin>>ar[i];
      |           ^~
a.cc:11:8: error: 'ar' was not declared in this scope
   11 |     if(ar[j]>=ar[j+1])
      |        ^~
Language: C++

#include<iostream>

using namespace std;

int main(){
	int n;
	cin >> n;
	int m=0,a=0,c=0,x=0;
	cin >>m;
	for(inti=1;i<n;i++)
	{
		cin>>a;
		if(a<=m)
			c++;
		else 
		{
			x=max(x,c);
			c=0;
		}
		m=a;
	}
	x=max(x,c);
	cout<<x<<endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:13: error: 'inti' was not declared in this scope; did you mean 'int'?
   10 |         for(inti=1;i<n;i++)
      |             ^~~~
      |             int
a.cc:10:20: error: 'i' was not declared in this scope
   10 |         for(inti=1;i<n;i++)
      |                    ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
int N;
  cin>>N;
  vector<int64_t>H(N);
  
  for(int i=0;i<N;i++)
    cin>>H.at(i);
  vector<int>A={-1};
  for(int i=0;i<N-1;i++)
    if(H.at(i)<H.at(i+1))
      A.push_back(i);
  A.push_back(N-1);
  int n=A.size();
  int ans=0;
  for(int i=0;i<n-1;i++)
    if(ans<=A.(i+1)-A.at(i)-1)
      ans=A.at(i+1)-A.at(i)-1;
  cout<<ans<<endl;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:15: error: expected unqualified-id before '(' token
   18 |     if(ans<=A.(i+1)-A.at(i)-1)
      |               ^
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(){
  int n;
  cin>>n;
  vector<int>a(n);
  rep(i,n) cin>>a[i];
 reverse(h.begin(),h.end());
  int ans=0;
  int val=0;
  for(int i=1;i<n;i++){
    if(h[i-1]<=h[i]) val++;
    else val=0;
    ans=max(val,ans);
  }
  cout<<ans<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:10: error: 'h' was not declared in this scope
   11 |  reverse(h.begin(),h.end());
      |          ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<ll, ll> l_l;
typedef pair<int , int> i_i;
typedef vector<ll> vl;
typedef vector<int> vi;
typedef vector<char> vec;
typedef vector<bool> veb;
typedef vector<string> ves;
typedef vector<vector<ll>> vvl;
typedef vector<vector<int>> vvi;
typedef vector<vector<char>> vvec;
typedef vector<vector<bool>> vveb;
typedef vector<vector<string>> vves;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define rep1(i,n) for(int i=1;i<(int)(n);i++)
#define rep2(i,n) for(int i=2;i<(int)(n);i++)
#define repk(i,k,n) for(int i=k;i<(int)(n);i++)
#define fs first
#define sc second
#define pb push_back
#define pp pop_back
#define all(a) a.begin(),a.end()
#define rall(a) a.rbegin(),a.rend()
#define maxel(a) *max_element(all(a))
#define minel(a) *min_element(all(a))
#define acc accumulate
#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
#define mod (1000000007)
typedef long long int64;
//const int64 INF = 1LL << 58;
#define dame { puts("-1"); return 0;}
#define YES { cout << "YES" << endl; return 0; }
#define NO { cout << "NO" << endl; return 0; }
#define Yes { cout << "Yes" << endl; return 0; }
#define No { cout << "No" << endl; return 0; }
template<class T> bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T> bool chmin(T &a, const T &b) { if (a>b) { a=b; return 1; } return 0; }
int dx[] = {0, 0, -1, 1};
int dy[] = {1, -1, 0, 0};

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

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

    cout << max(ans,tmp) << endl;
    return 0;

}

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

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

int main(){
    int N;
    cin >> N;
    vector<int> H(N+1);
    rep2(i,1,N+1) cin >> H[i];
    int ans=0;
    rep2(i,2,N+1){
        if(H[i]<=H[i-1]) asn++;
        else break;
    }
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:26: error: 'asn' was not declared in this scope; did you mean 'ans'?
   14 |         if(H[i]<=H[i-1]) asn++;
      |                          ^~~
      |                          ans
Language: Java

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc =new Scanner(System.in);
        int N = sc.nextInt();
        int[] H = new int[N];
        int preH = 0;
        int x=0;
        int y=0;
        for(int i=0;i<N;i++){
            if(i==0){
                preH = H[i];
            }else{
                preH=H[i-1];
            }
            H[i]=sc.nextInt();
            if(preH<H[i]){
                x=0;
            }
            else{
                x=x+1;
                preH = H[i];
                if(x>y){
                    y=x;
                }
            }
        }
        System.out.println(y);
        sc.close();

        
        }
    }

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

#include<bits/stdc++.h>
using namespace std;
int main()
{
    long long n,h,m=0,mi=0,p,i;
    //vector<long long>a;
    cin>>n;
    for(i=0;i<n;i++)
    {
        cin>>h;
        a.push_back(h);
        if(i==0)
            p=h;
        else
        {
            if(h<=p)
                m++;
            else
            {
                if(m>mi)
                    mi=m;
                m=0;
            }
        }
        p=h;
    }
    if(m>mi)
        mi=m;
    cout<<mi<<endl;
}




Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: 'a' was not declared in this scope
   11 |         a.push_back(h);
      |         ^
Language: C++

#include <iostream>
using namespace std;
int main()
{
  int n; cin>>n;
  int arr[n];
  for(int i = 0; i < n; i++)
    cin>>arr[i];
  int ans = 0;
  int cnt = 0;
  for(int i = 0; i < n; i++)
  {
    if(arr[i] >= arr[j]) cnt++;
    else
    {
      ans = max(ans,cnt);
      cnt = 0;
    }
  }
  cout<<max(ans,cnt);
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:22: error: 'j' was not declared in this scope
   13 |     if(arr[i] >= arr[j]) cnt++;
      |                      ^
Language: C

#include <stdio.h>
​
int main(){
  int N, b, a; int move = 0;int max = 0; 
  scanf("%d %d",&N, &b); 
	for (int i = 1; i < N; i++){
		scanf("%d",&a); 
    if(b >= a) move++;
    else{
      if(move > max) max = move;
      move = 0;
    }
    b = a;
	}
  if(move > max) max = move; // N番目の要素の後にも処理が必要
  printf("%d", max);
}


Compiler output:
main.c:2:1: error: expected ';' before 'int'
    2 | ​
      | ^
      | ;
    3 | int main(){
      | ~~~
Language: C++

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

  int main() {
    int N
    cin >> N ;
    vector<int> H(N);
    vector<int> count(N);
    int upd=0;
    int j=0;

    for (int i=0; i<N; i++)
      cin >> H.at(i);

    for (int i=0; i<N-1; i++){
      if(H.at(i)>=H.at(i+1)){
        count.at(j)++ ;
        if(upd<count.at(j))
          upd=count.at(j)
        }
      else
        j++;
      
      }
    
    cout << upd << endl;
      
      
      
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: expected initializer before 'cin'
    6 |     cin >> N ;
      |     ^~~
a.cc:7:19: error: 'N' was not declared in this scope
    7 |     vector<int> H(N);
      |                   ^
a.cc:19:26: error: expected ';' before '}' token
   19 |           upd=count.at(j)
      |                          ^
      |                          ;
   20 |         }
      |         ~
Language: Java

import java.util.*;

class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[] H = new int[N];
		Arrays.setAll(H, i->sc.nextInt());
		int ans = 0;
		int tmp = 0;
		
		for (int j=0; j<N-i-1; j++) {
			if (H[i+j] >= H[i+j+1]) {
				tmp++;
			} else {
				break;
			}
		}
		ans = Math.max(ans, tmp);
		System.out.println(ans);
	}
}


Compiler output:
Main.java:12: error: cannot find symbol
		for (int j=0; j<N-i-1; j++) {
		                  ^
  symbol:   variable i
  location: class Main
Main.java:13: error: cannot find symbol
			if (H[i+j] >= H[i+j+1]) {
			      ^
  symbol:   variable i
  location: class Main
Main.java:13: error: cannot find symbol
			if (H[i+j] >= H[i+j+1]) {
			                ^
  symbol:   variable i
  location: class Main
3 errors
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[] H = new int[N];
                for(int i = 0; i < N; i++) {
                        H[i] = sc.nextInt();
                } 
                int cnt = 0, max = 0, h = H[0];
                for(int i = 1; i < N; i++) {
                        if(h >= H[i]) cnt++;
                        else cnt = 0;
                        if(max < cnt) max = cnt;
                        h1 = H[i];
                } 
                sc.close();
                System.out.println(max);
        }
}



Compiler output:
Main.java:16: error: cannot find symbol
                        h1 = H[i];
                        ^
  symbol:   variable h1
  location: class Main
1 error
Language: Java

import java.util.Scanner;

public class Main {
        public static void main(String[] args) {
                new Thread(null, new Main(), "", 16 * 1024 * 1024).start(); //16MBスタックを確保して実行
        }
        public void run() {
                Scanner sc = new Scanner(System.in);
                int N = sc.nextInt();
                long h1 = sc.nextLong();
                int cnt = 0, max = 0, read = 0;
                do {
                        long h2 = sc.nextLong();
                        if(h1 >= h2) cnt++;
                        else cnt = 0;
                        if(max < cnt) max = cnt;
                        h1 = h2;
                        read++;
                } while(read < N - 1);
                sc.close();
                System.out.println(max);
        }
}


Compiler output:
Main.java:5: error: incompatible types: Main cannot be converted to Runnable
                new Thread(null, new Main(), "", 16 * 1024 * 1024).start(); //16MB???????????
                                 ^
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
1 error
Language: C++

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

int main(){
    //input
    int n;
    cin >> n;
    vector<int> h(n);
    for(auto& i : h){
        cin >> i;
    }
    //calculate
    int max = 0;
    int tmp_max = 0;
    for(int i=0; i<n; i++){
        if((i != n-1) and (h.at(i) >= h.at(i+1)))//右に進める場合
        {
            tmp_max++;
        }
        else//右に進めない場合
        {
          	max = max(max,tmp_max);
          	tmp_max = 0;
        }
    }
    //output
    cout << max << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:26: error: 'max' cannot be used as a function
   22 |                 max = max(max,tmp_max);
      |                       ~~~^~~~~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for(ll i = 0; i < (ll)(n); i++)
#define rep2(i, a, n) for(ll i = a; i < (ll)(n); i++)
#define memi cout << endl
#define kono(n) cout << fixed << setprecision(n)
#define all(c) (c).begin(), (c).end()
#define pb push_back
#define hina cout << ‘ ‘
const ll mei = (ll)1e9 + 7;

int main(){
  ll n, k;
  cin >> n;
  vector<ll> a(n);
  vector<ll> b(n);
  rep(i, n)
    cin >> a[i];
  reverse(all(a));
  b[0] = 0;
  rep(i, 1, n){
    if(a[i - 1] > a[i])
      b[i] = 0;
    else
      b[i] = b[i - 1] + 1;
  }
  k = 0;
  rep(i, n)
    k = max(k, b[i]);
  cout << k;
  memi;
}

Compiler output:
a.cc:10:22: error: extended character ‘ is not valid in an identifier
   10 | #define hina cout << ‘ ‘
      |                      ^
a.cc:10:24: error: extended character ‘ is not valid in an identifier
   10 | #define hina cout << ‘ ‘
      |                        ^
a.cc:22:14: error: macro "rep" passed 3 arguments, but takes just 2
   22 |   rep(i, 1, n){
      |              ^
a.cc:4:9: note: macro "rep" defined here
    4 | #define rep(i, n) for(ll i = 0; i < (ll)(n); i++)
      |         ^~~
a.cc: In function 'int main()':
a.cc:22:3: error: 'rep' was not declared in this scope
   22 |   rep(i, 1, n){
      |   ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
	int a,b;
	cin >> a >> b;
	while(--a)
	{
		cin >> c;
		if(c>b)
		{
			e=max(e,d);
			d=0;
		}
		else
	        ++d;
	    b=c;
	}
	cout << max(e,d) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:24: error: 'c' was not declared in this scope
    9 |                 cin >> c;
      |                        ^
a.cc:12:25: error: 'e' was not declared in this scope
   12 |                         e=max(e,d);
      |                         ^
a.cc:12:33: error: 'd' was not declared in this scope
   12 |                         e=max(e,d);
      |                                 ^
a.cc:16:19: error: 'd' was not declared in this scope
   16 |                 ++d;
      |                   ^
a.cc:19:21: error: 'e' was not declared in this scope
   19 |         cout << max(e,d) << endl;
      |                     ^
a.cc:19:23: error: 'd' was not declared in this scope
   19 |         cout << max(e,d) << endl;
      |                       ^
Language: C++

#include <cstdio>
using namespace std;
int main() {
    int N, max = 0, H, prevH = 0, cnt = 0;
    cin >> N;
    for (int i = 0; i < N; i++) {
        scanf("%d%*c", &H);
        if (H <= prevH) cnt++;
        else {
            if (cnt > max) max = cnt;
            cnt = 0;
        }
        prevH = H;
    }
    if (cnt > max) max = cnt;
  	printf("%d\n", max);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: error: 'cin' was not declared in this scope
    5 |     cin >> N;
      |     ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include <cstdio>
  +++ |+#include <iostream>
    2 | using namespace std;
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
template<class T> inline bool chmax(T& a,T b){if(a<b){a=b;return true;}return false;}
template<class T> inline bool chmin(T& a,T b){if(a>b){a=b;return true;}return false;}
const ll INF = 1LL<<60;


int main()
{
  ll h[100100];
  ll N;cin>>N;
  for(ll i=0;i<N;i++)cin>>h[i];
  for(ll i=1;i<N;i++){
    if(h[i-1]>=h[i])dp[i]=dp[i-1]+1;
  }
  ll ans=0;
  for(ll i=0;i<N;i++)chmax(ans,dp[i]);
  cout<<ans<<endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:21: error: 'dp' was not declared in this scope; did you mean 'dup'?
   15 |     if(h[i-1]>=h[i])dp[i]=dp[i-1]+1;
      |                     ^~
      |                     dup
a.cc:18:32: error: 'dp' was not declared in this scope; did you mean 'dup'?
   18 |   for(ll i=0;i<N;i++)chmax(ans,dp[i]);
      |                                ^~
      |                                dup
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
template<class T> inline bool chmax(T& a,T b){if(a<b){a=b;return true;}return false;}
template<class T> inline bool chmin(T& a,T b){if(a>b){a=b;return true;}return false;}
const ll INF = 1LL<<60;

ll h[100100];

int main()
{
  ll N;cin>>N;
  for(ll i=0;i<N;i++)cin>>h[i];
  for(ll i=1;i<N;i++){
    if(h[i-1]>=h[i])dp[i]=dp[i-1]+1;
  }
  ll ans=0;
  for(ll i=0;i<N;i++)chmax(ans,dp[i]);
  cout<<ans<<endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:21: error: 'dp' was not declared in this scope; did you mean 'dup'?
   15 |     if(h[i-1]>=h[i])dp[i]=dp[i-1]+1;
      |                     ^~
      |                     dup
a.cc:18:32: error: 'dp' was not declared in this scope; did you mean 'dup'?
   18 |   for(ll i=0;i<N;i++)chmax(ans,dp[i]);
      |                                ^~
      |                                dup
Language: C++

#include <iostream>
using namespace std;

int main() {
	int n;
	cin >> n;
	int arr[n];
	for(int i = 0; i < n; i++){
		cin >> arr[i];
	}
	
	int mx = 0;
	int count = 0
	
	for(i = 1; i < n; i++){
		if(arr[i] <= arr[i - 1]){
			count++;
		}
		else{
			mx = max(mx, count);
			count = 0;
		}
	}
	mx  = max(mx, count);
	cout << mx;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:9: error: expected ',' or ';' before 'for'
   15 |         for(i = 1; i < n; i++){
      |         ^~~
a.cc:15:20: error: 'i' was not declared in this scope
   15 |         for(i = 1; i < n; i++){
      |                    ^
Language: C++

#include <iostream>
using namespace std;

int main() {
	int n;
	cin >> n;
	int arr[n];
	for(int i = 0; i < n; i++){
		cin >> arr[i];
	}
	
	int mx = 0;
	int count = 0
	
	for(i = 1; i < n; i++){
		if(arr[i] <= arr[i - 1]){
			count++;
		}
		else{
			mx = max(mx, count);
			count = 0
		}
	}
	mx  = max(mx, count);
	cout << mx;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:9: error: expected ',' or ';' before 'for'
   15 |         for(i = 1; i < n; i++){
      |         ^~~
a.cc:15:20: error: 'i' was not declared in this scope
   15 |         for(i = 1; i < n; i++){
      |                    ^
Language: C++

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

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

  int cnt = -1, max = 0;
  int hh = 1001001001;
  rep(i, n){
    int h;
    cin >> h;
    if(hh >= h) cnt++;
    else max = max(max, cnt); cnt = 0;
    hh = h;
  }

  cout << max << endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:19: error: 'max' cannot be used as a function
   15 |     else max = max(max, cnt); cnt = 0;
      |                ~~~^~~~~~~~~~
Language: C++

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


int main()
{
	int n;
	cin >> n;
	vector<int> a(n);
	for (int i = 0; i < n; i++)
	{
		cin >> a.at(i);
	}

	int t;
	vector<int> b(n);
	for (int i = 0; i < n; i+=1+t)
	{
		t = 0;
		for (int j = i; j < n-1; j++)
		{
			if (a.at(j) >= a.at(j + 1))
				t++;
			else
				break;
		}
		b.at(i) = t;

	}
	int M = *max_element(b.begin(), b.end());
	cout << M << endl;


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

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package main;

import java.util.Scanner;

/**
 *
 * @author Nour
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
Scanner in=new Scanner(System.in);
int x=in.nextInt();
int i=0;

int sum=0;


while((x!=i)){

    sum=sum+i;
    i++;
}
System.out.print(sum);

}
}

Compiler output:
a.cc:6:1: error: 'package' does not name a type
    6 | package main;
      | ^~~~~~~
a.cc:8:1: error: 'import' does not name a type
    8 | import java.util.Scanner;
      | ^~~~~~
a.cc:8:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:14:1: error: expected unqualified-id before 'public'
   14 | public class Main {
      | ^~~~~~
Language: C++

#include <iostream>
#include <bits/stdc++.h>
using namespace std;
int main()
{

int n,k=0,sum=0;
    cin>>n;
    arr[n];
    for(int i=0;i<n;i++)
    {
        cin>>arr[i];
    }
    for(int i=0;i<n-1;i++)
    {
        if(arr[i]>=arr[i+1])
        {
            k++;

          sum = max(sum,k);

        }
        else
        {
            k=0;
        }
    }
    cout<<sum;



    return 0;
}



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

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

int main()
{
    int Max=0,cu=0,n,x,y=0;
    scanf("%d",&n);
    scanf("%d",&y);
    n--;
    while(n--){
      scanf("%d",&x);
      if(x<=y){
        cu++;
      }
      else{
        if(Max<cu){
            Max=cu;
        }
        c=0;
      }
      y=x;
    }
    if(Max<cu){
        Max=cu;
        }
    printf("%d",Max);
    return 0;
}


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

#include <iostream>

using namespace std;

int main()
{
    int n;
    cin>>n;
    int a[n];
    for(int i=0;i<n;i++){
        cin>>a[i];
    }
    int re=0;
    for(int i=0;i<n;i++){
        int m=0;
        for(int i2=i+1;i2<n;i2++){
            if(a[i2-1]>=a[i2]){
                m++;
            }else{
                break;
            }
        }
        i=i2-1;
        re=max(re,m);
    }
    cout<<re<<endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:23:11: error: 'i2' was not declared in this scope; did you mean 'i'?
   23 |         i=i2-1;
      |           ^~
      |           i
Language: C++

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

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

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

int main() {
  int n;
  cin >> n;
  vectro<int> h(n);
  rep(i, n) cin >> h[i];
  reverse(h.begin(), h.end());
  int ans = 0;
  int val = 0;
  for ( int i = 1; i < n; i++) {
    if(h[i-1] <= h[i]) val++;
    else val = 0;
    ans = max(ans, val);
  }
  cout << ans << endl;
  return 0;
}

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

#include <bits/stdc++.h>
using namesapce std;
const int MAX_N = 100005;
int a[MAX_N];
int main() {
	int n;
  	scanf("%d", &n);
    for(int i=0; i<n; i++) scanf("%d", &a[i]);
    int i, mx=0;
    for(i=n-1; i>=0; i--) {
       if(a[i]>=mx) mx=a[i];
       else break;
    }
  	printf("%d\n", n-i-1);
  
 	return 0; 
}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namesapce'
    2 | using namesapce std;
      |       ^~~~~~~~~
Language: C++

// at_abc139c.cpp : This file contains the 'main' function. Program execution begins and ends there.
//

#include <iostream>
#include<vector>
#include<algorithm>
using namespace std;
const int MOD = 1e9 + 7;
int main()
{
    int num;cin >> num;
    vector<int>v(num, 0);
    int best, cur, curnum;
    best = cur = 0;
    for (int i = 0;i < num;i++) {
        cin >> v[i];
    }
    curnum = MOD;
    for (int i = 0;i < num;i++) {
        if (curnum >= v[i]) {
            cur++;
            curnum = v[i];
          //5
            10 4 8 7 3  cout << v[i];
        }
        else {
            cur = 1;
            curnum = v[i];
        }
        best = max(best, cur);
    }
    cout << best-1 << "\n";
}

// Run program: Ctrl + F5 or Debug > Start Without Debugging menu
// Debug program: F5 or Debug > Start Debugging menu

// Tips for Getting Started: 
//   1. Use the Solution Explorer window to add/manage files
//   2. Use the Team Explorer window to connect to source control
//   3. Use the Output window to see build output and other messages
//   4. Use the Error List window to view errors
//   5. Go to Project > Add New Item to create new code files, or Project > Add Existing Item to add existing code files to the project
//   6. In the future, to open this project again, go to File > Open > Project and select the .sln file


Compiler output:
a.cc: In function 'int main()':
a.cc:24:15: error: expected ';' before numeric constant
   24 |             10 4 8 7 3  cout << v[i];
      |               ^~
      |               ;
Language: C

#include<stdio.h>
int main(){
  int n,i,k;
  scanf("%d",&n);
  int H[n],Max[n];
  for(i=0;i<n;i++){
    scanf("%d",&H[i]);
   }
  for(i=0;i<n;i++){
    for(k=i;H[k]>=H[k+1];k++){
      Max[i]=k;
      if(k==n-1) break;
      }
    }
  int ans=0
  for(i=0;i<n;i++){
    if(ans<=Max[i])ans=Max[i];
    }
  printf("%d",Max);
  return 0;
 }
    
      


Compiler output:
main.c: In function 'main':
main.c:16:3: error: expected ',' or ';' before 'for'
   16 |   for(i=0;i<n;i++){
      |   ^~~
main.c:16:18: error: expected ';' before ')' token
   16 |   for(i=0;i<n;i++){
      |                  ^
      |                  ;
main.c:16:18: error: expected statement before ')' token