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

#include<stdio.h>
int main(){
  int n,i;
  scanf("%d",&n);
  int H[n],Max[n];
  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:7:9: error: 'k' undeclared (first use in this function)
    7 |     for(k=i;H[k]>=H[k+1];k++){
      |         ^
main.c:7:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:13:3: error: expected ',' or ';' before 'for'
   13 |   for(i=0;i<n;i++){
      |   ^~~
main.c:13:18: error: expected ';' before ')' token
   13 |   for(i=0;i<n;i++){
      |                  ^
      |                  ;
main.c:13:18: error: expected statement before ')' token
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+1;H[i]>=H[k];k++){
      if(k==n-1) break;
      }
    max[i]=k-i;
    }
  int Ans=max[0];
  for(i=0;i<n;i++){
    if(Ans<max[i])Ans=max[i];
    }
  return 0;
  }

Compiler output:
main.c: In function 'main':
main.c:7:21: error: expected ';' before '}' token
    7 |     scanf("%d",H[i])
      |                     ^
      |                     ;
    8 |     }
      |     ~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int n,a[10004];
vector<int> v;
int main(){
  cin>>n;
  cin>>a[0];
  int karians=0;
  for(int i=1;i<n;i++{
    cin>>a[i];
    if(a[i]>=a[i-1])karians++;
    else {
      v.push_back(a[i]);
      karians=0;
    }
  }
  v.push_back(karians);
  sort(v.begin(),v.end());
  cout<<v[v.size()-1]<<endl;
      }

Compiler output:
a.cc: In function 'int main()':
a.cc:9:22: error: expected ')' before '{' token
    9 |   for(int i=1;i<n;i++{
      |      ~               ^
      |                      )
Language: C++

# include<bits/stdc++.h>
using namespace std;
int main(){
  long int n;
  cin >> n;
  
  long int arr[n];
  for(int i = 0; i < n; i++)
  	cin >> arr[i];
    
  int j = 0, maxi = 0;
  while(j < n){
    int temp = 1;
    for(int i = j; i < n-1; i++){
    	if(arr[i] > arr[i+1]-1) temp += 1;
        else break;
    }
    if(temp > maxi) maxi = temp;
j += temp

}
cout << maxi <<'\n';

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:10: error: expected ';' before '}' token
   19 | j += temp
      |          ^
      |          ;
   20 | 
   21 | }
      | ~
Language: C++

# include<bits/stdc++.h>
using namespace std;
int main(){
  long int n;
  cin >> n;
  
  long int arr[n];
  for(int i = 0; i < n; i++)
  	cin >> arr[i];
    
  int j = 0, maxi = 0;
  while(j < n){
    int temp = 1;
    for(int i = j; i < n-1; i++){
    	(arr[i] > arr[i+1]-1)? temp += 1 : break;
    }
    if(temp > maxi) maxi = temp;
j += temp

}
cout << maxi <<'\n';

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:44: error: expected primary-expression before 'break'
   15 |         (arr[i] > arr[i+1]-1)? temp += 1 : break;
      |                                            ^~~~~
a.cc:18:10: error: expected ';' before '}' token
   18 | j += temp
      |          ^
      |          ;
   19 | 
   20 | }
      | ~
Language: C++

#include"bits/stdc++.h"
#include<boost/multi_array.hpp>
#include<boost/optional.hpp>
#include<boost/range/irange.hpp>
#include<boost/range/algorithm.hpp>
#include<boost/range/adaptors.hpp>
using namespace std;
namespace adaptor = boost::adaptors;

#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)
#define rep3(i,m,n) for(int (i)=m;(i)<=(n);(i)++)
#define rep3rev(i,m,n) for(int (i)=m;(i)>=(n);(i)--)
typedef long long ll;

void Main()
{
	int N;
  	cin >> N;
  	vector<int> B(N);
  	rep(i,N) cin >> H[i];
  	
  	int count = 0;
  	int tempmax = 0;
  	rep(i,N-1) {
      if(H[i] >= H[i+1]){
      	count++;
      }
      else{
      	tempmax = max(tempmax, count);
        count = 0;
      }
    }
    tempmax = max(tempmax, count);
  	cout << tempmax << endl;
	return;
}

int main()
{
	cin.tie(nullptr);
	ios_base::sync_with_stdio(false);
	cout << fixed << setprecision(15);
	Main();
	return 0;
}

Compiler output:
a.cc:2:9: fatal error: boost/multi_array.hpp: No such file or directory
    2 | #include<boost/multi_array.hpp>
      |         ^~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

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

int main() {
  int N;
  cin >> N;
  vector<int> vec(N);
  for (int i = 0; i < N; i++) {
    cin >> vec.at(i);
  }
  for (int i = 0; i < N; i++) {
    int sum = 0;
    for (int j = i; j < N; j++) {
      if (vec.at(j) > vec.at(j+1)) {
        sum++;
        int a = sum;
        int sum_max = max(sum,a);
      }
      else
        break;
    }
  }
  cout << sum_max << endl;
  
      

}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:11: error: 'sum_max' was not declared in this scope
   23 |   cout << sum_max << endl;
      |           ^~~~~~~
Language: C++

#include<bits/stdc++.h>
#define pb push_back
#define pair pair<int,int>
#define ll long long
#define f first
#define se second
using namespace std;
double pi=acos(-1.0);
int main(){
int n;
  scanf("%d",&n);
  int dp[n];
  dp[0]=1;
  int xp,x;
  scanf("%d",&xp);
  int ans=1;
  for(int i=1;i<n;i++)
  {
    scanf("%d",&x);
    if(x>xp)
      dp[i]=1;
    else
      dp[i]=dp[i-1]+1;
    ans=max(ans,dp);
    xp=x;
  }
  printf("%d",ans);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:12: error: no matching function for call to 'max(int&, int [n])'
   24 |     ans=max(ans,dp);
      |         ~~~^~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:24:12: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'int [n]')
   24 |     ans=max(ans,dp);
      |         ~~~^~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:24:12: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   24 |     ans=max(ans,dp);
      |         ~~~^~~~~~~~
Language: C++

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

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

#include <bits/stdc++.h>
#include <set>
#include <cstdio>
#include <vector>
#include <iostream>
#include <utility>

#define fir first
#define sec second
#define get(n) scanf("%d",&n);
#define gets(s) string s;cin >> (s);
#define All(s) (c).begin(), (c).end()
#define chmin(x, y) x = min(x, y);
#define chmax(x, y) x = max(x, y);
#define rep(i, j) for (int (i)=0;(i)<(j);(i)++)
#define repk(i, j, k) for(int (i)=(j);(i)<(k);(i)++)
#define dump(x)  cout << #x << " = " << (x) << endl;
#define debug(x) cout << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;
using namespace std;
typedef long long int ll;
const ll INF = 10241024;
int N;
vector<int> P;

void input(){
    cin >> N;
    rep(i, N){
        cin >> P[i];
        //cout << P[i] << endl;
    }
}

void solve(){
    input();
    int ans = 0;
    int score = 0;
    bool ok = true;
    
    for (int i=0;i<N-1;i++) {
        if(ok && P[[i] > P[i+1]){
            score++;
        }else if(!ok && P[i] > P[i+1]){
            ok = true;
            score = 1;
        }else if(ok && P[i] < P[i+1]){
            ok = false;
            chmin(ans ,score);
            score = 0;
        }
    }
    cout << ans << endl;
}
int main () {
    solve();
    return 0;
}
    }
}



Compiler output:
a.cc: In function 'void solve()':
a.cc:40:19: error: two consecutive '[' shall only introduce an attribute before '[' token
   40 |         if(ok && P[[i] > P[i+1]){
      |                   ^
a.cc:40:19: error: expected ')' before '[' token
   40 |         if(ok && P[[i] > P[i+1]){
      |           ~       ^
      |                   )
a.cc: At global scope:
a.cc:57:5: error: expected declaration before '}' token
   57 |     }
      |     ^
a.cc:58:1: error: expected declaration before '}' token
   58 | }
      | ^
Language: C

#include<stdio.h>
int main(){
    int n;
    scanf("%d",&n);
    int h[100001];
    int i;
    for(i=1;i<=n;i++){
        scanf("%d",&h[i]);
    }
    h[n+1] = _CRT_INT_MAX;
    int j = 1;
    int count=0;
    while(1){
        i=0;
        while(1){
            if(h[j+i]>=h[j+i+1]){
               // printf("true\n");
                i++;
            }
            else{
               // printf("false\n");
                if(count<i-1){
                count = i-1;
                }
                j = j+i+1;
                break;
            }

        }
        if(j>n){
            break;
        }
    }
    printf("%d\n",count);
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:14: error: '_CRT_INT_MAX' undeclared (first use in this function)
   10 |     h[n+1] = _CRT_INT_MAX;
      |              ^~~~~~~~~~~~
main.c:10:14: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#coding: utf-8
import math
import heapq
import bisect

MOD = 10**9+7

N = int(input())

# 複数個の数値を、intの配列として取得
H = list(map(int, input().split()))

ans=0
tmp=0
for i in range(1,N):
    if H[i]<=H[i-1]:
        tmp+=1
    else:
        ans=max(ans,tmp)
        tmp=0
ans=max(ans,tmp)

print(ans)

Compiler output:
main.c:1:2: error: invalid preprocessing directive #coding
    1 | #coding: utf-8
      |  ^~~~~~
main.c:2:1: error: unknown type name 'import'
    2 | import math
      | ^~~~~~
main.c:3:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'import'
    3 | import heapq
      | ^~~~~~
main.c:3:1: error: unknown type name 'import'
main.c:10:3: error: invalid preprocessing directive #\U00008907\U00006570\U0000500b\U0000306e\U00006570\U00005024\U00003092
   10 | # 複数個の数値を、intの配列として取得
      |   ^~~~~~~~~~~~~~
Language: C

//#include<bits/stdc++.h>
#include<iostream>
#include<algorithm>
#include<stack>
using namespace std;
typedef long long ll;
const int N=1e5+10;

int main()
{
	ll a[N];
	int n;cin>>n;
	for(int i=1;i<=n;i++)
		scanf("%lld",&a[i]);
	//a[n+1]=0;
	int tt=0;
	int flag=-1;
	
	for(int i=1;i<n;i++)
	{
		if(a[i]>=a[i+1])
			tt++;
		else
		{
		
			tt=0;
		}
		flag=max(flag,tt);
	}
	cout<<flag<<endl;	
	return 0;
}



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

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

int main() {
    int n;
    cin >> n;
    vector<int> h(n);
    for(auto& e : h) cin >> e;
    h.emplace_back(1e9 + 7);
    int res = 0;
    for(int i = 0, l = 0;i < n;i++){
        if(h[i+1] <= h[i]) continue;
        ans = max(ans, i - l);
        l = i + 1;
    }
    cout << res << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   13 |         ans = max(ans, i - l);
      |         ^~~
      |         abs
Language: C++

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

const ll INF64 = 1LL << 60;
const int INF32 = 1 << 29;
const ll MOD = 1000000007;

int main(){
	int n; cin >> n;
	vector<int> h(n);
	for(int i = 0; i < n; ++i){
		cin >> h[i];
    }
    int ans = 0;
    for(int i = 0; i < n; ++i){
		int j = i;
		for(; j < n; ++j){
			if(h[i]<h[w]){break;}
        }
        ans = min(ans, j-i-1);
        i = j-1;
    }
    
    cout << ans << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:35: error: 'w' was not declared in this scope
   20 |                         if(h[i]<h[w]){break;}
      |                                   ^
Language: C++

n = int(input())
h = list(map(int,input().split()))
count = 0
ans = 0
for i in range(1,n):
  if h[i]  <= h[i-1]:
    count += 1
    ans = max(ans,count)
  else:
    count = 0
print(ans)

Compiler output:
a.cc:1:1: error: 'n' does not name a type
    1 | n = int(input())
      | ^
Language: C++

#include<iostream>
using namespace std;

int main(void){
    int n,h[100011]=0,count=0,max=0;
    cin>>n;
    for(int i=0;i<n;i++){
        cin>>h[i];
    }
    for(int i=0;i<n;i++){
        if(h[i]>=h[i+1]){count+=1;}
        else{count = 0;}
        max = (max<count)? count:max;
    }

    cout<<max-1<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:21: error: array must be initialized with a brace-enclosed initializer
    5 |     int n,h[100011]=0,count=0,max=0;
      |                     ^
Language: C++

#include<stdio.h>
#include<iosteam>
#include<algorithm>
using namespace std;
int main(){
int n,h[100000]={0},ans=0,i,a=0;
scanf("%d%d",&n,&h[0]);
for(i=1;i<n;i++){
scanf("%d",h+i);
if(h[i-1]>=h[i])
a++;
else
ans=max(a,ans);
}
printf("%d\n",ans);
return 0;
}


Compiler output:
a.cc:2:9: fatal error: iosteam: No such file or directory
    2 | #include<iosteam>
      |         ^~~~~~~~~
compilation terminated.
Language: Java

import java.util.*;

public class Main{
  public static void main(String[] args){
    Scanner sc=new Scanner(System.in);
    final int N=sc.nextInt();
    int[] n=new int[N];
    for(int i=0;i<N;i++){
      n[i]=sc.nextInt();
    }
    int answer=0;
    for(int i=0;i<N;){
      int counter=0;
      for(int j=1;j<N;j++){
        if(n[i]<n[i+j]){
          break;
        }else{
          counter=j;
        }
      }
      i+=j;
      if(answer<counter){
        answer=counter;
      }
    }
    System.out.println(answer);
  }
}

Compiler output:
Main.java:21: error: cannot find symbol
      i+=j;
         ^
  symbol:   variable j
  location: class Main
1 error
Language: Java

import java.util.*;

public class Main{
  public static void main(String[] args){
    Scanner sc=new Scanner(System.in);
    final int N=sc.nextInt();
    int[] n=new int[N];
    for(int i=0;i<N;i++){
      n[i]=sc.nextInt();
    }
    int answer=0;
    for(int i=0;i<N){
      int counter=0;
      for(int j=1;j<N;j++){
        if(n[i]<n[i+j]){
          break;
        }else{
          counter=j;
        }
      }
      i+=j;
      if(answer<counter){
        answer=counter;
      }
    }
    System.out.println(answer);
  }
}

Compiler output:
Main.java:12: error: ';' expected
    for(int i=0;i<N){
                   ^
1 error
Language: Java

import java.util.*;
import java.io.*;

public class Main
{
  public static void main(String[] args)
  {
    Scanner sc = new Scanner(System.in);
    int length = sc.nextInt();
    int[] bruh = int[length];
    for(int i = 0; i < bruh.length; i++)
    	bruh[i] = sc.nextInt();
    int max = 0; 
    int mov = 0;
    for(int i = bruh.length-2; i >= 0; i--)
    {
      if(bruh[i+1] > bruh[i])
        p = 0;
      else
        p++;
      if(p > max)
        max = p;
    }
	System.out.println(p);
  }
}

Compiler output:
Main.java:10: error: ']' expected
    int[] bruh = int[length];
                     ^
Main.java:10: error: ';' expected
    int[] bruh = int[length];
                           ^
2 errors
Language: C++

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


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

using namespace std;
int main(){
	int n,a[110000];
	cin>>n;
	rep(i,n) cin>>a[i];
	
	int ans[110000];
	int kari=a[0];
	int koukan=0;
	
	for(int i=1;i<n;i++){
		if(a[i]<=kari){
			ans[koukan]++;
		}
		else{;
			koukan++;
		}
		kari=a[i];
	}
	
	sort(ans,ans+(koukan+1));
	reverse(ans,ans+(koukan+1));
	
	cout<<ans[0]<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:9: error: 'cin' was not declared in this scope
    4 |         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:5:13: error: 'i' was not declared in this scope
    5 |         rep(i,n) cin>>a[i];
      |             ^
a.cc:5:9: error: 'rep' was not declared in this scope
    5 |         rep(i,n) cin>>a[i];
      |         ^~~
a.cc:21:9: error: 'sort' was not declared in this scope; did you mean 'short'?
   21 |         sort(ans,ans+(koukan+1));
      |         ^~~~
      |         short
a.cc:22:9: error: 'reverse' was not declared in this scope
   22 |         reverse(ans,ans+(koukan+1));
      |         ^~~~~~~
a.cc:24:9: error: 'cout' was not declared in this scope
   24 |         cout<<ans[0]<<endl;
      |         ^~~~
a.cc:24:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:24:23: error: 'endl' was not declared in this scope
   24 |         cout<<ans[0]<<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: Java

import java.util.*;
public class A
{ 
    public static void main(String args[])
    { 
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        int arr[]=new int[50];int i;int j;int k;int max;
        int p[]=new int[50];
        for(i=0;i<n;i++)
        {
            arr[i]=sc.nextInt();
        }
         for(i=0;i<n-1;i++)
{
    j=i;k=0;
 while(arr[j]>=arr[j+1]&&j<n-1)
 { 
     j++;k++;
     
 }
    p[i]=k;
}
max=p[0];
for(i=0;i<n-1;i++)
{ 
    if(p[i]>max)
    max=p[i];
}
   System.out.println(max);
}
}     

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

#include<stdio.h>
int main()
{
 int n,i,j=0,max=1,t=0,a[1000];
scanf("%d",&n);
for(i=0;i<n;i++)
scanf("%d",&a[i]);
for(j=0;j<n;j++)
{
while(a[t]>a[t+1])
{ m++;
t++;}
if(max<m)
max=m;}
printf("\n%d",t);
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:3: error: 'm' undeclared (first use in this function)
   11 | { m++;
      |   ^
main.c:11:3: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
int main()
{
 int n,i,m=1,t=0,x,a[1000];
scanf("%d",&n);
for(i=0;i<n;i++)
scanf("%d",&a[i]);
for(i=0;i<n;i++)
{while(a[j]>a[j+1])
{t++;
j++;}
if(m<t)
{m=t;}
}


printf("\n%d",m);
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:10: error: 'j' undeclared (first use in this function)
    9 | {while(a[j]>a[j+1])
      |          ^
main.c:9:10: note: each undeclared identifier is reported only once for each function it appears in
Language: Java

package codingclub;

import java.util.*;
public class MoveNextDoor{

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

int n=obj.nextInt();
int[] x=new int[n];
int[] count=new int[n];
int j=0;
x[0]=obj.nextInt();


for(int i=1;i<x.length;i++){
x[i]=obj.nextInt();

if(x[i-1]>=x[i]){
count[j]++;
}
else{
j++;
}

}
Arrays.sort(count);
System.out.println(count[count.length-1]);





}



}


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

import java.util.*;
public class Main{

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

int n=obj.nextInt();
int[] x=new int[n];
int[] count=new int[n];

x[0]=obj.nextInt();
count[0]++;

for(int i=1;i<x.length;i++){
x[i]=obj.nextInt();

if(x[i-1]>=x[i]){
count[j]++;
}
else{
j++;
}

}
Arrays.sort(count);
System.out.println(count[count.length-1]);





}



}

Compiler output:
Main.java:18: error: cannot find symbol
count[j]++;
      ^
  symbol:   variable j
  location: class Main
Main.java:21: error: cannot find symbol
j++;
^
  symbol:   variable j
  location: class Main
2 errors
Language: C

#include<stdio.h>
int main()
{
int n,a[100000],i;
scanf("%d",&n);
for(i=0;i<n;i++)
 scanf("%d",&a[i]);

int min=a[0];
for(i=0;i<n;i++)
  {
if(min>a[i])
   min=a[i];
}
printf("%d",n-max);
}

Compiler output:
main.c: In function 'main':
main.c:15:15: error: 'max' undeclared (first use in this function)
   15 | printf("%d",n-max);
      |               ^~~
main.c:15:15: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
int main()
{
     int n,i,a[50],count;
     scanf("%d",&a);
     for(i=0;i<n;i++)
     {
         scanf("%d",a[i]);
     }
     for(i=0;i<n;i++)
     {
      count=0;
      for(j=i;j<n;j++)
      {
         while(a[j]>=a[j+1])
         {
             count++;
          }
      }
     }
      return 0;
}


Compiler output:
main.c: In function 'main':
main.c:13:11: error: 'j' undeclared (first use in this function)
   13 |       for(j=i;j<n;j++)
      |           ^
main.c:13:11: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include<iostream>
using namespace std;
int main()
{
long long int N;
int b;
cin>>N;
if((N>100000)&&(N<=1))
exit();
long long int a[N];
for(int i=0;i<N;i++)
{
cin>>a[i];
if((a[i]>1000000000)&&(a[i]<=1))
exit();
}
cin>>b;
int j=0;
while((a[b]>a[b+1])&&(a[b]!=a[N-1]))
{
j++;
b++;
}
cout<<j;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: too few arguments to function 'void exit(int)'
    9 | exit();
      | ~~~~^~
In file included from /usr/include/c++/14/cstdlib:79,
                 from /usr/include/c++/14/ext/string_conversions.h:43,
                 from /usr/include/c++/14/bits/basic_string.h:4154,
                 from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/stdlib.h:756:13: note: declared here
  756 | extern void exit (int __status) __THROW __attribute__ ((__noreturn__));
      |             ^~~~
a.cc:15:5: error: too few arguments to function 'void exit(int)'
   15 | exit();
      | ~~~~^~
/usr/include/stdlib.h:756:13: note: declared here
  756 | extern void exit (int __status) __THROW __attribute__ ((__noreturn__));
      |             ^~~~
Language: C++

#include<iostream>
#include<stdio.h>
using namespace std;
int main()
{
    long double n,i,cnt=0,hig=0;
    cin>>n;
    long double h[n];
    for(i=0;i<n;i++)
    {
        cin>>h[i];
    }
    for(i=0;i<n-1;i++)
    {
        if(h[i]>=h[i+1])
        {
            cnt++;
            
        }
        else
        {
            hig=cnt;
            cnt=0;
            
        }
    }
    if(hig<cnt)
      { hig=cnt;}
   cout<<cnt; 
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:19: error: conversion from 'long double' to 'long unsigned int' in a converted constant expression
    8 |     long double h[n];
      |                   ^
a.cc:8:19: error: could not convert 'n' from 'long double' to 'long unsigned int'
    8 |     long double h[n];
      |                   ^
      |                   |
      |                   long double
a.cc:8:19: error: size of array 'h' has non-integral type 'long double'
a.cc:11:15: error: invalid types 'long double [1][long double]' for array subscript
   11 |         cin>>h[i];
      |               ^
a.cc:15:13: error: invalid types 'long double [1][long double]' for array subscript
   15 |         if(h[i]>=h[i+1])
      |             ^
a.cc:15:19: error: invalid types 'long double [1][long double]' for array subscript
   15 |         if(h[i]>=h[i+1])
      |                   ^
Language: C++

#include<iostream>
using namespace std;
int main()
{
int N,b;
cin>>N;
if((N>100000)&&(N<=1))
exit();
int a[N];
for(int i=0;i<N;i++)
{
cin>>a[i];
if((a[i]>1000000000)&&(a[i]<=1))
exit();
}
cin>>b;
int j=0;
while((a[b]>a[b+1])&&(a[b]!=a[N-1]))
{
j++;
b++;
}
cout<<j;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: too few arguments to function 'void exit(int)'
    8 | exit();
      | ~~~~^~
In file included from /usr/include/c++/14/cstdlib:79,
                 from /usr/include/c++/14/ext/string_conversions.h:43,
                 from /usr/include/c++/14/bits/basic_string.h:4154,
                 from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/stdlib.h:756:13: note: declared here
  756 | extern void exit (int __status) __THROW __attribute__ ((__noreturn__));
      |             ^~~~
a.cc:14:5: error: too few arguments to function 'void exit(int)'
   14 | exit();
      | ~~~~^~
/usr/include/stdlib.h:756:13: note: declared here
  756 | extern void exit (int __status) __THROW __attribute__ ((__noreturn__));
      |             ^~~~
Language: C++

#include<iostream.h>
using namespace std;
int main()
{
int N,b;
cin>>N;
if((N>100000)&&(N<=1))
exit();
int a[N];
for(int i=0;i<N;i++)
{
cin>>a[i];
if((a[i]>1000000000)&&(a[i]<=1))
exit();
}
cin>>b;
int j=0;
while((a[b]>a[b+1])&&(a[b]!=a[N-1]))
{
j++;
b++;
}
cout<<j;
}

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

#include<iostream.h>
using namespace std;
int main()
{
int N,b;
cin>>N;
int a[N];
for(int i=0;i<N;i++)
cin>>a[i];
cin>>b;
int j=0;
while((a[b]>a[b+1])&&(a[b]!=a[N-1]))
{
j++;
b++;
}
cout<<j;
}

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

#include <iostream>
#include <math.h>
#include <algorithm>
#include <string>
#include <string.h>
#include <queue>
#include <vector>
#include <set>
#include <map>
#include <tuple>
#include <stdlib.h>
using namespace std;
#define PI 3.14159265358979
typedef long long int ll;

int main()
{
    int N,h,mae,ans=0,c=0;
    cin>>N;
    for(int i=0;i<N;i++){
    	cin>>h;
    	if(i!=0&&h<=mae)c++;
    	else c=0;
    	cout<<ans<<endl;
    	mae=h;
    }
    cout<<ans;
}
#include <iostream>
#include <math.h>
#include <algorithm>
#include <string>
#include <string.h>
#include <queue>
#include <vector>
#include <set>
#include <map>
#include <tuple>
#include <stdlib.h>
using namespace std;
#define PI 3.14159265358979
typedef long long int ll;

int main()
{
    int N,h,mae,ans=0,c=0;
    cin>>N;
    for(int i=0;i<N;i++){
    	cin>>h;
    	if(i!=0&&h<=mae)c++;
    	else c=0;
    	ans=max(ans,c);
    	mae=h;
    }
    cout<<ans;
}


Compiler output:
a.cc:44:5: error: redefinition of 'int main()'
   44 | int main()
      |     ^~~~
a.cc:16:5: note: 'int main()' previously defined here
   16 | int main()
      |     ^~~~
Language: C++

#include <iostream>
#include <math.h>
#include <algorithm>
#include <string>
#include <string.h>
#include <queue>
#include <vector>
#include <set>
#include <map>
#include <tuple>
#include <stdlib.h>
using namespace std;
#define PI 3.14159265358979
typedef long long int ll;

int main()
{
    int N,h,mae,ans=0;
    cin>>N;
    for(int i=0;i<N;i++){
    	cin>>h;
    	if(i!=1&&h<=mae)c++;
    	else if(i!=1){
    		    c=0;
    		}
    	else c=1;
    		
    	        ans=max(ans,c);
    	mae=h;
    }
    	        ans=max(ans,c);
    cout<<ans;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:25: error: 'c' was not declared in this scope
   22 |         if(i!=1&&h<=mae)c++;
      |                         ^
a.cc:24:21: error: 'c' was not declared in this scope
   24 |                     c=0;
      |                     ^
a.cc:26:14: error: 'c' was not declared in this scope
   26 |         else c=1;
      |              ^
a.cc:28:29: error: 'c' was not declared in this scope
   28 |                 ans=max(ans,c);
      |                             ^
a.cc:31:29: error: 'c' was not declared in this scope
   31 |                 ans=max(ans,c);
      |                             ^
Language: C++

include<iostream>
using namespace std;
#include<string>
#include<utility>
#include<algorithm>

int main(){
    int N;
    cin >> N;
    long long int H[N];
    for(int i=0;i<N;++i){
        cin >> H[i];
    }
    long long int C[N];
   int num_jum=0;
   int tmp=0;
   for(int i=0;i<N;++i){
       for(int j=i;j<N;++j){
           if(H[j]>=H[j+1]){
               ++num_jum;
           }
           else{
               if(num_jum>tmp){
               tmp=num_jum;
               num_jum=0;
               continue;
               }
               else{
                   num_jum=0;
                   continue;
               }
           }
       }
   }
   num_jum=tmp;
    cout << num_jum;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:9:5: error: 'cin' was not declared in this scope
    9 |     cin >> N;
      |     ^~~
a.cc:36:5: error: 'cout' was not declared in this scope
   36 |     cout << num_jum;
      |     ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long LL;
typedef vector<int> vi;
typedef pair<int,int> ii;
#define inf 1e9
#define F first
#define S second
#define dbg(x) cout<<#x<<" value : "<<x<<"\n";
#define rep(i,j,k) for(int i = (j); i <= (k); i++)
#define rep__(i,j,k) for(int i = (j); i < (k); i++)
#define per(i,j,k) for(int i = (j); i >= (k); i--)
#define per__(i,j,k) for(int i = (j); i > (k); i--)
#define mst(a,b) memset(a,b,sizeof(a))
#define sf(n) scanf("%d",&n)
#define stf(n,m) scanf("%d%d",&n,&m)
#define pf(n) printf("%d\n",n)
#define slf(n) scanf("%lld",&n)
#define plf(n) printf("%lld\n",n)
priority_queue<int,vector<int>,less<int> > q;
const int N=1e5+10;
const int mod=1e9+7;
int n,m,sum,t,x,a[N],num;
inline mx(int c,int y){return c>y?c:y;}
int main()
{
	sf(n);
	rep(i,1,n){
		sf(x);
		if(i==1)t=x;
		if(t>=x)sum++;
		else {
			num=mx(num,sum);
			sum=0;
		}
		t=x;
	}
	num=mx(num,sum);
	cout<<num<<endl;
	return 0;
}

Compiler output:
a.cc:24:8: error: ISO C++ forbids declaration of 'mx' with no type [-fpermissive]
   24 | inline mx(int c,int y){return c>y?c:y;}
      |        ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long LL;
typedef vector<int> vi;
typedef pair<int,int> ii;
#define inf 1e9
#define F first
#define S second
#define dbg(x) cout<<#x<<" value : "<<x<<"\n";
#define rep(i,j,k) for(int i = (j); i <= (k); i++)
#define rep__(i,j,k) for(int i = (j); i < (k); i++)
#define per(i,j,k) for(int i = (j); i >= (k); i--)
#define per__(i,j,k) for(int i = (j); i > (k); i--)
#define mst(a,b) memset(a,b,sizeof(a))
#define sf(n) scanf("%d",&n)
#define stf(n,m) scanf("%d%d",&n,&m)
#define pf(n) printf("%d\n",n)
#define slf(n) scanf("%lld",&n)
#define plf(n) printf("%lld\n",n)
priority_queue<int,vector<int>,less<int> > q;
const int N=1e5+10;
const int mod=1e9+7;
int n,m,sum,t,a[N],num;
inline mx(int x,int y){return x>y?x:y;}
int main()
{
	sf(n);
	rep(i,1,n){
		sf(a[i]);
		if(i==1)t=a[i];
		if(t>=a[i])sum++;
		else {
			num=mx(num,sum);
			sum=0;
		}
		t=a[i];
	}
	num=mx(num,sum);
	cout<<num<<endl;
	return 0;
}

Compiler output:
a.cc:24:8: error: ISO C++ forbids declaration of 'mx' with no type [-fpermissive]
   24 | inline mx(int x,int y){return x>y?x:y;}
      |        ^~
Language: C

#include<stdio.h>

int main(void){long long int n,h[1000000001],i,answer,a;answer=0;a=0;scanf("%lld",&n);for(i=0;i<n;i++){scanf("%lld",&h[i]);for(i=1;i<n;i++){while(h[i-1] >= h[i]){a++;i++;}if(answer<a){answer=a;a=0;}}printf("%lld",answer);return 0;}

Compiler output:
main.c: In function 'main':
main.c:3:1: error: expected declaration or statement at end of input
    3 | int main(void){long long int n,h[1000000001],i,answer,a;answer=0;a=0;scanf("%lld",&n);for(i=0;i<n;i++){scanf("%lld",&h[i]);for(i=1;i<n;i++){while(h[i-1] >= h[i]){a++;i++;}if(answer<a){answer=a;a=0;}}printf("%lld",answer);return 0;}
      | ^~~
Language: C++

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


int main(){
  int N;
  cin >> N;
  vector<int>H(N);
  for(int i=0;i<N;i++){
    cin >> H[i];
  }
  int Max=0;
  int current=0;
  for(int i=0;i<N;i++){
    if(H[i]<Max)continue
    for(int j=i;j<N-1;j+
      i=j;
      if(H[j]<H[j+1]){
        break;
      }
      current++;
    }
    if(Max<current){
      Max=current;
    }
    current=0;
  }

  cout << Max<<endl;

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:25: error: expected ';' before 'for'
   16 |     if(H[i]<Max)continue
      |                         ^
      |                         ;
   17 |     for(int j=i;j<N-1;j+
      |     ~~~                  
a.cc:17:24: error: lvalue required as left operand of assignment
   17 |     for(int j=i;j<N-1;j+
      |                       ~^
   18 |       i=j;
      |       ~                 
a.cc:18:10: error: expected ')' before ';' token
   18 |       i=j;
      |          ^
      |          )
a.cc:17:8: note: to match this '('
   17 |     for(int j=i;j<N-1;j+
      |        ^
a.cc:19:12: error: 'j' was not declared in this scope
   19 |       if(H[j]<H[j+1]){
      |            ^
a.cc: At global scope:
a.cc:30:3: error: 'cout' does not name a type
   30 |   cout << Max<<endl;
      |   ^~~~
a.cc:32:3: error: expected unqualified-id before 'return'
   32 |   return 0;
      |   ^~~~~~
a.cc:33:1: error: expected declaration before '}' token
   33 | }
      | ^
Language: C++

#include <bits/stdc++.h>
#define rep(i,n)for(int i=0;i<(n);i++)
using namespace std;
typedef long long ll;
typedef pair<int,int>P;
 
const int INF=0x3f3f3f3f;
const ll INFL=0x3f3f3f3f3f3f3f3f;
const int MOD=1000000007;
 
int h[200000];
int main(){
	int n;cin>>n;
	rep(i,n)scanf("%d",&l[i]);
	int Max=0;
	int cnt=0;
	for(int i=n-1;i>=0;i--){
		if(i==n-1||l[i]<l[i+1])cnt=0;
		cnt++;
		Max=max(Max,cnt);
	}
	cout<<Max-1<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:29: error: 'l' was not declared in this scope
   14 |         rep(i,n)scanf("%d",&l[i]);
      |                             ^
a.cc:18:28: error: 'l' was not declared in this scope
   18 |                 if(i==n-1||l[i]<l[i+1])cnt=0;
      |                            ^
Language: C++

#include "py2cpp/py2cpp.hpp"

N = int(input());

L = list(map(int, input().split()));

L = sorted(L);

count = 0;

for (auto i : py2cpp::range(N - 2)) {
    for (auto j : py2cpp::range(i + 1, N - 1)) {
        for (auto k : py2cpp::range(j + 1, N)) {
            add = L[j] + L[k];
            diff = L[j] - L[k];
            if (diff >= L[i] || add <= L[i]) {
                break;
            }
            count += 1;
        }
        break;
    }
}

std::cout << count << std::endl;

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

#include<iostream>
#include<vector>
#define ll long long
using namespace std;
int main() {
  
  cin.tie(0);
  ios::sync_with_stdio(false);
  
  ll N,h,i = 0;
  cin >> N;
  std::vector<ll> vec(N);
  while(cin >> h) {
    vec[i] = h;
    i++;
  }
  if (N == 1) cout << 0 << endl;
  else {
    ll ans = 0;
    for (ll j = 0; j < N-1; ++j) {
      ll ans_ = 0;
      ll pos = 0;
      while (j+pos+1 < N && vec[j+pos] => vec[j+pos+1]) {
        ans_++;
        pos++;
      }
      if (ans < ans_) ans = ans_;
    }
    cout << ans << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:41: error: expected primary-expression before '>' token
   23 |       while (j+pos+1 < N && vec[j+pos] => vec[j+pos+1]) {
      |                                         ^
Language: Java

package ABC.case139;

import java.util.*;

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

        int n = sc.nextInt();

        int[] heights = new int[n];
        for (int i = 0; i < n; i++) {
            heights[i] = sc.nextInt();
        }

        int[] move = new int[n-1];
        int tmp = 0;
        for (int i = 0; i < n-1; i++) {
            if (heights[i] >= heights[i+1]) {
                tmp++;
                move[i] = tmp;
            } else {
                tmp = 0;
                move[i] = tmp;
            }
        }

        int max = 0;
        for (int i = 0; i < move.length; i++) {
            max = Math.max(max, move[i]);
        }

        System.out.println(max);

    }
}


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

#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
#define rep(i, n) for(int i = 0; i < (n); ++i)
int a[20], b[20], c[20];
vector<int>v;
void printPrimes(int n) {
	int i = 2;
	while (n != 1) {
		if (n % i == 0) {
			while (n % i == 0) {
				cout << i;
				v.push_back(i);
				n = n / i;
			}
		}
		i++;
	}
}
int gcd(int a, int b) {
	if (b == 0)
		return a;

	return gcd(b, a % b);
}
int solve(int idx, int sum) {
	if (idx == n) {
		if (sum == 0)
			return 0;
		else return 1e6;

		if (dp[idx][sum] != -1)
			return dp[idx][sum];

		return min(solve(idx + 1, sum + a[idx]), 1 + solve(idx + 1, sum - a[idx]));
	}

}
int main() {
	int n; cin >> n;
	vector<int>v(n);
	rep(i, n)
		cin >> v[i];
	int cnt = 0;
	rep(i, n) {
		if (v[i] < v[i + 1])
			cnt++;
		else
			cnt = 0;
	}

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


Compiler output:
a.cc: In function 'int solve(int, int)':
a.cc:28:20: error: 'n' was not declared in this scope
   28 |         if (idx == n) {
      |                    ^
a.cc:33:21: error: 'dp' was not declared in this scope
   33 |                 if (dp[idx][sum] != -1)
      |                     ^~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long long int
ll ar[500005];
int main()
{
    ll n;
    cin >> n;
    for(int i=1; i<=n; i++)
    {
        cin>>ar[i];
    }
    ar[n+1]=9999999999;
    ll mx=0,cnt=0;
    for(int i=2; i<=a+1; i++)
    {
        if(ar[i]>ar[i-1])
        {
            mx=max(cnt,mx);
            cnt=0;
        }
        else
        {
            cnt++;
        }
    }
    cout << cnt << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:21: error: 'a' was not declared in this scope
   15 |     for(int i=2; i<=a+1; i++)
      |                     ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:31: error: expected ';' before 'count'
   11 |     if(A[i-1] > A[i] ) i = N-1
      |                               ^
      |                               ;
   12 |     count++;
      |     ~~~~~
Language: C++

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

int main() {
  int N;
  cin>>N;
  int H[N];
  for(int i=0;i<N;i++) cin>>H[i];
  int i=0;
  int ans=0;
  while(i<N){
    int reg=0;
    for(int j=i;j<N;j++){
      if(H[j]>=H[j+1]) reg++;
      else{
        if(reg>ans) {
          ans=reg;
          i+=reg;
        }
        break;
      }
    }
    reg++;
    if(reg>=N-i) {
      break;
  }
  cout<<ans<<endl;
}



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

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

int main() {
  int N;
  cin>>N;
  int H[N];
  for(int i=0;i<N;i++) cin>>H[i];
  int i=0;
  int answer=0;
  while(i<N){
    int reg=0;
    for(int j=i+1;j<N;j++){
      if(H[i]>=H[j]) reg++;
      else{
        if(reg>ans) ans=reg;
        break;
      }
    }
    i+=reg+1;
  }
  cout<<ans<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:16: error: 'ans' was not declared in this scope; did you mean 'abs'?
   16 |         if(reg>ans) ans=reg;
      |                ^~~
      |                abs
a.cc:22:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   22 |   cout<<ans<<endl;
      |         ^~~
      |         abs
Language: C++

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];

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

    sc.close();

    int count = 0;
    int max = 0;

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

    System.out.println(max);

  }

}

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

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Optional;
import java.util.Scanner;
import java.util.stream.Collectors;
import java.util.stream.IntStream;

public class Main {
    public static void main(String[] args) {
        Scanner std = new Scanner(System.in);
        int count = std.nextInt();
        List<Integer> xs = IntStream.range(0, count)
                .map(it -> std.nextInt()).boxed().collect(Collectors.toList());

        List<Integer> state = new ArrayList<>();

        IntStream.range(0, xs.size()).forEach(it -> {
            if (it == xs.size() - 1) {
                return;
            }

            int left = xs.get(it);
            int right = xs.get(it + 1);
            if (left >= right) {
                state.add(1);
            } else {
                state.add(0);
            }
        });

        String value = state.stream().map(String::valueOf).collect(Collectors.joining());
        Optional<Integer> result = Arrays.stream(value.split("0")).map(String::length).max((l, r) -> l - r);
        System.out.println(result.orElse(0));
    }

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

#include<stdio.h>
#include<stdlib.h>
int main(){
    int N;
    int *H = N * malloc(sizeof(int));
    scanf("%d", &N);
    for(int i = 0; i < N; i++) scanf("%d", &H[i]);
    int count = 0;
    int max_count = 0;
    for(int i = 1; i < N; i++){
        if(H[i-1] < H[i]) count = 0;
        else count++;
        if(count > max_count) max_count = count;
    }
    printf("%d", max_count);
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:16: error: invalid operands to binary * (have 'int' and 'void *')
    5 |     int *H = N * malloc(sizeof(int));
      |                ^ ~~~~~~~~~~~~~~~~~~~
      |                  |
      |                  void *
Language: C

#include<stdio.h>
int main(){
    int N;
    int H[N];
    scanf("%d", &N);
    scanf("%s", H[]);
    int count = 0;
    int max_count = 0;
    for(int i = 0; i < N; i++){
        if(H[i] < H[i+1]) count = 0;
        else count++;
        if(count > max_count) max_count = count;
    }
    printf("%d", max_count);
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:19: error: expected expression before ']' token
    6 |     scanf("%s", H[]);
      |                   ^
Language: C++

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

int main(){

   int n;
   int a[10005];
   cin >> n;
   int i;
   int result = 0;
   int ans = 0;
   for(i = 0; i < n; i++)
   {
       cin >> a[i];
   }

   for(i = 0; i < n ; i++) 
   {
       if(a[i] > a[i - 1]) result = i;
        ans = max(ans, i - start);
   }

   cout << ans;
   return 0;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:28: error: 'start' was not declared in this scope
   20 |         ans = max(ans, i - start);
      |                            ^~~~~
Language: C++

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

int main(){

   long long n;
   long long a[10005];
   cin >> n;
   long long i;
   long long result = 0;
   long long ans = 0;
   for(i = 0; i < n; i++)
   {
       cin >> a[i];
   }

   for(i = 0; i < n - 1; i++) 
   {
       if(a[i] > a[i - 1]) result = i;
        ans = max(ans, i - start);
   }

   cout << ans;
   return 0;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:28: error: 'start' was not declared in this scope
   20 |         ans = max(ans, i - start);
      |                            ^~~~~
Language: C++

#include <iostream>

using namespace std;

int main()
{
    int n{};
    cin >> n;
    int arr[100010]={};
    for (int i=0;i<n;i++){
        cin >> arr[i];
    }
    int maxi{};
    for (int i=0;i<n;i++){
        int cont{};#include <iostream>

using namespace std;

int main()
{
    int n{};
    cin >> n;
    int arr[100010]={};
    for (int i=0;i<n;i++){
        cin >> arr[i];
    }
    int maxi{};
    for (int i=0;i<n;i++){
        int cont{};
        for (int j=i;j+1<n;j++){
            if (arr[j]>arr[j+1])
                ++cont;
        }
        if (cont>maxi)
            maxi=cont;
    }
    cout << maxi << endl;
    return 0;
}
        for (int j=i;j<n;j++){
            if (arr[j]>arr[j+1])
                ++cont;
        }
        if (cont>maxi)
            maxi=cont;
    }
    cout << maxi << endl;
    return 0;
}

Compiler output:
a.cc:15:20: error: stray '#' in program
   15 |         int cont{};#include <iostream>
      |                    ^
a.cc: In function 'int main()':
a.cc:15:21: error: 'include' was not declared in this scope
   15 |         int cont{};#include <iostream>
      |                     ^~~~~~~
a.cc:15:38: error: expected primary-expression before '>' token
   15 |         int cont{};#include <iostream>
      |                                      ^
a.cc:17:1: error: expected primary-expression before 'using'
   17 | using namespace std;
      | ^~~~~
a.cc:19:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   19 | int main()
      |         ^~
a.cc:19:9: note: remove parentheses to default-initialize a variable
   19 | int main()
      |         ^~
      |         --
a.cc:19:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:20:1: error: a function-definition is not allowed here before '{' token
   20 | {
      | ^