Language: C++

#include<iostream>
#include<vector>
#include<algorithm>
#include<string>
#include<map>
#include<math.h>
#include<iomanip>
#include<set>
#include<limits.h>
#include<cmath>
#include<queue>
#include<stack>

#include<stdio.h>
#include<stdlib.h>

#define rep(i,n) for(ll i = 0; i < (ll)n; i++)
#define swap(a,b) a^=b;b^=a;a^=b;
#define chmax(a,b) {if(a < b) a = b;}
#define chmin(a,b) {if(a > b) a = b;}

using namespace std;
typedef long long ll;
ll gcd(ll, ll);
vector<bool> to_binary(int);
ll nCr(ll n, ll r);

const ll INF = 1LL << 60;

typedef tuple<ll, ll> mtupl;

bool mycomp(mtupl x, mtupl y) {
	return get<1>(x) < get<1>(y);
}

int vsum(vector<int> v) {
	int res = 0;
	for (auto it = v.begin(); it != v.end(); it++)
		res += *it;
	return res;
}

int vmin(vector<int> v) {
	int min = INT32_MAX;
	for (auto it = v.begin(); it != v.end(); it++)
		min = std::min(min, *it);
	return min;
}

int vmax(vector<int> v) {
	int max = INT32_MIN;
	for (auto it = v.begin(); it != v.end(); it++)
		max = std::max(max, *it);
	return max;
}

ll gcd(ll A, ll B) {
	if (A == 0 || B == 0) return max(A, B);
	int r = A % B;
	while (r != 0) {
		A = B;
		B = r;
		r = A % B;
	}
	return B;
}

vector<ll> prime_factor(int64_t n) {
	//map< ll, ll > ret;
	vector<ll> ret;
	for (ll i = 2; i * i <= n; i++) {
		while (n % i == 0) {
			//ret[i]++;
			ret.push_back(i);
			n /= i;
		}
	}
	if (n != 1)ret.push_back(n);// ret[n] = 1;
	return ret;
}

const int MAX = 1000000;
const int MOD = 1000000007;
ll fac[MAX], finv[MAX], inv[MAX];

void COMinit() {
	fac[0] = fac[1] = 1;
	finv[0] = finv[1] = 1;
	inv[1] = 1;
	for (int i = 2; i < MAX; i++) {
		fac[i] = fac[i - 1] * i % MOD;
		inv[i] = MOD - inv[MOD % i] * (MOD / i) % MOD;
		finv[i] = finv[i - 1] * inv[i] % MOD;
	}
}
ll COM(int n, int k) {
	if (n < k) return 0;
	if (n < 0 || k < 0) return 0;
	return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}

struct edge {
	ll to;
	ll cost;
};

int main(void) {
	cin.tie(0);
	ios::sync_with_stdio(false);
	//Program Start	


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

	rep(i, N) cin >> H[i];

	vector<int> counter(N);
	ll tmp = H[0];
	int count = 0;

	counter[0] = 0;
	ll i = 1;
	for (auto it = H.begin() + 1; it != H.end(); it++) {
		if (*it <= tmp) {
			count++;
			tmp = *it;
		}
		else {
			count = 0;
			tmp = *it;
		}

		counter[i++] = count;
	}
	
	int max = counter[0];
	for (auto it = counter.begin() + 1; it != counter.end(); it++) {
		max = std::max(max, *it);
	}

	cout << max << endl;


ProgramEndPointLabel:;

	//Program End
#ifndef DEBUG
	system("pause");
#endif // !DEBUG


	return 0;
}


#include<iostream>
#include<vector>
#include<algorithm>
#include<string>
#include<map>
#include<math.h>
#include<iomanip>
#include<set>
#include<limits.h>
#include<cmath>
#include<queue>
#include<stack>

#include<stdio.h>
#include<stdlib.h>

#define rep(i,n) for(ll i = 0; i < (ll)n; i++)
#define swap(a,b) a^=b;b^=a;a^=b;
#define chmax(a,b) {if(a < b) a = b;}
#define chmin(a,b) {if(a > b) a = b;}

using namespace std;
typedef long long ll;
ll gcd(ll, ll);
vector<bool> to_binary(int);
ll nCr(ll n, ll r);

const ll INF = 1LL << 60;

typedef tuple<ll, ll> mtupl;

bool mycomp(mtupl x, mtupl y) {
	return get<1>(x) < get<1>(y);
}

int vsum(vector<int> v) {
	int res = 0;
	for (auto it = v.begin(); it != v.end(); it++)
		res += *it;
	return res;
}

int vmin(vector<int> v) {
	int min = INT32_MAX;
	for (auto it = v.begin(); it != v.end(); it++)
		min = std::min(min, *it);
	return min;
}

int vmax(vector<int> v) {
	int max = INT32_MIN;
	for (auto it = v.begin(); it != v.end(); it++)
		max = std::max(max, *it);
	return max;
}

ll gcd(ll A, ll B) {
	if (A == 0 || B == 0) return max(A, B);
	int r = A % B;
	while (r != 0) {
		A = B;
		B = r;
		r = A % B;
	}
	return B;
}

vector<ll> prime_factor(int64_t n) {
	//map< ll, ll > ret;
	vector<ll> ret;
	for (ll i = 2; i * i <= n; i++) {
		while (n % i == 0) {
			//ret[i]++;
			ret.push_back(i);
			n /= i;
		}
	}
	if (n != 1)ret.push_back(n);// ret[n] = 1;
	return ret;
}

const int MAX = 1000000;
const int MOD = 1000000007;
ll fac[MAX], finv[MAX], inv[MAX];

void COMinit() {
	fac[0] = fac[1] = 1;
	finv[0] = finv[1] = 1;
	inv[1] = 1;
	for (int i = 2; i < MAX; i++) {
		fac[i] = fac[i - 1] * i % MOD;
		inv[i] = MOD - inv[MOD % i] * (MOD / i) % MOD;
		finv[i] = finv[i - 1] * inv[i] % MOD;
	}
}
ll COM(int n, int k) {
	if (n < k) return 0;
	if (n < 0 || k < 0) return 0;
	return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}

struct edge {
	ll to;
	ll cost;
};

int main(void) {
	cin.tie(0);
	ios::sync_with_stdio(false);
	//Program Start	


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

	rep(i, N) cin >> H[i];

	vector<int> counter(N);
	ll tmp = H[0];
	int count = 0;

	counter[0] = 0;
	ll i = 1;
	for (auto it = H.begin() + 1; it != H.end(); it++) {
		if (*it <= tmp) {
			count++;
			tmp = *it;
		}
		else {
			count = 0;
			tmp = *it;
		}

		counter[i++] = count;
	}
	
	int max = counter[0];
	for (auto it = counter.begin() + 1; it != counter.end(); it++) {
		max = std::max(max, *it);
	}

	cout << max << endl;


ProgramEndPointLabel:;

	//Program End
#ifndef DEBUG
	system("pause");
#endif // !DEBUG


	return 0;
}




Compiler output:
a.cc: In function 'int vmin(std::vector<int>)':
a.cc:44:19: error: 'INT32_MAX' was not declared in this scope
   44 |         int min = INT32_MAX;
      |                   ^~~~~~~~~
a.cc:16:1: note: 'INT32_MAX' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
   15 | #include<stdlib.h>
  +++ |+#include <cstdint>
   16 | 
a.cc: In function 'int vmax(std::vector<int>)':
a.cc:51:19: error: 'INT32_MIN' was not declared in this scope; did you mean 'INT_MIN'?
   51 |         int max = INT32_MIN;
      |                   ^~~~~~~~~
      |                   INT_MIN
a.cc: At global scope:
a.cc:185:10: error: redefinition of 'const ll INF'
  185 | const ll INF = 1LL << 60;
      |          ^~~
a.cc:28:10: note: 'const ll INF' previously defined here
   28 | const ll INF = 1LL << 60;
      |          ^~~
a.cc:189:6: error: redefinition of 'bool mycomp(mtupl, mtupl)'
  189 | bool mycomp(mtupl x, mtupl y) {
      |      ^~~~~~
a.cc:32:6: note: 'bool mycomp(mtupl, mtupl)' previously defined here
   32 | bool mycomp(mtupl x, mtupl y) {
      |      ^~~~~~
a.cc:193:5: error: redefinition of 'int vsum(std::vector<int>)'
  193 | int vsum(vector<int> v) {
      |     ^~~~
a.cc:36:5: note: 'int vsum(std::vector<int>)' previously defined here
   36 | int vsum(vector<int> v) {
      |     ^~~~
a.cc:200:5: error: redefinition of 'int vmin(std::vector<int>)'
  200 | int vmin(vector<int> v) {
      |     ^~~~
a.cc:43:5: note: 'int vmin(std::vector<int>)' previously defined here
   43 | int vmin(vector<int> v) {
      |     ^~~~
a.cc: In function 'int vmin(std::vector<int>)':
a.cc:201:19: error: 'INT32_MAX' was not declared in this scope
  201 |         int min = INT32_MAX;
      |                   ^~~~~~~~~
a.cc:201:19: note: 'INT32_MAX' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
a.cc: At global scope:
a.cc:207:5: error: redefinition of 'int vmax(std::vector<int>)'
  207 | int vmax(vector<int> v) {
      |     ^~~~
a.cc:50:5: note: 'int vmax(std::vector<int>)' previously defined here
   50 | int vmax(vector<int> v) {
      |     ^~~~
a.cc: In function 'int vmax(std::vector<int>)':
a.cc:208:19: error: 'INT32_MIN' was not declared in this scope; did you mean 'INT_MIN'?
  208 |         int max = INT32_MIN;
      |                   ^~~~~~~~~
      |                   INT_MIN
a.cc: At global scope:
a.cc:214:4: error: redefinition of 'll gcd(ll, ll)'
  214 | ll gcd(ll A, ll B) {
      |    ^~~
a.cc:57:4: note: 'll gcd(ll, ll)' previously defined here
   57 | ll gcd(ll A, ll B) {
      |    ^~~
a.cc:225:12: error: redefinition of 'std::vector<long long int> prime_factor(int64_t)'
  225 | vector<ll> prime_factor(int64_t n) {
      |            ^~~~~~~~~~~~
a.cc:68:12: note: 'std::vector<long long int> prime_factor(int64_t)' previously defined here
   68 | vector<ll> prime_factor(int64_t n) {
      |            ^~~~~~~~~~~~
a.cc:239:11: error: redefinition of 'const int MAX'
  239 | const int MAX = 1000000;
      |           ^~~
a.cc:82:11: note: 'const int MAX' previously defined here
   82 | const int MAX = 1000000;
      |           ^~~
a.cc:240:11: error: redefinition of 'const int MOD'
  240 | const int MOD = 1000000007;
      |           ^~~
a.cc:83:11: note: 'const int MOD' previously defined here
   83 | const int MOD = 1000000007;
      |           ^~~
a.cc:241:4: error: redefinition of 'll fac [1000000]'
  241 | ll fac[MAX], finv[MAX], inv[MAX];
      |    ^~~
a.cc:84:4: note: 'll fac [1000000]' previously declared here
   84 | ll fac[MAX], finv[MAX], inv[MAX];
      |    ^~~
a.cc:241:14: error: redefinition of 'll finv [1000000]'
  241 | ll fac[MAX], finv[MAX], inv[MAX];
      |              ^~~~
a.cc:84:14: note: 'll finv [1000000]' previously declared here
   84 | ll fac[MAX], finv[MAX], inv[MAX];
      |              ^~~~
a.cc:241:25: error: redefinition of 'll inv [1000000]'
  241 | ll fac[MAX], finv[MAX], inv[MAX];
      |                         ^~~
a.cc:84:25: note: 'll inv [1000000]' previously declared here
   84 | ll fac[MAX], finv[MAX], inv[MAX];
      |                         ^~~
a.cc:243:6: error: redefinition of 'void COMinit()'
  243 | void COMinit() {
      |      ^~~~~~~
a.cc:86:6: note: 'void COMinit()' previously defined here
   86 | void COMinit() {
      |      ^~~~~~~
a.cc:253:4: error: redefinition of 'll COM(int, int)'
  253 | ll COM(int n, int k) {
      |    ^~~
a.cc:96:4: note: 'll COM(int, int)' previously defined here
   96 | ll COM(int n, int k) {
      |    ^~~
a.cc:259:8: error: redefinition of 'struct edge'
  259 | struct edge {
      |        ^~~~
a.cc:102:8: note: previous definition of 'struct edge'
  102 | struct edge {
      |        ^~~~
a.cc:264:5: error: redefinition of 'int main()'
  264 | int main(void) {
      |     ^~~~
a.cc:107:5: note: 'int main()' previously defined here
  107 | int main(void) {
      |     ^~~~