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

#include <bits/stdc++.h>
#define int int64_t
#define rp(i, N) for(int i=0; i<N; i++);
using namespace std;
using pair = pair<int, int>;
using tup  = tuple<int, int, int>;
using vec  = vector<int>;
using vvec = vector<vec>;
const int INF = 100000000;
// " ", ' '

// プロトタイプ宣言
// int myfunc(int, vvec);

// グローバル変数
// int N, M;
// vvec data(N, vec(M));

// 関数：

signed main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
	
	int N; cin >> N;
	vec H(N+1), ans(N+1);
	for(int i=0; i<N; i++) cin >> H.at(i);

	int mx = 0;
	int ans.at(0) = 0;
	for(int i=1; i<N; i++) {
		if(H.at(i)<=H.at(i-1)) ans.at(i) = ans.at(i-1)+1;
		else ans.at(i) = 0;
	}

	for(int i=0; i<N; i++) {
		if(mx<ans.at(i)) mx = ans.at(i);
	}

	cout << mx << endl;
		
	
}


Compiler output:
a.cc: In function 'int main()':
a.cc:30:16: error: expected initializer before '.' token
   30 |         int ans.at(0) = 0;
      |                ^
Language: C++

#include <iostream>
#include 

#define REP(i, a, b) for ( int i = (a); i < (b); i++ )
#define REVREP(i, a, b) for ( int i = (a); i > (b); i--)
#define DEBUG_INT(var) printf("the value of "#var" is %d\n", var)

using namespace std;

int N;
int H[100005];

int main(void) {
    scanf("%d", &N);
    REP(i, 0, N) scanf("%d", &H[i]);

    int ans = 0;
    int i = 0;
    while (++i < N) {
    	int cnt = 0;

    	while (H[i - 1] >= H[i] && i < N ) {
    		i++;
    		cnt++;
    	}
    	ans = max(ans, cnt);

    }
    
    printf("%d\n", ans);

	return 0;
}


Compiler output:
a.cc:2:10: error: #include expects "FILENAME" or <FILENAME>
    2 | #include
      |          ^
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <math.h>
#include <stdio.h>
#include <algorithm>
#include <cmath>
#include <cstdlib>
#include <stack>
#include <istream>
#include <map>
#include <set>
#include <queue>
#define rep0(i,n) for (int i = 0; i <= (n); ++i)
#define rep1(i,n) for (int i = 1; i <= (n); ++i)
#define REP(a,b) for (int i = a; i <= (b); ++i) 
#define mREP(a,b) for (int i = a; i == (b); --i) 
typedef long long ll;
using namespace std;
int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	/*
	　　　  　 ,ﾍ／L──- 、
	　　　   　Lﾆ)r_」=＝= ｲ
	　　 　,ﾍ、i ﾉノλﾉﾊﾉﾍ
	　　   ,'　｀(ﾊﾘ ﾟ ヮﾟﾉi)　',
	　　 .i　　 >〈(つ,i!と)　　i
	　　  vﾍγk´_/___i,ゝﾍノ
	　　　　　 ｀ﾞr_,ｨ_ｧﾞ´
	*/
	int n; cin >> n;
	vector<ll>a(n);
	vector<int>b(n - 1,0);
	int count = 0;
	int ans = -1;
	rep0(i, n - 1) {
		scanf_s("%lld", &a[i]);
	}
	rep0(j, n - 2) {
		if (a[j] >= a[j +1]) {
			b[j] = 1;
		}
	}
	rep0(k, n - 2) {
		if (b[k] == 1 ) {
			count++;
		}
		else {
			count = 0;
		}
		ans = max(ans, count);
	}
	cout << ans <<endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:38:17: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   38 |                 scanf_s("%lld", &a[i]);
      |                 ^~~~~~~
      |                 scanf
Language: C++

#include<iostream>
using namespace std;
int main()
{
    int n,h[100010];
    cin>>n;
    for(int i=0;i<n;i++)
    {
    	cin>>h[i];
	}
	int now=INT_MAX,maxx=0,thisone=0;
	for(int j=0;j<n-1;j++)
	{
		thisone=0;
		int under=j;
		while(h[under]>=h[under+1]&&under<n-1)
		{
			thisone++;
			under++;
		}
		maxx=max(thisone,maxx);
	}
	cout<<maxx;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:17: error: 'INT_MAX' was not declared in this scope
   11 |         int now=INT_MAX,maxx=0,thisone=0;
      |                 ^~~~~~~
a.cc:2:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    1 | #include<iostream>
  +++ |+#include <climits>
    2 | using namespace std;
a.cc:14:17: error: 'thisone' was not declared in this scope
   14 |                 thisone=0;
      |                 ^~~~~~~
a.cc:21:17: error: 'maxx' was not declared in this scope
   21 |                 maxx=max(thisone,maxx);
      |                 ^~~~
a.cc:23:15: error: 'maxx' was not declared in this scope
   23 |         cout<<maxx;
      |               ^~~~
Language: C++

#include <bits/stdc++.h>
#define FOR(i, m, n) for (int i = m; i < (n); i++)
#define RFOR(i, m, n) for (int i = (m - 1); i >= 0; i--)
#define REP(i, n) FOR(i, 0, n)
#define RREP(i, n) RFOR(i, n, 0)
#define ALL(v) v.begin(), v.end()
#define RALL(v) v.rbegin(), v.rend()
using namespace std;
typedef long long ll;
const int mod = 1e9 + 7;

int main() {
  int n;
  cin >> n;
  ll h[n];
  REP(i, n) {
    cin >> h[i];
  }

  int max = 0, count = 0;
  REP(i, n - 1) {
    if (h[i] >= h[i + 1]) count++;
    else {
      if (max <= count) {
        max = count; 
        count = 0;
      }
    }
  }
  cout << max(max, count) << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:14: error: 'max' cannot be used as a function
   30 |   cout << max(max, count) << endl;
      |           ~~~^~~~~~~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
 
int main(){
  
  int n;
  cin >> n;
  
  vector<int> ar(n);
  for(auto &c: ar) cin >> c;
  
  int res = 0;
  for(int i = 0; i < n;){
    int cnt = 1;
    while(i < n + 1 && ar[i] >= ar[i + 1]){
      i++;
      cnt++;
    }
    if(cnt == 1) i++;
    res = max(res, cnt);
  }
  cout << res << endl;
}
  
  
}

Compiler output:
a.cc:26:1: error: expected declaration before '}' token
   26 | }
      | ^
Language: Java

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

public class p6 {
	public static void main(String[] args) {
		Scanner scan=new Scanner(System.in);
		int n=scan.nextInt();
		int []a=new int[n];
		
		for(int i=0;i<n;i++) {
			a[i]=scan.nextInt();
		}
		ArrayList<Integer>arr=new ArrayList<Integer>();
		for(int i=0;i<n-1;i++) {
			int count=0;
			for(int j=i;j<n-1;j++) {
				if(a[j]>=a[j+1]) {
					count++;
				}
				else {
					arr.add(count);
					break;
				}
				if(j==n-2) {
					arr.add(count);
					break;
				}
			}
		}

		Collections.sort(arr);
		System.out.println(arr);
		System.out.println(arr.get(arr.size()-1));
		
	}

}


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

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

int main() {
    long long n;
    cin >> n;
    long long h[n];
    for (int i = 0; i < n; i++) {
        cin >> h[i];
    }
    long long ans = 0;
    std::vector<long long> v;
    for (int i = 0; i < n; i++) {
        if ( h[i] >= h[i+1]) {
            ans++;
            if ( i == n-1 ) {
                v.push_back(ans);
            }
        } else {
            v.push_back(ans);
            ans = 0;
        }
    }
    cout << *max_element(v.begin(), v.end()) << endl;
    return 0;

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


	int n;
	cin >> n;

	vector<int> h(n);
	vector<int> idou;

	rep(i, n) {
		cin >> h[i];
	}

	int idoulen = 0;
	idou.push_back(0);
	rep(i, n-1) {
		if (h[i] >= h[i + 1]) {
			idou[idoulen] += 1;
		} else {
			idoulen += 1;
			idou.push_back(0);
		};
	}

	sort(idou.begin(), idou.end());
	cout << idou[idoulen] << endl;
	return 0;

Compiler output:
a.cc:3:9: error: 'cin' does not name a type
    3 |         cin >> n;
      |         ^~~
a.cc:5:9: error: 'vector' does not name a type
    5 |         vector<int> h(n);
      |         ^~~~~~
a.cc:6:9: error: 'vector' does not name a type
    6 |         vector<int> idou;
      |         ^~~~~~
a.cc:8:12: error: expected constructor, destructor, or type conversion before '(' token
    8 |         rep(i, n) {
      |            ^
a.cc:13:9: error: 'idou' does not name a type
   13 |         idou.push_back(0);
      |         ^~~~
a.cc:14:12: error: expected constructor, destructor, or type conversion before '(' token
   14 |         rep(i, n-1) {
      |            ^
a.cc:23:13: error: expected constructor, destructor, or type conversion before '(' token
   23 |         sort(idou.begin(), idou.end());
      |             ^
a.cc:24:9: error: 'cout' does not name a type
   24 |         cout << idou[idoulen] << endl;
      |         ^~~~
a.cc:25:9: error: expected unqualified-id before 'return'
   25 |         return 0;
      |         ^~~~~~
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 answer = 0;
    long long count = 0;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:21:25: error: no matching function for call to 'max(int&, long long int&)'
   21 |             answer = max(answer, count);
      |                      ~~~^~~~~~~~~~~~~~~
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:21:25: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'long long int')
   21 |             answer = max(answer, count);
      |                      ~~~^~~~~~~~~~~~~~~
/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:21:25: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   21 |             answer = max(answer, count);
      |                      ~~~^~~~~~~~~~~~~~~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:10:8: error: 'vector' is not a member of 'std'
   10 |   std::vector<int> H(N);
      |        ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include <iostream>
  +++ |+#include <vector>
    2 | #include <string>
a.cc:10:15: error: expected primary-expression before 'int'
   10 |   std::vector<int> H(N);
      |               ^~~
a.cc:12:10: error: 'H' was not declared in this scope
   12 |   cin >> H;
      |          ^
a.cc:19:7: error: 'i' was not declared in this scope
   19 |   for(i=0;i<N;i++){
      |       ^
Language: C

#include<stdio.h>

int main(void)
{
  int n;
  scanf("%d", &n);
  int h[n], count=0, max=0, j=0; max_j=0;
  
  for(int i=0; i<n; i++) scanf("%d", &h[i]);
  for(int i=0; i<n-1; i++)
  {
    if(max_j >= i) continue;
    for(j=i; j<n-1; j++)
    {
      if(h[j] >= h[j+1]) count++;
      else break;
    }
    max_j = j;
    if(max < count) max = count;
    count = 0;
  }
  
  printf("%d", max);
  
  return 0;
  
}

Compiler output:
main.c: In function 'main':
main.c:7:34: error: 'max_j' undeclared (first use in this function); did you mean 'max'?
    7 |   int h[n], count=0, max=0, j=0; max_j=0;
      |                                  ^~~~~
      |                                  max
main.c:7:34: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include<iostream>
using namespace std;
int main()
{
    int n;
    cin>>n;
    int temp=0,s=0;
    for(int i=0;i<n;i++){
        int m;
        cin>>m;
        if(m>=temp){
                s=i;
           }
        temp=m;
    }
  if(s==n){
    int p=0
    cout<<p;}
  else{
  cout<<s;}
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:5: error: expected ',' or ';' before 'cout'
   18 |     cout<<p;}
      |     ^~~~
Language: Java

import java.util.Arrays;
import java.util.Scanner;
public class d01 {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] array = new int[n];
        int[] max = new int[n];
        int initial =0;
        for (int i=0;i<n;i++){
            int mas = sc.nextInt();
            array[i] = mas;
        }
        for (int j=0;j<n;j++){
            int result =0;
            while(array[initial]>array[initial+1] && initial < n-1) {
                result++;
                initial++;
            }
            max[j] = result;
        }
        int maximum = Arrays.stream(max).max().getAsInt();
        System.out.println(maximum);
    }
}


Compiler output:
Main.java:3: error: class d01 is public, should be declared in a file named d01.java
public class d01 {
       ^
1 error
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;
  
  for(int i=0;i<n-1;i++){
    int k = 0;
    for(int j=i;j<n-1;j++){
      if(h.at(j) >= h.at(j+1)){
        k++;
      }
      else {
        ans = max(ans,k);
        i = j;
        break;
      }
    }
  }
  cout << k << endl;
}

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

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

int main() {
  int N;
  cin >> N;
  vector<int> H(N);
  
  int record = 0;
  int best = 0;
  for (int i = 0; i < N; i++) {
    if (H(i) >= H(i+1)) {
      record++;
      best = max(best, record);
    }
    else {
      record = 0;
    }
  }
  
  cout << best << endl;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:10: error: no match for call to '(std::vector<int>) (int&)'
   12 |     if (H(i) >= H(i+1)) {
      |         ~^~~
a.cc:12:18: error: no match for call to '(std::vector<int>) (int)'
   12 |     if (H(i) >= H(i+1)) {
      |                 ~^~~~~
Language: C++

#include<iostream>
#include<vector>
using namespace std;
int main(void)
{
  int n,p,t;
  vector<int> v;
  
  cin >> n;
  for(int i = 0;i < n;i++)
  {
    int a;
    cin >> a;
    v.push_back(a);
  }
  v.push_back(1000000001);
  p = 0;
  t=0;
  for(int i = 0;i < n;i++)
  {
    if(v[i] > v[i+1])
      p++;
    else
    {
      if(t<p)
	  	t = p
      p=0;
    }
  }
cout << t;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:22: error: expected ';' before 'p'
   26 |                 t = p
      |                      ^
      |                      ;
   27 |       p=0;
      |       ~
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> vec(n);
  int cnt=0;
  int ans=0;
  bool serial = false;
  rep(i,){
    if (vec.at(i)>=vec.at(i+1)){
      if (serial==false){
        cnt=1;
        serial=true;
      }
      else (serial==true){
        cnt++;
        if(ans<cnt) ans = cnt;
    }
    else{
      serial = false;
      cnt=0;
    }
    
  }
  cout << cnt << endl;
}
    

Compiler output:
a.cc: In function 'int main()':
a.cc:7:11: error: found ':' in nested-name-specifier, expected '::'
    7 |   cin >> n:
      |           ^
      |           ::
a.cc:7:10: error: 'n' is not a class, namespace, or enumeration
    7 |   cin >> n:
      |          ^
a.cc:8:10: error: expected primary-expression before 'int'
    8 |   vector<int> vec(n);
      |          ^~~
a.cc:2:35: error: expected primary-expression before ')' token
    2 | #define rep(i,n) for (int i=0;i<(n);++i)
      |                                   ^
a.cc:12:3: note: in expansion of macro 'rep'
   12 |   rep(i,){
      |   ^~~
a.cc:13:9: error: 'vec' was not declared in this scope
   13 |     if (vec.at(i)>=vec.at(i+1)){
      |         ^~~
a.cc:18:26: error: expected ';' before '{' token
   18 |       else (serial==true){
      |                          ^
      |                          ;
a.cc:22:5: error: expected '}' before 'else'
   22 |     else{
      |     ^~~~
a.cc:13:32: note: to match this '{'
   13 |     if (vec.at(i)>=vec.at(i+1)){
      |                                ^
Language: C++

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

int main() {
int N; 
  cin>>N;
  vector<int> S(N);
  for(int i=0; i<N; i++){
    cin>>S.at(i);
  }
  int A=0;
  vector<int> B(N-1);
  for(int j=0; j<N-1; j++){
    if(S.at(j)>=S.at(j+1)){
       A++
    }
       else break;
       B.at(j)=A;
       }
       sort(B.begin(), B.end());
       reverse(B.begin(),B.end());
       cout<<B.at(0)<<endl;
       }
       
       

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

#include <bits/stdc++.h>
using namespace std;
int t, arr[1000000000], sequence, maxS;
int main(){
	//ios::sync_with_stdio(0), cin.tie(0);
	//cout<< fixed<< setprecision(10) << x << endl;
	cin>>t;
	for(int a = 0; a < t; a++){
        cin>>arr[a];
	}
	for(int a = 1; a < t; a++){
        if(arr[a - 1] >= arr[a])sequence++;
        else{
            maxS = max(maxS, sequence);
            sequence = 0;
        }
	}
	maxS = max(maxS, sequence);
	cout<<maxS<<endl;
}


Compiler output:
/tmp/ccC7KgVm.o: in function `main':
a.cc:(.text+0xa2): relocation truncated to fit: R_X86_64_PC32 against symbol `sequence' defined in .bss section in /tmp/ccC7KgVm.o
a.cc:(.text+0xab): relocation truncated to fit: R_X86_64_PC32 against symbol `sequence' defined in .bss section in /tmp/ccC7KgVm.o
a.cc:(.text+0xb4): relocation truncated to fit: R_X86_64_PC32 against symbol `sequence' defined in .bss section in /tmp/ccC7KgVm.o
a.cc:(.text+0xbe): relocation truncated to fit: R_X86_64_PC32 against symbol `maxS' defined in .bss section in /tmp/ccC7KgVm.o
a.cc:(.text+0xce): relocation truncated to fit: R_X86_64_PC32 against symbol `maxS' defined in .bss section in /tmp/ccC7KgVm.o
a.cc:(.text+0xd4): relocation truncated to fit: R_X86_64_PC32 against symbol `sequence' defined in .bss section in /tmp/ccC7KgVm.o
a.cc:(.text+0xee): relocation truncated to fit: R_X86_64_PC32 against symbol `sequence' defined in .bss section in /tmp/ccC7KgVm.o
a.cc:(.text+0xf8): relocation truncated to fit: R_X86_64_PC32 against symbol `maxS' defined in .bss section in /tmp/ccC7KgVm.o
a.cc:(.text+0x108): relocation truncated to fit: R_X86_64_PC32 against symbol `maxS' defined in .bss section in /tmp/ccC7KgVm.o
a.cc:(.text+0x10e): relocation truncated to fit: R_X86_64_PC32 against symbol `maxS' defined in .bss section in /tmp/ccC7KgVm.o
collect2: error: ld returned 1 exit status
Language: C++

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

int main(){
  int n;
  vector<int>x(n);
  for(int i = 0; i < n; i++){
    cin >> x.at(i);
  }
  int ans = 0;
  int ansF = 0;
  cout << n << ans << endl;
  for(int i = 0; i < n; i++){
    int j = i;
    while(  ){
      if( x.at(j) >= x.at(j+1) ){
        ans++;
        j++;
      }else{
        break;
      }
    }
    if(ansF>ans){
      ansF = ans;
    }
    ans = 0;
  }
  
  cout << ansF << endl;
  
}

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

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

int main() {
int N; 
  cin>>N;
  vector<int> S(N);
  for(int i=0; i<N; i++){
    cin>>S.at(i);
  }
  int A=0;
  vector<int> B(N-1);
  for(int j=0; j<N-1; j++){
    if(S.at(j)>=S.at(j+1){
       A++
    }
       else break;
       B.at(j)=A;
       }
       sort(B.begin(), B.end());
       reverse(B.begin(),B.end());
       cout<<B.at(0)<<endl;
       }
       
       

Compiler output:
a.cc: In function 'int main()':
a.cc:14:26: error: expected ';' before '{' token
   14 |     if(S.at(j)>=S.at(j+1){
      |                          ^
      |                          ;
a.cc:17:8: error: expected primary-expression before 'else'
   17 |        else break;
      |        ^~~~
a.cc:16:6: error: expected ')' before 'else'
   16 |     }
      |      ^
      |      )
   17 |        else break;
      |        ~~~~
a.cc:14:7: note: to match this '('
   14 |     if(S.at(j)>=S.at(j+1){
      |       ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
long long int t, arr[1000000000], sequence, maxS;
int main(){
	//ios::sync_with_stdio(0), cin.tie(0);
	//cout<< fixed<< setprecision(10) << x << endl;
	cin>>t;
	for(long long int a = 0; a < t; a++){
        cin>>arr[a];
	}
	for(long long int a = 1; a < t; a++){
        if(arr[a - 1] >= arr[a])sequence++;
        else{
            maxS = max(maxS, sequence);
            sequence = 0;
        }
	}
	maxS = max(maxS, sequence);
	cout<<maxS<<endl;
}

Compiler output:
/tmp/ccBUIuak.o: in function `main':
a.cc:(.text+0xa9): relocation truncated to fit: R_X86_64_PC32 against symbol `sequence' defined in .bss section in /tmp/ccBUIuak.o
a.cc:(.text+0xb4): relocation truncated to fit: R_X86_64_PC32 against symbol `sequence' defined in .bss section in /tmp/ccBUIuak.o
a.cc:(.text+0xbd): relocation truncated to fit: R_X86_64_PC32 against symbol `sequence' defined in .bss section in /tmp/ccBUIuak.o
a.cc:(.text+0xc7): relocation truncated to fit: R_X86_64_PC32 against symbol `maxS' defined in .bss section in /tmp/ccBUIuak.o
a.cc:(.text+0xd9): relocation truncated to fit: R_X86_64_PC32 against symbol `maxS' defined in .bss section in /tmp/ccBUIuak.o
a.cc:(.text+0xe0): relocation truncated to fit: R_X86_64_PC32 against symbol `sequence' defined in .bss section in /tmp/ccBUIuak.o
a.cc:(.text+0x101): relocation truncated to fit: R_X86_64_PC32 against symbol `sequence' defined in .bss section in /tmp/ccBUIuak.o
a.cc:(.text+0x10b): relocation truncated to fit: R_X86_64_PC32 against symbol `maxS' defined in .bss section in /tmp/ccBUIuak.o
a.cc:(.text+0x11d): relocation truncated to fit: R_X86_64_PC32 against symbol `maxS' defined in .bss section in /tmp/ccBUIuak.o
a.cc:(.text+0x124): relocation truncated to fit: R_X86_64_PC32 against symbol `maxS' defined in .bss section in /tmp/ccBUIuak.o
collect2: error: ld returned 1 exit status
Language: C++

#include <bits/stdc++.h>
using namespace std;
long long int t, arr[1000000000], sequence, maxS;
int main(){
	//ios::sync_with_stdio(0), cin.tie(0);
	//cout<< fixed<< setprecision(10) << x << endl;
	cin>>t;
	for(long long int a = 0; a < t; a++){
        cin>>arr[a];
	}
	for(long long int a = 1; a < t; a++){
        if(arr[a - 1] >= arr[a])sequence++;
        else{
            maxS = max(maxS, sequence);
            sequence = 0;
        }
	}
	maxS = max(maxS, sequence);
	cout<<maxS<<endl;
}


Compiler output:
/tmp/ccypVVnc.o: in function `main':
a.cc:(.text+0xa9): relocation truncated to fit: R_X86_64_PC32 against symbol `sequence' defined in .bss section in /tmp/ccypVVnc.o
a.cc:(.text+0xb4): relocation truncated to fit: R_X86_64_PC32 against symbol `sequence' defined in .bss section in /tmp/ccypVVnc.o
a.cc:(.text+0xbd): relocation truncated to fit: R_X86_64_PC32 against symbol `sequence' defined in .bss section in /tmp/ccypVVnc.o
a.cc:(.text+0xc7): relocation truncated to fit: R_X86_64_PC32 against symbol `maxS' defined in .bss section in /tmp/ccypVVnc.o
a.cc:(.text+0xd9): relocation truncated to fit: R_X86_64_PC32 against symbol `maxS' defined in .bss section in /tmp/ccypVVnc.o
a.cc:(.text+0xe0): relocation truncated to fit: R_X86_64_PC32 against symbol `sequence' defined in .bss section in /tmp/ccypVVnc.o
a.cc:(.text+0x101): relocation truncated to fit: R_X86_64_PC32 against symbol `sequence' defined in .bss section in /tmp/ccypVVnc.o
a.cc:(.text+0x10b): relocation truncated to fit: R_X86_64_PC32 against symbol `maxS' defined in .bss section in /tmp/ccypVVnc.o
a.cc:(.text+0x11d): relocation truncated to fit: R_X86_64_PC32 against symbol `maxS' defined in .bss section in /tmp/ccypVVnc.o
a.cc:(.text+0x124): relocation truncated to fit: R_X86_64_PC32 against symbol `maxS' defined in .bss section in /tmp/ccypVVnc.o
collect2: error: ld returned 1 exit status
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> vec(n);
  int cnt=0
  rep(i,){
    if (vec.at(i)>=vec.at(i+1)) cnt++;
  }
  cout << cnt << endl;
}
    

Compiler output:
a.cc: In function 'int main()':
a.cc:7:11: error: found ':' in nested-name-specifier, expected '::'
    7 |   cin >> n:
      |           ^
      |           ::
a.cc:7:10: error: 'n' is not a class, namespace, or enumeration
    7 |   cin >> n:
      |          ^
a.cc:8:10: error: expected primary-expression before 'int'
    8 |   vector<int> vec(n);
      |          ^~~
a.cc:2:18: error: expected ',' or ';' before 'for'
    2 | #define rep(i,n) for (int i=0;i<(n);++i)
      |                  ^~~
a.cc:10:3: note: in expansion of macro 'rep'
   10 |   rep(i,){
      |   ^~~
a.cc:10:7: error: 'i' was not declared in this scope
   10 |   rep(i,){
      |       ^
a.cc:2:31: note: in definition of macro 'rep'
    2 | #define rep(i,n) for (int i=0;i<(n);++i)
      |                               ^
a.cc:2:35: error: expected primary-expression before ')' token
    2 | #define rep(i,n) for (int i=0;i<(n);++i)
      |                                   ^
a.cc:10:3: note: in expansion of macro 'rep'
   10 |   rep(i,){
      |   ^~~
Language: C++

#include<iostream>

#define rep(i,n) for(int (i)=0;(i)<(n);++(i))
using namespace std;
int main()
{
    int n;
    vector<int> h;

    cin >> n;

    int c = 0, m = 0, mm = 0, mmm = 0;

    rep (i, n) {
        cin >> m;
        h.push_back(m);
        if (i > 0 && mm >= m) {
            ++c;
        }
        if (mmm < c) {
            mmm = c;
        }
        if (i > 0 && !(mm >= m)) {
            c = 0;
        }
        mm = m;
    }

    cout << mmm << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: 'vector' was not declared in this scope
    8 |     vector<int> h;
      |     ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include<iostream>
  +++ |+#include <vector>
    2 | 
a.cc:8:12: error: expected primary-expression before 'int'
    8 |     vector<int> h;
      |            ^~~
a.cc:16:9: error: 'h' was not declared in this scope
   16 |         h.push_back(m);
      |         ^
Language: C++

// #include <stdio.h>
// #include <string.h>
//#include <iostream>
#include <math.h>
#include <iostream>
#include <utility>
#include <cstdio>
#include <stack>
#include <queue>
#include <algorithm>
#include <map>
#include <string>
#include <set>


using namespace std;
typedef pair<int, int> XY;// Pair型変数の宣言
typedef long long ll;
const ll MOD = (ll)1e9 + 7;
    

int main()
{
  	int Nmax = 100000;
    ll H[Nmax];
//    char String[Nmax];
    int N;
    int i,j,k;

/*   
    // int型スタック
    stack<int> stack;   
    stack.push(777);
    stack.push(778);
    stack.push(779);
  
	int tmpsl = stack.top();  // LAST要素の参照
 // 	int tpmsf = stack.back(); // FIRST要素の参照
 //	printf("%d %d \n",tmpsl,tmpsf);
    stack.pop();// LAST要素の削除（取出しではない）
 // 	if( stack.empty() == true) printf("empty stack\n");
     
    // int型キュー
    queue<int> que;
  	que.push(999);
  	que.push(998);   
  	que.push(997);    
  	int tmpqs = que.front(); // FIRST要素の参照
  	int tmpqe = que.back();  // LAST要素の参照
 //	printf("%d %d \n",tmpqs,tmpqe);
  	que.pop();  // FIRST要素の削除（取出しではない）
  //	if( que.empty() == true) printf("empty que\n");
    
    // ２次元座標を扱うキュー
    queue<XY> xyque; // ２次元座標型変数のキュー
  	XY p; 
  	xyque.pop();	// FIRST要素の削除。キューが空のときは削除が予約されて次のPOPが即削除される
  	xyque.push( XY(5,5) );
    xyque.push( XY(5,5) );
   	p = xyque.front();  // FIRST要素からのコピー
 // 	printf("%d %d\n", p.first, p.second);
  	
    
  que.back();
  //  sort(&(que.front()), &(que.back()));
        
  */ 
      
    // 入力読込
    // 文字列
 //   scanf("%s", String);   
    
    // 数列
    scanf("%d ", &N);
    scanf("%lld", &K);
    for(i=1;i<=N;i++){
        scanf("%lld ",&H[i]);
    }
    
    // 文字列の長さをチェック
    // 文字列は配列の0からlen-1に格納されてる
//    len = strlen( String );
//  	printf("%d\n",len);
    
    ll count = 0;
    ll count_max =0;
    for(i = 1;i<=N;i++){
        count =0;
        for(j= i ; j <= N ;j++){
            if(H[i] > H[j]){
                count++;
                if( count > count_max) count_max = count;
            }
            else
                j = N;
        }
    }

    
    
    // 結果出力
//    printf("%d",count);
  	cout << count_max  << endl;
/*    
    if(flag == -1)
        printf("NO \n");
    else
        printf("YES \n");
  */      
  
  return 0;
   
}

Compiler output:
a.cc: In function 'int main()':
a.cc:75:20: error: 'K' was not declared in this scope
   75 |     scanf("%lld", &K);
      |                    ^
Language: C++

#include<iostream>

using namespace std;

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

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

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

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

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

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

    int ans = max(n, dp);

    cout << ans;
}


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

// #include <stdio.h>
// #include <string.h>
//#include <iostream>
#include <math.h>
#include <iostream>
#include <utility>
#include <cstdio>
#include <stack>
#include <queue>
#include <algorithm>
#include <map>
#include <string>
#include <set>


using namespace std;
typedef pair<int, int> XY;// Pair型変数の宣言
typedef long long ll;
const ll MOD = (ll)1e9 + 7;
    

int main()
{
  	int Nmax = 100000;
    ll H[Nmax];
//    char String[Nmax];
    int N;
    int i,j,k;

/*   
    // int型スタック
    stack<int> stack;   
    stack.push(777);
    stack.push(778);
    stack.push(779);
  
	int tmpsl = stack.top();  // LAST要素の参照
 // 	int tpmsf = stack.back(); // FIRST要素の参照
 //	printf("%d %d \n",tmpsl,tmpsf);
    stack.pop();// LAST要素の削除（取出しではない）
 // 	if( stack.empty() == true) printf("empty stack\n");
     
    // int型キュー
    queue<int> que;
  	que.push(999);
  	que.push(998);   
  	que.push(997);    
  	int tmpqs = que.front(); // FIRST要素の参照
  	int tmpqe = que.back();  // LAST要素の参照
 //	printf("%d %d \n",tmpqs,tmpqe);
  	que.pop();  // FIRST要素の削除（取出しではない）
  //	if( que.empty() == true) printf("empty que\n");
    
    // ２次元座標を扱うキュー
    queue<XY> xyque; // ２次元座標型変数のキュー
  	XY p; 
  	xyque.pop();	// FIRST要素の削除。キューが空のときは削除が予約されて次のPOPが即削除される
  	xyque.push( XY(5,5) );
    xyque.push( XY(5,5) );
   	p = xyque.front();  // FIRST要素からのコピー
 // 	printf("%d %d\n", p.first, p.second);
  	
    
  que.back();
  //  sort(&(que.front()), &(que.back()));
        
  */ 
      
    // 入力読込
    // 文字列
 //   scanf("%s", String);   
    
    // 数列
    scanf("%d ", &N);
    scanf("%lld", &K);
    for(i=1;i<=N;i++){
        scanf("%lld ",&H[i]);
    }
    
    // 文字列の長さをチェック
    // 文字列は配列の0からlen-1に格納されてる
//    len = strlen( String );
//  	printf("%d\n",len);
    
    ll count = 0;
    ll couut_max =0;
    for(i = 1;i<=N;i++){
        count =0;
        for(j= i ; j <= N ;j++){
            if(H[i] > H[j]){
                count++;
                if( count > count_max) count_max = count;
            }
            else
                j = N;
        }
    }

    
    
    // 結果出力
//    printf("%d",count);
  	cout << count_max  << endl;
/*    
    if(flag == -1)
        printf("NO \n");
    else
        printf("YES \n");
  */      
  
  return 0;
   
}

Compiler output:
a.cc: In function 'int main()':
a.cc:75:20: error: 'K' was not declared in this scope
   75 |     scanf("%lld", &K);
      |                    ^
a.cc:92:29: error: 'count_max' was not declared in this scope; did you mean 'couut_max'?
   92 |                 if( count > count_max) count_max = count;
      |                             ^~~~~~~~~
      |                             couut_max
a.cc:103:17: error: 'count_max' was not declared in this scope; did you mean 'couut_max'?
  103 |         cout << count_max  << endl;
      |                 ^~~~~~~~~
      |                 couut_max
Language: C++

#include<iostream>
#include<cstdio>
#include<algorithm>
#define maxn 100005
using namespace std;
int a[maxn], dp[maxn];
struct cmp { bool operator()(int a, int b) { return a > b; } };
int main()
{
	int n;
	while (scanf("%d", &n) == 1) {
		memset(a, 0, sizeof(a));
		memset(dp, 0, sizeof(dp));
		for (int i = 1; i <= n; i++) scanf("%d", a + i);
		dp[n] = 0;
		for (int i = n-1; i >=1; i--) {
			if (a[i] >= a[i + 1]) dp[i] = dp[i + 1] + 1;
			else dp[i] = 0;
		}
		int ans = 0;
		for (int i = 1; i <= n; i++) ans = max(ans, dp[i]);
		cout << ans << endl;
	}
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:17: error: 'memset' was not declared in this scope
   12 |                 memset(a, 0, sizeof(a));
      |                 ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    3 | #include<algorithm>
  +++ |+#include <cstring>
    4 | #define maxn 100005
Language: C++

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

// change min/max
template<class T> inline bool chMin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
template<class T> inline bool chMax(T& a, T b) { if (a < b) { a = b; return true; } return false; }

template<typename T> void outputVec(vector<T>& vec) {
	for (vector<T>::iterator it = vec.begin(); it != vec.end() - 1; ++it) { cout << *it << " "; }
	cout << *(vec.end() - 1) << "\n";
}
template<typename T> void inputVec(vector<T>& vec) {
	for (vector<T>::iterator it = vec.begin(); it != vec.end(); ++it) { cin >> *it; }
}

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

	int N;
	cin >> N;
	vector<int> H(N);
	inputVec(H);

	vector<int> rightcnt(N, 0);
	int maxcnt = 0;
	for (int i = N-2; i >= 0; --i) {
		if (H[i] >= H[i + 1]) {
			rightcnt[i] = rightcnt[i + 1] + 1;
		}
		else {
			rightcnt[i] = 0;
		}
		chMax(maxcnt, rightcnt[i]);
	}

	cout << maxcnt << "\n";

	return 0;
}


Compiler output:
a.cc: In function 'void outputVec(std::vector<T>&)':
a.cc:10:14: error: need 'typename' before 'std::vector<T>::iterator' because 'std::vector<T>' is a dependent scope
   10 |         for (vector<T>::iterator it = vec.begin(); it != vec.end() - 1; ++it) { cout << *it << " "; }
      |              ^~~~~~~~~
a.cc:10:33: error: expected ';' before 'it'
   10 |         for (vector<T>::iterator it = vec.begin(); it != vec.end() - 1; ++it) { cout << *it << " "; }
      |                                 ^~~
      |                                 ;
a.cc:10:52: error: 'it' was not declared in this scope; did you mean 'int'?
   10 |         for (vector<T>::iterator it = vec.begin(); it != vec.end() - 1; ++it) { cout << *it << " "; }
      |                                                    ^~
      |                                                    int
a.cc: In function 'void inputVec(std::vector<T>&)':
a.cc:14:14: error: need 'typename' before 'std::vector<T>::iterator' because 'std::vector<T>' is a dependent scope
   14 |         for (vector<T>::iterator it = vec.begin(); it != vec.end(); ++it) { cin >> *it; }
      |              ^~~~~~~~~
a.cc:14:33: error: expected ';' before 'it'
   14 |         for (vector<T>::iterator it = vec.begin(); it != vec.end(); ++it) { cin >> *it; }
      |                                 ^~~
      |                                 ;
a.cc:14:52: error: 'it' was not declared in this scope; did you mean 'int'?
   14 |         for (vector<T>::iterator it = vec.begin(); it != vec.end(); ++it) { cin >> *it; }
      |                                                    ^~
      |                                                    int
a.cc: In instantiation of 'void inputVec(std::vector<T>&) [with T = int]':
a.cc:23:10:   required from here
   23 |         inputVec(H);
      |         ~~~~~~~~^~~
a.cc:14:25: error: dependent-name 'std::vector<T>::iterator' is parsed as a non-type, but instantiation yields a type
   14 |         for (vector<T>::iterator it = vec.begin(); it != vec.end(); ++it) { cin >> *it; }
      |                         ^~~~~~~~
a.cc:14:25: note: say 'typename std::vector<T>::iterator' if a type is meant
Language: C++

#include<iostream>

using namespace std;

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

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

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

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

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

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

    int ans = max(n, dp);

    cout << ans;
}

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

#include <bits/stdc++.h>
#define ll long long
#define pll pair<ll,ll>
#define ppi pair<int,pair<int,int> >
#define fr first
#define sc second
#define PI acos(-1)
#define mp make_pair

using namespace std;


int a[100010];
int b[100010];
int n;
int main()
{
    ios::sync_with_stdio(0);
    cin .tie(0);
    cout.tie(0);

    cin >> n;
    int k = sqrt(n);
    for(int i = 1;i<=n;i++){
        cin >> a[i];
        b[i] = a[i] > a[i-1];
        b[i] += b[i-1];
    }
    int ans = 0 ;
    for(int i = 1;i < n;i++){
        ans = max(ans , upper_bound(b + i,b + n + 1,b[i])-(b + i) - 1);
    }
    cout << ans;

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:31:18: error: no matching function for call to 'max(int&, long int)'
   31 |         ans = max(ans , upper_bound(b + i,b + n + 1,b[i])-(b + i) - 1);
      |               ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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:31:18: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'long int')
   31 |         ans = max(ans , upper_bound(b + i,b + n + 1,b[i])-(b + i) - 1);
      |               ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/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:31:18: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   31 |         ans = max(ans , upper_bound(b + i,b + n + 1,b[i])-(b + i) - 1);
      |               ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
#define endl '\n'
#define fast ios::sync_with_stdio(0),cin.tie(0),cout.tie(0)
#define zy -2147382637
#define bql 2147483647
#define ll long long
#define ull unsigned long long
#define ld long double
#define maxn 100010
#define rp(i, l, r) for (int i = l; i <= r; i++)
#define rb(i, r, l) for (int i = r; i >= l; i--)
#define fi first
#define se second
#define pb push_back
#define mp make_pair

using namespace std;
ll prime(ll x){
   if(x<=1)return false;
   for(int i=2;i<=int(sqrt(x));i++){
	   if(x%i==0)return false;
   }return true;
}
ll gcd(ll a,ll b){ll r;while(b>0){r=a%b;a=b;b=r;}return a;}
ll powmod(ll a,ll b,ll mod) {ll res=1;a%=mod; assert(b>=0); for(;b;b>>=1){if(b&1)res=res*a%mod;a=a*a%mod;}return res;}
template <typename T>
inline void read(T &x) {
	char c = getchar(); int w = 1; x = 0;
	while (!isdigit(c))
		(c == '-') && (w = -w), c = getchar();
	while (isdigit(c))
		x = (x << 1) + (x << 3) + (c ^ '0'), c = getchar();
	x *= w;
}
const int dx[8] = {-1, 1, 0, 0, -1, 1, -1, 1},
		  dy[8] = {0, 0, -1, 1, -1, -1, 1, 1};
int main(){
	fast;
	ll n;
	cin>>n;
	ll a[n+1],sum=0,maxv=-100,p;
	for(int i=1;i<=n;i++)cin>>a[i];
	p=a[2];
	for(int i=2;i<=n;i++){
		if(p<=a[i-1]){
			sum++;
			a[i]=p;
		}else maxv=max(maxv,ans);
	}maxv=max(ans,maxv);
	cout<<maxv<<endl; return 0;
}/*『你强归你强，我永不示弱』*/


Compiler output:
a.cc: In function 'int main()':
a.cc:48:37: error: 'ans' was not declared in this scope; did you mean 'abs'?
   48 |                 }else maxv=max(maxv,ans);
      |                                     ^~~
      |                                     abs
a.cc:49:19: error: 'ans' was not declared in this scope; did you mean 'abs'?
   49 |         }maxv=max(ans,maxv);
      |                   ^~~
      |                   abs
Language: C++

// #include <stdio.h>
// #include <string.h>
//#include <iostream>
#include <math.h>
#include <iostream>
#include <utility>
#include <cstdio>
#include <stack>
#include <queue>
#include <algorithm>
#include <map>
#include <string>
#include <set>


using namespace std;
typedef pair<int, int> XY;// Pair型変数の宣言
typedef long long ll;
const ll MOD = (ll)1e9 + 7;
    

int main()
{
  	int Nmax = 100000;
    ll H[Nmax];
//    char String[Nmax];
    int N;
    int i,j,k;
    int len;   // 文字列の長さ
    int flag=0;
//    int t[Nmax];
  //  int x[Nmax];
    //int y[Nmax];
    int M,D;
    int count = 0;
    int d1,d10;
    int d,m;
    ll K;
/*   
    // int型スタック
    stack<int> stack;   
    stack.push(777);
    stack.push(778);
    stack.push(779);
  
	int tmpsl = stack.top();  // LAST要素の参照
 // 	int tpmsf = stack.back(); // FIRST要素の参照
 //	printf("%d %d \n",tmpsl,tmpsf);
    stack.pop();// LAST要素の削除（取出しではない）
 // 	if( stack.empty() == true) printf("empty stack\n");
     
    // int型キュー
    queue<int> que;
  	que.push(999);
  	que.push(998);   
  	que.push(997);    
  	int tmpqs = que.front(); // FIRST要素の参照
  	int tmpqe = que.back();  // LAST要素の参照
 //	printf("%d %d \n",tmpqs,tmpqe);
  	que.pop();  // FIRST要素の削除（取出しではない）
  //	if( que.empty() == true) printf("empty que\n");
    
    // ２次元座標を扱うキュー
    queue<XY> xyque; // ２次元座標型変数のキュー
  	XY p; 
  	xyque.pop();	// FIRST要素の削除。キューが空のときは削除が予約されて次のPOPが即削除される
  	xyque.push( XY(5,5) );
    xyque.push( XY(5,5) );
   	p = xyque.front();  // FIRST要素からのコピー
 // 	printf("%d %d\n", p.first, p.second);
  	
    
  que.back();
  //  sort(&(que.front()), &(que.back()));
        
  */ 
      
    // 入力読込
    // 文字列
 //   scanf("%s", String);   
    
    // 数列
    scanf("%d ", &N);
    scanf("%lld", &K);
    for(i=1;i<=N;i++){
        scanf("%lld ",&H[i]);
    }
    
    // 文字列の長さをチェック
    // 文字列は配列の0からlen-1に格納されてる
//    len = strlen( String );
//  	printf("%d\n",len);
    
    ll count = 0;
    ll couut_max =0;
    for(int i = 1;i<=N;i++){
        count =0;
        for(int j= i ; j <= N ;j++){
            if(H[i] > H[j]){
                count++;
                if( count > count_max) count_max = count;
            }
            else
                j = N;
        }
    }

    
    
    // 結果出力
//    printf("%d",count);
  	cout << count_max  << endl;
/*    
    if(flag == -1)
        printf("NO \n");
    else
        printf("YES \n");
  */      
  
  return 0;
   
}

Compiler output:
a.cc: In function 'int main()':
a.cc:94:8: error: conflicting declaration 'll count'
   94 |     ll count = 0;
      |        ^~~~~
a.cc:35:9: note: previous declaration as 'int count'
   35 |     int count = 0;
      |         ^~~~~
a.cc:101:29: error: 'count_max' was not declared in this scope; did you mean 'couut_max'?
  101 |                 if( count > count_max) count_max = count;
      |                             ^~~~~~~~~
      |                             couut_max
a.cc:112:17: error: 'count_max' was not declared in this scope; did you mean 'couut_max'?
  112 |         cout << count_max  << endl;
      |                 ^~~~~~~~~
      |                 couut_max
Language: C++

#include<fstream>
#include<string>
#include<iostream>
#include<sstream>
#include<iterator>
#include<cmath>

using namespace std;


int main(){
 int N;
 cin >> N;
 int a[N];
 int i;
 for(i=0;i<N;++i){
     cin >> a[i];
   }
  int tmp = 0;
  int best = 0;
 for(i=0;i<N-1;++i){
   if(a[i]=>a[i+1])tmp++;
    else{
        best = max(best,tmp);
        tmp = 0;
    }
 }
  best = max(tmp,best);
  cout << best << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:12: error: expected primary-expression before '>' token
   22 |    if(a[i]=>a[i+1])tmp++;
      |            ^
Language: C++

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

int main(){
  int N;
  cin >> N;
  vecter<int> H;
  int tmp;
  for(int i=0;i<N;i++){
   cin >> tmp;
   H.push_back(tmp);
  }
  int count=0;
  int max=0;
  for(int i=0;i<N-1;i++){
   if(H[i]>=H[i+1]){
    count++; 
   }
   else{
    count=0; 
   }
   if(count>max){
    max=count; 
   }
  }

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: 'vecter' was not declared in this scope
    8 |   vecter<int> H;
      |   ^~~~~~
a.cc:8:10: error: expected primary-expression before 'int'
    8 |   vecter<int> H;
      |          ^~~
a.cc:12:4: error: 'H' was not declared in this scope
   12 |    H.push_back(tmp);
      |    ^
a.cc:17:7: error: 'H' was not declared in this scope
   17 |    if(H[i]>=H[i+1]){
      |       ^