input stringlengths 20 127k | target stringlengths 20 119k | problem_id stringlengths 6 6 |
|---|---|---|
from collections import deque
N = int(eval(input()))
H = deque(list(map(int, input().split())))
ans = 0
n = 0
tmp = H.popleft()
while H:
nxt = H.popleft()
if tmp >= nxt:
n += 1
ans = max(ans, n)
else:
n = 0
tmp = nxt
print(ans) | N = int(eval(input()))
H = list(map(int, input().split()))
ans = 0
cnt = 0
pre = H[0]
for h in H[1:]:
if h <= pre:
cnt += 1
else:
ans = max(ans, cnt)
cnt = 0
pre = h
if cnt != 1:
ans = max(ans, cnt)
print(ans)
| p02923 |
n = int(eval(input()))
H = [int(x) for x in input().split()]
res = 0
right = 0
for left in range(n):
while right+1 < n and H[right] >= H[right+1]:
right += 1
res = max(res, right - left)
if right == left:
right += 1
print(res) | n = int(eval(input()))
h = [int(x) for x in input().split()]
dp = [0] * (n + 1)
cc = 0
for i in range(1, n):
if h[i] <= h[i-1]:
cc += 1
dp[i+1] = max(cc, dp[i])
else:
dp[i+1] = dp[i]
cc = 0
print((dp[n]))
| p02923 |
N=int(eval(input()))
H=list(map(int, input().split(" ")))
ans=0
for i in range(N-1):
j=i
cnt=0
while H[j]>=H[j+1]:
j+=1
cnt+=1
if ans<cnt:
ans=cnt
if j+1==N:
break
print(ans)
| N=int(eval(input()))
H=list(map(int, input().split(" ")))
ans=0
buf=[0 for _ in range(N-1)]
for i in range(N-1):
if H[i]>=H[i+1]:
buf[i]=1
cnt=0
for i in range(N-1):
if buf[i]==1:
cnt+=1
else:
cnt=0
if cnt>ans:
ans=cnt
print(ans)
| p02923 |
N = int(eval(input()))
H = list(map(int,input().split()))
count_list = []
count = 0
for i in range(N-1):
if H[i] >= H[i+1]:
count += 1
else:
count_list.append(count)
count = 0
else:
count_list.append(count)
print((max(count_list))) | N = int(eval(input()))
H = list(map(int,input().split()))
countlist = []
count = 0
for i in range(N-1):
if H[i] >= H[i+1]:
count += 1
else:
countlist.append(count)
count = 0
else:
countlist.append(count)
print((max(countlist))) | p02923 |
N = int(eval(input()))
H = list(map(int, input().split()))
ans = 0
num = 0
for i in range(N - 1):
if H[i] >= H[i+1]:
num += 1
ans = max(ans, num)
else:
num = 0
print(ans) | N = int(eval(input()))
H = tuple(map(int, input().split()))
ans = 0
d = 0
for i in range(N - 1):
if H[i+1] <= H[i]:
d += 1
ans = max(ans, d)
else:
d = 0
print(ans) | p02923 |
n = int(eval(input()))
h = list(map(int, input().split()))
temp = 0
for i in range(n-1):
a = 0
while i+a+1 < n and h[i+a]>=h[i+a+1]:
a += 1
temp = max(temp, a)
print(temp) | n = int(eval(input()))
h = list(map(int, input().split()))
temp = 0
i = 0
while i<n:
a = 0
while i+a+1 < n and h[i+a]>=h[i+a+1]:
a += 1
temp = max(temp, a)
if a == 0: i+=1
else: i+=a
print(temp) | p02923 |
N=int(eval(input()))
H=list(map(int,input().split()))
ans=0
for i in range(N-1):
tmp=0
for j in range(i,N-1):
if H[j] >= H[j+1]:
tmp += 1
else:
break
ans = max(ans,tmp)
print(ans) | N=int(eval(input()))
H=list(map(int,input().split()))
ans=0
i = 0
while i < N-1:
tmp=0
for j in range(i,N-1):
if H[j] >= H[j+1]:
tmp += 1
else:
break
ans = max(ans,tmp)
i = i + tmp +1
print(ans) | p02923 |
n = int(eval(input()))
h = list(map(int,input().split()))
res = []
for i in range(n):
count = 0
flag = True
for j in range(i,n-1):
if h[j] >= h[j+1]:
if flag:
count += 1
else:
flag = False
break
res.append(count)
print((max(res))) | n = int(eval(input()))
h = list(map(int,input().split()))
res = []
count = 0
for i in range(n-1):
if h[i] >= h[i+1]:
count += 1
if i == (n-2):
res.append(count)
else:
if count != 0:
res.append(count)
count = 0
if len(res) == 0:
print((0))
else:
print((max(res))) | p02923 |
n = int(eval(input()))
h = list(map(int, input().split()))
h_max = -1
ind = -1
cnt = -1
ans = -1
for i in range(n - 1, -1, -1):
if h[i] >= h_max:
ind = i
h_max = h[i]
cnt += 1
ans = max(ans, cnt)
else:
h_max = h[i]
cnt = 0
print(ans)
| def main():
N = int(eval(input()))
ans = 0
t = -1
p = 1 << 30
for h in map(int, input().split()):
if p >= h:
t += 1
if ans < t:
ans = t
else:
t = 0
p = h
print(ans)
if __name__ == '__main__':
m... | p02923 |
N = int(eval(input()))
lis_h = list(map(int, input().split()))
count = 0
max_move = 0
before = 0
for i in lis_h:
if i <= before:
count += 1
if max_move < count:
max_move = count
else:
count = 0
before = i
print(max_move)
... | n = int(eval(input()))
L = list(map(int,input().split()))
c = 0
mc = 0
for i in range(1,n):
if L[i - 1] >= L[i]:
c += 1
if c >= mc:
mc = c
else:
c = 0
print(mc)
| p02923 |
n=int(eval(input()))
h= list(map(int,input().split()))
count=[0]*n
for t in range(n):
for i in range(t,n-1):
if h[i]>=h[i+1]:
count[t]+=1
else:
break
print((max(count)))
| n=int(eval(input()))
h= list(map(int,input().split()))
COU=0
m_max=0
for i in h:
if i>COU:
m=0
else:
m+=1
if m>m_max:
m_max=m
COU=i
print(m_max) | p02923 |
N = int(eval(input()))
Hs = list(map(int, input().split()))
res = [0] * N
for index, h in enumerate(Hs):
l = 0
#if index > 0:
# l = max(res[index - 1] - 1, 0)
tmp = h
while index + l + 1 < N and tmp >= Hs[index + l + 1]:
tmp = Hs[index + l + 1]
l += 1
res[index]... | N = int(eval(input()))
Hs = list(map(int, input().split()))
res = [0] * N
for index, h in enumerate(Hs):
l = 0
if index > 0:
l = max(res[index - 1] - 3, 0)
tmp = h
while index + l + 1 < N and tmp >= Hs[index + l + 1]:
tmp = Hs[index + l + 1]
l += 1
res[index] =... | p02923 |
N = int(eval(input()))
Hs = list(map(int, input().split()))
res = [0] * N
for index, h in enumerate(Hs):
l = 0
if index > 0:
l = max(res[index - 1] - 3, 0)
tmp = h
while index + l + 1 < N and tmp >= Hs[index + l + 1]:
tmp = Hs[index + l + 1]
l += 1
res[index] =... | N = int(eval(input()))
Hs = list(map(int, input().split()))
res = [0] * N
for index, h in enumerate(Hs):
l = 0
if index > 0:
l = max(res[index - 1] - 2, 0)
tmp = h
while index + l + 1 < N and tmp >= Hs[index + l + 1]:
tmp = Hs[index + l + 1]
l += 1
res[index] =... | p02923 |
import sys
from math import pi, cos, sqrt
from collections import defaultdict
readline = sys.stdin.buffer.readline
#sys.setrecursionlimit(10**8)
def geta(fn=lambda s: s.decode()):
return list(map(fn, readline().split()))
def gete(fn=lambda s: s.decode()):
return fn(readline().rstrip())
def ... | import sys
from math import pi, cos, sqrt
from collections import defaultdict
readline = sys.stdin.buffer.readline
#sys.setrecursionlimit(10**8)
def geta(fn=lambda s: s.decode()):
return list(map(fn, readline().split()))
def gete(fn=lambda s: s.decode()):
return fn(readline().rstrip())
def ... | p02923 |
if __name__ == "__main__":
b = int(eval(input()))
a = list(map(int, input().split()))
a = a[::-1]
count = 0
value = 0
for i in range(1, b):
if a[i-1] <= a[i]: count+=1
else: count = 0
value = max(count, value)
print(value)
| n = eval(input())
a = list(map(int, input().split()))
#b = list(map(int, input().split()))
#c = list(map(int, input().split()))
m = 0
c = 0
for i in range(1, len(a)):
if a[i] <= a[i-1]:
c += 1
m = max(m, c)
else:
c = 0
print(m) | p02923 |
#!usr/bin/env python3
from collections import defaultdict,deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS():return [list(x) for x in sys.stdin.readline()... | #!usr/bin/env python3
from collections import defaultdict, deque
from heapq import heappush, heappop
from itertools import permutations, accumulate
import sys
import math
import bisect
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS():return [lis... | p02923 |
n=int(eval(input()))
h=list(map(int,input().split()))
ans=0
for i in range(n):
cnt=0
step=h[i]
for j in range(i+1,n):
if step<h[j]: break
step=h[j]
cnt+=1
ans=max(ans,cnt)
print(ans) | n=int(eval(input()))
if n==1:print('0'); exit()
h=list(map(int,input().split()))
ans=0
step=0
for i in range(n):
cnt=0
for j in range(n):
if h[step]<h[step+1]: step+=1; break
cnt+=1; step+=1
if step+1==n: break
ans=max(ans,cnt)
if step+1==n: break
print(ans) | p02923 |
n=int(eval(input()))
ans=0
now=input().split()
a=0
for i in range(len(now)-1):
if int(now[i])>=int(now[i+1]):
a+=1
else :
a=0
# print(a)
ans=max(ans,a)
print(ans) | from sys import stdin
n=int(stdin.readline())
ans=0
now=list(map(int,stdin.readline().split()))
a=0
for i in range(len(now)-1):
if now[i]>=now[i+1]:
a+=1
else :
a=0
# print(a)
ans=max(ans,a)
print(ans) | p02923 |
N = int(eval(input()))
H = list(map(int,input().split()))
stp = [0]*(N+1)
stp[0] = 0
for i in range(1,N):
if H[i]<=H[i-1]:
stp[i] = stp[i-1] +1
else:
stp[i] = 0
print((max(stp))) | N = int(eval(input()))
h = list(map(int,input().split()))
memo = [0]*N
for i in range(1,N):
if h[i]<=h[i-1]:
memo[i] = memo[i-1] + 1
print((max(memo))) | p02923 |
n = int(eval(input()))
hh = list(map(int, input().split()))
ans = 0
for i in range(n - 1, 0, -1):
x = 1
while i + x < n and hh[i + x - 1] >= hh[i + x]:
x += 1
ans = max(ans, x - 1)
print(ans)
| n = int(eval(input()))
h = list(map(int, input().split()))
ans = 0
x = 0
for i in range(1, n):
if h[i - 1] >= h[i]:
x += 1
else:
x = 0
ans = max(ans, x)
print(ans) | p02923 |
N=int(eval(input()))
*H,=list(map(int,input().split()))
i=0
cnt=0
ans=0
while i < N-1:
if 1<=H[i]/H[i+1]:
cnt+=1
else:
ans=max(ans,cnt)
cnt=0
i+=1
ans=max(ans,cnt)
print(ans) | N=int(eval(input()))
*H,=list(map(int,input().split()))
i=cnt=ans=0
while i<N-1:
if 1<=H[i]/H[i+1]:
cnt+=1
else:
ans=max(ans,cnt)
cnt=0
i+=1
print((max(ans,cnt))) | p02923 |
N = int(eval(input()))
H = list(map(int, input().split()))
def move_right(i):
count = 0
for j in range(i, N-1):
if H[j+1]<=H[j]:
count += 1
else:
break
return count
answer=0
for i in range(N-1):
answer=max(answer,move_right(i))
print(answer)
| N = int(eval(input()))
H = list(map(int, input().split()))
count = 0
answer = 0
for j in range(N-1):
if H[j+1] <= H[j]:
count += 1
else:
answer = max(count, answer)
count = 0
answer = max(count, answer)
print(answer)
| p02923 |
n = int(eval(input()))
H = list(map(int,input().split()))
ans = 0
for i in range(n):
tmp = 0
for j in range(i,n):
if j == i:
continue
if H[j] <= H[j-1]:
tmp += 1
else:
break
ans = max(ans,tmp)
print(ans) | n = int(eval(input()))
h = list(map(int,input().split()))
ans = 0
tmp = 0
for i in range(n-1):
if h[i+1] <= h[i]:
tmp += 1
else:
ans = max(ans,tmp)
tmp = 0
print((max(ans,tmp))) | p02923 |
N = int(eval(input()))
H = list(map(int, input().split()))
q = 0
s = [0]
for i in range(N-1):
if H[i] >= H[i+1]:
p = q + 1
s.append(p)
q = q + 1
else:
s.append(0)
q = 0
s.sort()
ans = s[-1]
print(ans) | N = int(eval(input()))
H = list(map(int, input().split()))
old = H[0]
ans = 0
a = 0
for i in range(1,N):
if H[i] <= old:
a += 1
else:
if a > ans:
ans = a
a = 0
old = H[i]
if a > ans:
ans = a
print(ans)
| p02923 |
n = int(eval(input()))
a = [int(a) for a in input().split()]
aans =0
for i in range(n):
ans=0
for ii in range (i,n-1):
if a[ii] >= a[ii+1]:
ans +=1
else:
break
if ans >aans:
aans =ans
print(aans)
| n = int(eval(input()))
a = [int(a) for a in input().split()]
aans =0
ans =0
for i in range(n-1):
if a[i] >= a[i+1]:
ans +=1
else :
if ans >aans:
aans =ans
ans = 0
else :
ans =0
if ans >aans:
aans =ans
print(aans)
| p02923 |
N = int(eval(input()))
H = list(map(int, input().split()))
ans = 0
start = 0
while ( start < N ):
tmp_ans = 0
for j in range(start, N-1):
if (H[j] >= H[j+1]):
tmp_ans += 1
else:
start += tmp_ans
break
ans = max(ans, tmp_ans)
... | N = int(eval(input()))
H = list(map(int, input().split()))
ans = [0]
for i in range(0, len(H)-1):
if (H[i] >= H[i+1]):
ans.append(ans[i]+1)
else:
ans.append(0)
print((max(ans))) | p02923 |
# question 3
N = eval(input())
H = input().split()
# question 3
i = 0
for n in range(0, int(N)-1):
j = 0
for h in range(n, int(N)-1):
if int(H[h]) < int(H[h+1]):
break
j += 1
if i < j:
i = j
if i >= int(N) - n:
break
print(i)
| # question 3
N = eval(input())
H = input().split()
# question 3
i = 0
res = [0]
for n in range(0, int(N)-1):
if int(H[n]) >= int(H[n+1]):
i += 1
else:
res.append(i)
i = 0
res.append(i)
print((max(res)))
| p02923 |
N = int(eval(input()))
H_list = input().split(" ")
max_count = 0
for i in range(0, N):
S = int(H_list[i])
count = 0
for j in range(i + 1, N):
if S >= int(H_list[j]):
S = int(H_list[j])
count += 1
else:
break
if max_count < count:
m... | N = int(eval(input()))
H_LIST = input().split(" ")
H = []
for i in H_LIST:
H.append(int(i))
count = 0
max_count = 0
for i in range(0, N-1):
if H[i] >= H[i + 1]:
count += 1
else:
count = 0 #メモリの動き
if max_count < count:
max_count = count
print(max... | p02923 |
def main():
n = int(eval(input()))
h = list(map(int, input().split()))
ans = 0
for i in range(n - 1):
j = i
count = 0
while j < n-1:
# print(h[j])
# print(h[j + 1])
# print("=====")
if h[j] >= h[j + 1]:
c... | def main():
n = int(eval(input()))
h = list(map(int, input().split()))
ans = 0
max_list = [0]
for i in range(n - 1):
if h[i] >= h[i + 1]:
ans += 1
max_list.append(ans)
else:
ans = 0
print((max(max_list)))
if __name__ == "__main_... | p02923 |
n = int(eval(input()))
h = list(map(int, input().split()))
out, cnt = 0, 0
for i in range(n-1):
if h[i] >= h[i+1]:
cnt += 1
out = max(out, cnt)
else:
cnt = 0
print(out)
| n = int(eval(input()))
h = list(map(int, input().split()))
cnt = 0
result = 0
for i in range(n-1):
if h[i] - h[i+1] >= 0:
cnt += 1
else:
result = max(cnt, result)
cnt = 0
result = max(cnt, result)
print(result) | p02923 |
n,*h=list(map(int,open(0).read().split()));c=[0]
for i,j in zip(h,h[1:]):c+=[(i>=j)*-~c[-1]]
print((max(c))) | n,h=open(0);a=b=c=0
for i in map(int,h.split()):c=(b>=i)*-~c;b=i;a=max(a,c)
print(a) | p02923 |
n = int(eval(input()))
h = list(map(int, input().split()))
clm = [0] * n
for i in range(n):
for j in range(i, n-1):
if h[j] >= h[j+1]:
clm[i] += 1
else:
break
print((max(clm))) | n = int(eval(input()))
h = list(map(int, input().split()))
count = 0
maxcount = 0
for i in range(n-1):
if h[i] >= h[i+1]:
count += 1
maxcount = max(count, maxcount)
else:
count = 0
print(maxcount) | p02923 |
n = int(eval(input()))
h = list(map(int, input().split()))
count = 0
maxcount = 0
for i in range(n-1):
if h[i] >= h[i+1]:
count += 1
maxcount = max(count, maxcount)
else:
count = 0
print(maxcount) | n = int(eval(input()))
h = list(map(int, input().split()))
count = 0
maximum = 0
for i in range(n-1):
if h[i] >= h[i+1]:
count += 1
else:
maximum = max(count,maximum)
count = 0
maximum = max(count,maximum)
print(maximum) | p02923 |
n = int(eval(input()))
integers = list(map(int, input().split()))
max_moves = 0
moves = 0
for i in range(n-1):
for k in range(i, n-1):
if integers[k] >= integers[k+1]:
moves += 1
else:
break
if max_moves < moves:
max_moves = moves
moves = 0
... | n = int(eval(input()))
integers = list(map(int, input().split()))
max_moves = 0
moves = 0
for i in range(n-1):
if integers[i] >= integers[i+1]:
moves += 1
else:
moves = 0
if max_moves < moves:
max_moves = moves
print(max_moves) | p02923 |
N = int(eval(input()))
H = list(map(int, input().split()))
result = 0
tempres = 0
for i in range(0, N):
for j in range(i, N - 1):
if H[j] >= H[j + 1]:
tempres += 1
else:
break
result = max(result, tempres)
i += tempres
tempres = 0
if result >= N... | N = int(eval(input()))
H = list(map(int, input().split()))
result = 0
tempres = 0
for i in range(0, N):
if tempres != 0:
tempres -= 1
continue
for j in range(i, N - 1):
if H[j] >= H[j + 1]:
tempres += 1
else:
break
result = max(result, t... | p02923 |
N = int(eval(input()))
H = list(map(int, input().split()))
result = 0
for i in range(N-1):
ans = 0
for j in range(N-i-1):
if H[i + j] >= H[i + j + 1]:
ans += 1
else:
break
if result <= ans:
result = ans
print(result) | N = int(eval(input()))
H = list(map(int, input().split()))
ans = 0
result = 0
for i in range(N-1):
if H[i] >= H[i+1] and i == N-2:
ans += 1
if result < ans:
result = ans
elif H[i] >= H[i+1]:
ans +=1
else:
if result < ans:
result = ans
... | p02923 |
# -*- coding: utf-8 -*-
"""
Created on Wed Mar 25 10:13:10 2020
@author: Kanaru Sato
"""
N = int(eval(input()))
H = list(map(int, input().split()))
ans = 0
count = 0
for i in range(0,N-1):
if H[i] >= H[i+1]:
count += 1
ans = max(ans,count)
else:
count = 0
print(ans... | # -*- coding: utf-8 -*-
"""
Created on Wed Mar 25 10:13:10 2020
@author: Kanaru Sato
"""
N = int(eval(input()))
H = list(map(int, input().split()))
record = 0
count = 0
for i in range(0,N-1):
if H[i] >= H[i+1]:
count += 1
else:
record = max(count,record)
count = 0
... | p02923 |
N=int(eval(input()))
Hi=list(map(int,input().split()))
ans=[0]*N
for i in range (N):
a=0
if Hi[i]<Hi[i-1]:
continue
for j in range(N-i-1):
if Hi[i+j]>=Hi[i+j+1]:
a+=1
else:
break
ans[i]=a
print((max(ans))) | N=int(eval(input()))
Hi=list(map(int,input().split()))
# ans=[0]*N
# for i in range (N):
# a=0
# # if Hi[i]<Hi[i-1]:
# # continue
# for j in range(N-i-1):
# if Hi[i+j]>=Hi[i+j+1]:
# a+=1
# else:
# break
# ans[i]=a
# print(max(ans))
an... | p02923 |
N = int(eval(input()))
H = [int(x) for x in input().split()]
dp = [0] * len(H)
for i in range(1, len(H)):
if H[i-1] >= H[i]:
dp[i] = dp[i-1] + 1
ans = max(dp)
print(ans) | N = int(eval(input())) #解答
H = list(map(int,input().split()))
L = [0] * N
for i in range(N-2,-1,-1):
if H[i] >= H[i+1]:
L[i] = L[i+1] + 1
print((max(L))) | p02923 |
N = int(eval(input()))
h =list(map(int,input().split()))
L = [0] * N
for i in range(N-2,-1,-1):
if h[i] >= h[i+1]:
L[i] = L[i+1] + 1
print((max(L))) | N = int(eval(input()))
H = [int(i) for i in input().split()]
rem=0
cnt=0
for i in range(N-1):
if H[i] >= H[i+1]:
cnt+=1
else:
rem=max(rem,cnt)
cnt=0
rem=max(rem,cnt)
print(rem) | p02923 |
def num(pos,list1):
count = 0
val = list1[pos]
for x in range(pos+1,len(list1)):
if list1[x]<=val:
count+=1
val=list1[x]
else:
return count
return count
maximum = 0
n = int(eval(input()))
list1 = [int(i) for i in input().split()]
for y in ... | def num(pos,list1):
count = 0
val = list1[pos]
for x in range(pos+1,len(list1)):
if list1[x]<=val:
count+=1
val=list1[x]
else:
return count
return count
maximum = 0
n = int(eval(input()))
list1 = [int(i) for i in input().split()]
y = 0
wh... | p02923 |
n = int(eval(input()))
h = list(map(int, input().split()))
answer = 0#これなに
m = 0#カウントするやつやね
for i in range(n-1):
if h[i] >= h[i+1]:
m += 1
else:
answer = max(answer,m)
m = 0
answer = max(answer,m)
print(answer)
| n = int(eval(input()))
h = list(map(int,input().split(" ")))
plsl = []
plsn = 0
for i in range(n-1):
if h[i]>= h[i+1]:
plsn += 1
else: #i<i+1の時
plsl.append(plsn)
plsn = 0
plsl.append(plsn)
plsl.sort(reverse = True)
print((plsl[0]))
| p02923 |
N = int(eval(input()))
H = list(map(int, input().split()))
if N == 1:
print((0))
else:
ans = 0
H1 = H[0]
H2 = H[1]
count = 1
move = 0
while count != N:
count += 1
if H2 <= H1:
move += 1
ans = max(ans, move)
else:
m... | N = int(eval(input()))
H = list(map(int, input().split()))
ans = 0
count = 0
for i in range(N - 1):
if H[i] >= H[i + 1]:
count += 1
ans = max(ans, count)
else:
count = 0
print(ans)
| p02923 |
n = int(eval(input()))
h = list(map(int, input().split()))
current_height = h[0]
current_count = 0
max_count = current_count
for i in range(1, n):
if current_height >= h[i]:
current_count += 1
else:
max_count = max(current_count, max_count)
current_count = 0
current_heig... | n = int(eval(input()))
h = list(map(int, input().split()))
count = 0
max_value = 0
for i in range(n)[1::]:
if h[i-1] >= h[i]:
count += 1
else:
max_value = max(max_value, count)
count = 0
max_value = max(max_value, count)
print(max_value)
| p02923 |
N = int(eval(input()))
H = input().split()
for i in range(N):
H[i] = int(H[i])
Cnt = 0
MaxCnt = 0
if (N == 1):
print((0))
else:
for i in range(N-1):
Cnt = 0
for j in range(i, N-1, 1):
if (H[j] >= H[j+1]):
Cnt += 1
else:
break
MaxCnt = max(Cnt, MaxCnt)
... | N = int(eval(input()))
H = input().split()
for i in range(N):
H[i] = int(H[i])
Cnt = 0
MaxCnt = 0
if (N == 1):
print((0))
else:
i = 0
while(i < N-1):
Cnt = 0
for j in range(i, N-1, 1):
if (H[j] >= H[j+1]):
Cnt += 1
if (j == N-2):
i = j+1
else:... | p02923 |
# -*- coding: utf-8 -*-
def main():
N=int(eval(input())) #数値入力 「N」だけの入力のとき
H=list(map(int, input().split())) #リスト入力 「a1 a2 a3 ...」みたいな配列のような入力のとき
D=list()
for i in range(1, N):
if H[i-1] >= H[i]:
D.append(1)
else:
D.append(0)
#print("D")
#pr... | N = int(eval(input()))
H = [int(x) for x in input().split()]
ans = 0
cnt = 0
for ind,i in enumerate(H[:-1]):
if(i>=H[ind+1]):
cnt += 1
else:
cnt = 0
ans = max(ans,cnt)
print(ans) | p02923 |
N = eval(input())
N = int(N)
l = input().split(" ")
l = [int(n0) for n0 in l]
# print(l)
l.append(10**10)
ans = 0
for xi in range(N-1):
step = l[xi]
count = 0
while l[xi+count] >= l[xi+count+1] :
# step = l[xi+count+1]
count = count +1
if ans < count:
ans ... | n = int(eval(input()))
h = [int(xi) for xi in input().split()]
step = 0
mstep = 0
for xi in range(n-1):
if h[xi] >= h[xi+1]:
step += 1
else:
if mstep<step:
mstep = step
step = 0
if mstep<step:
mstep = step
print(mstep)
| p02923 |
N = eval(input())
H = list(map(int, input().split()))
last_h = float('inf')
cnt, ans = -1, 0
for h in H:
if h <= last_h:
cnt += 1
else:
ans = max(ans, cnt) # update
cnt = 0 # reset
last_h = h
ans = max(ans, cnt)
print(ans) | N = eval(input())
H = list(map(int, input().split()))
last_h = float('inf')
ans, cnt = 0, -1
for h in H:
if last_h >= h:
cnt += 1
else:
ans = max(ans, cnt)
cnt = 0
last_h = h
print((max(ans, cnt))) | p02923 |
N = eval(input())
H = list(map(int, input().split()))
last_h = float('inf')
ans, cnt = 0, -1
for h in H:
if last_h >= h:
cnt += 1
else:
if ans < cnt:
ans = cnt
cnt = 0
last_h = h
print((ans if ans > cnt else cnt)) | N = eval(input())
H = list(map(int, input().split()))
last_h = float('inf')
ans, cnt = 0, -1
for h in H:
if last_h >= h:
cnt += 1
else:
if cnt > ans:
ans = cnt
cnt = 0
last_h = h
print((ans if ans > cnt else cnt)) | p02923 |
n = int(eval(input()))
H = list(map(int, input().split()))
ans = 0
for i in range(n):
pos_h = H[i]
count = 0
for j in range(i + 1, n):
if H[j] <= pos_h:
count += 1
pos_h = H[j]
else:
break
ans = max(ans, count)
print(ans) | n = int(eval(input()))
H = list(map(int, input().split()))
ans = 0
i = 0
while i < n:
pos_h = H[i]
count = 0
j = i + 1
while j < n and H[j] <= pos_h:
count += 1
pos_h = H[j]
j += 1
ans = max(ans, count)
i = j
print(ans) | p02923 |
N=int(eval(input()))
H=[int(x) for x in input().split()]
A=''
for i in range(N-1):
if H[i] >= H[i+1]:
A += 'o'
else:
A +='x'
for j in range(1,N):
if 'o'*(N-j) in A:
print((N-j))
exit()
print('0') | N=int(eval(input()))
H=[int(x) for x in input().split()]
answer = 0
count = 0
for i in range(N-1):
if H[i]>=H[i+1]:
count +=1
answer = max(answer,count)
else:
count=0
print(answer) | p02923 |
n = int(eval(input()))
line2 = input().split()
h_list = [int(x) for x in line2]
max_count = 0
size = len(h_list)
for i in range(size):
now = h_list[i]
count = 0
for j in range(i+1,size):
if now >= h_list[j]:
count += 1
now = h_list[j]
else:
... | n = int(eval(input()))
line2 = input().split()
h_list = [int(x) for x in line2]
max_count = 0
size = len(h_list)
i = 0
while True:
if i == size-1:
break
now = h_list[i]
count = 0
for j in range(i+1,size):
if now >= h_list[j]:
count += 1
now = h... | p02923 |
N = int(eval(input()))
H = list(map(int, input().split()))
total = 0
max_total = 0
for i in range(N-1):
if H[i] >= H[i+1]:
total += 1
max_total = max(max_total, total)
else:
total = 0
print(max_total) | n = int(eval(input()))
h = list(map(int, input().split()))
total = 0
max_total = 0
for i in range(n-1):
if h[i] >= h[i+1]:
total += 1
max_total = max(max_total, total)
else:
total = 0
print(max_total) | p02923 |
n=int(eval(input()))
h=list(map(int,input().split()))
maxcnt=0
for i in range(n):
cnt=0
for j in range(i+1,n-1):
if h[j+1] <= h[j]:
cnt +=1
else:
break
if cnt>maxcnt:
maxcnt=cnt
print(maxcnt) | n=int(eval(input()))
h=list(map(int,input().split()))
maxcnt=0
st=0
while st < n-1:
cnt=0
j=st
while j < n-1:
if h[j+1] <= h[j]:
cnt +=1
j += 1
else:
break
if cnt>maxcnt:
maxcnt=cnt
st = j+1
print(maxcnt) | p02923 |
# 標準入力
N = int(eval(input()))
H = list(map(int, input().split()))
H.append(10**10)
count = [0 for i in range(N)]
# 左からi番目に降り立って(iは0~N-1)
for i in range(N):
# H[i] >= H[i+1] ならcount[i]を一つ増やしてiに足していけ(H[N] = 10**10としよう)
while H[i] >= H[i+1]:
count[i] += 1
i += 1
#max(count)を出力しよう
print((max(count)))
| # 標準入力
N = int(eval(input()))
H = list(map(int, input().split()))
H.append(10**10)
count = [0 for i in range(N)]
i = 0
# 左からi番目に降り立って(iは0~N-1)、H[i]>=H[i+1]が続くまでcountを増やす。count[i]=5なら次はi+6から繰り返す
while i <= N-1:
j = i
while H[j] >= H[j+1]:
count[i] += 1
if j <= N-3:
j += 1
else:
... | p02923 |
n = int(eval(input()))
H = list(map(int, input().split()))
def f(X):
i = 0
while True:
if i == len(X)-1:
return(i)
break
elif X[i] < X[i+1]:
return(i)
break
else:
i += 1
X = H
ANS = []
while True:
if X == []:
print((max(ANS)))
exit()
els... | n = int(eval(input()))
H = list(map(int, input().split()))
c = 0
ans = 0
for i in range(1,n):
if H[i]<=H[i-1]:
c +=1
else:
c = 0
ans = max(ans,c)
print(ans)
| p02923 |
N = int(eval(input()))
H = list(map(int,input().split()))
n = 0
a = 0
for i in range(N-1):
if H[i+1]<=H[i]:
n+=1
else:
a=max(a,n)
n=0
print((max(a,n))) | N = int(eval(input()))
H = list(map(int,input().split()))
ans = [0]
for h1,h2 in zip(H,H[1:]):
if h2<=h1:
ans+=[ans[-1]+1]
else:
ans+=[0]
print((max(ans))) | p02923 |
N = int(eval(input()))
H = list(map(int, input().split()))
count = 0
for i in range(N-1):
moving = 0
for j in range(i, N-1):
if H[j] >= H[j+1]:
moving += 1
else:
i = j + 1
break
if moving > count:
count = moving
print(count) | N = int(eval(input()))
H = list(map(int, input().split()))
count = 0
i = 0
while i < N-1:
moving = 0
for j in range(i, N-1):
if H[j] >= H[j+1]:
moving += 1
else:
i = j + 1
break
if moving > count:
count = moving
i += 1
print(count) | p02923 |
n = int(eval(input()))
h = list(map(int,input().split()))
ans = 0
for i in range(n):
cnt = 0
for j in range(i,n-1):
if h[j] >= h[j+1]:
cnt += 1
else:
break
ans = max(ans,cnt)
print(ans) | n = int(eval(input()))
h = list(map(int,input().split()))
ans = 0
cnt = 0
for i in range(n-1):
if h[i] >= h[i+1]:
cnt += 1
else:
cnt = 0
ans = max(ans,cnt)
print(ans) | p02923 |
N = int(eval(input()))
Hlist = list(map(int, input().split()))
now = Hlist[0]
ans = 0
num = 0
for i in range(N - 1):
if Hlist[i + 1] <= now:
num += 1
else:
ans = max(ans, num)
num = 0
now = Hlist[i + 1]
# print(ans, num)
print((max(ans, num)))
| N = int(eval(input()))
Hlist = list(map(int, input().split()))
ans = 0
c = 0
now = Hlist[0]
for next_step in Hlist[1:]:
if next_step <= now:
c += 1
else:
ans = max(ans, c)
c = 0
now = next_step
ans = max(ans, c)
print(ans)
| p02923 |
#C
n = int(eval(input()))
h = list(map(int,input().split()))
tmp = 0
prev = True
result = [0 for _ in range(n)]
for i in range(n-1):
if prev:
for j in range(i,n-1):
if h[j] >= h[j+1]:
tmp += 1
else:
break
if tmp > 0:
prev = ... | #C
n = int(eval(input()))
h = list(map(int,input().split()))
a,b = 0,0
for i in range(n-1):
if h[i] >= h[i+1]:
a += 1
b = max(b,a)
else:
a = 0
print(b)
| p02923 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
N = int(eval(input()))
hn = list(map(int, input().split()))
max_move = 0
for i in reversed(list(range(1, N))):
move = 0
for j in reversed(list(range(1, i+1))):
if hn[j-1] >= hn[j]:
move += 1
else:
break
i... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
N = int(eval(input()))
hn = list(map(int, input().split()))
max_move = 0
move = 0
for i in reversed(list(range(1, N))):
if hn[i-1] >= hn[i]:
move += 1
else:
if move >= max_move:
max_move = move
move = 0
if move ... | p02923 |
n = int(eval(input()))
h = [int(x) for x in input().split(' ')]
a = 0
for c in range(n) :
cnt = 0
z = h[c]
for d in range(c+1,n) :
if (z >= h[d]) :
cnt += 1
z = h[d]
else :
break
if a < cnt :
a = cnt
print(a) | n = int(eval(input()))
h = [int(x) for x in input().split(' ')]
cnt = 0
a = 0
for c in range(n-1) :
if (h[c] >= h[c+1]) :
cnt += 1
else :
if a < cnt :
a = cnt
cnt = 0
if a < cnt :
a = cnt
print(a) | p02923 |
N = int(eval(input()))
H = [int(h) for h in input().split()]
H.append(1e10)
dH = [H[i + 1] - H[i] for i in range(N)]
m, c = 0, 0
for i in range(N):
d = H[i + 1] - H[i]
if d <= 0:
c += 1
else:
if c > m:
m = c
c = 0
print(m) | N = int(eval(input()))
H = [int(h) for h in input().split()]
H.append(1e10)
m, c = 0, 0
for i in range(N):
d = H[i + 1] - H[i]
if d <= 0:
c += 1
else:
if c > m:
m = c
c = 0
print(m) | p02923 |
f = int(eval(input()))
ls = [int(x) for x in input().split()]
a = c = max1 =0
for k in range(0, len(ls)-1):
for a in range(k, f-1):
if ls[a] < ls[a + 1]:
break
c = c + 1
if c > max1:
max1 = c
c = 0
print(max1) | f = int(eval(input()))
ls = [int(x) for x in input().split()]
a = c = max1 = k =0
while k < len(ls)-1:
for a in range(k, len(ls)-1):
if ls[a] < ls[a + 1]:
break
c = c + 1
if c > max1:
max1 = c
k = a + 1
c = 0
print(max1) | p02923 |
N = int(eval(input()))
H = list(map(int, input().split()))
max = 0
for i in range(N):
count = 0
for j in range(i, N-1):
if H[j] >= H[j+1]:
count += 1
else:
break
if count > max:
max = count
print(max) | N = int(eval(input()))
H = list(map(int, input().split()))
max = 0
i = 0
while N > i:
count = 0
j = i
while N-1 > j:
if H[j] >= H[j+1]:
count += 1
j += 1
else:
break
if count > max:
max = count
i = j+1
print(max) | p02923 |
def main():
H = [int(i) for i in open(0).read().split()[1:]]
ans = 0
tmp = 0
for h1, h2 in zip(H[:-1], H[1:]):
if h1 >= h2:
tmp += 1
else:
ans = max(ans, tmp)
tmp = 0
ans = max(ans, tmp)
print(ans)
return
main()
| def main():
H = [int(i) for i in open(0).read().split()[1:]]
ans = 0
tmp = 0
for h1, h2 in zip(H[:-1], H[1:]):
if h1 >= h2:
tmp += 1
else:
if ans < tmp:
ans = tmp
tmp = 0
if ans < tmp:
ans = tmp
print(ans)
... | p02923 |
def main():
H = open(0).read().split()[1:]
ans = 0
tmp = 0
for h1, h2 in zip(H[:-1], H[1:]):
if int(h1) >= int(h2):
tmp += 1
else:
if ans < tmp:
ans = tmp
tmp = 0
if ans < tmp:
ans = tmp
print(ans)
retu... | def main():
eval(input())
H = list(map(int, input().split()))
ans = 0
prev = float('inf')
cnt = -1
for cur in H:
if prev >= cur:
cnt += 1
else:
if ans < cnt:
ans = cnt
cnt = 0
prev = cur
if ans < cnt:
... | p02923 |
n=int(eval(input()))
inf=10*100
h=list(map(int,input().split()))+[inf]
n=len(h)
length=[0]*(n-1)+[1]
cnt=[]
move=0
for i in range(n-1):
if h[i]<h[i+1]:
length[i+1]=1
if i==0:
length[i]=1
for i in range(1,n):
if length[i]==0:
move+=1
else:
cnt.appen... | n=int(eval(input()))
h=list(map(int,input().split()))
cnt=[]
move=0
for i in range(n-1):
if h[i]>=h[i+1]:
move+=1
else:
cnt.append(move)
move=0
cnt.append(move)
print((max(cnt))) | p02923 |
N = int(eval(input()))
h = list(map(int, input().split()))
ans = 0
cnt = 0
for i in range(1, N):
if h[i] <= h[i - 1]:
cnt += 1
else:
ans = max(ans, cnt)
cnt = 0
ans = max(ans, cnt)
print(ans)
| n = int(eval(input()))
height = list(map(int, input().split()))
ans = 0
cnt = 0
for i in range(1, n):
if height[i] > height[i - 1]:
cnt = 0
else:
cnt += 1
ans = max(ans, cnt)
print(ans) | p02923 |
# -*- coding: utf-8 -*-
n = int(eval(input()))
h = input().split()
for i in range(n):
h[i] = int(h[i])
ans = 0
for i in range(n-1):
tmp = 0
i_tmp = i
while(i_tmp<n-1):
if h[i_tmp+1]>h[i_tmp]:
break
i_tmp += 1
tmp += 1
if tmp > ans:
ans = tmp
i += 1
print(ans) | # -*- coding: utf-8 -*-
n = int(eval(input()))
h = input().split()
for i in range(n):
h[i] = int(h[i])
ans = 0
i = 0
while(i < n-1):
tmp = 0
i_tmp = i
while(i_tmp<n-1):
if h[i_tmp+1]>h[i_tmp]:
break
i_tmp += 1
tmp += 1
if tmp > ans:
ans = tmp
i += tmp+1
print(an... | p02923 |
N = int(eval(input())) #マスの数
H = list(map(int,input().split())) #各マスの高さ
#リストのソートと添字の紐付け
H_sort = []
for i in range(len(H)):
a = [H[i],i]
H_sort.append(a)
H_sort.sort(reverse=True)
max_move = 0 #移動距離の最大値
for n in range(0,len(H)):
move = 0
i = H_sort[n][1]
if i <= N-2 and max_move < N-1-i:
... | N = int(eval(input())) #マスの数
H = list(map(int,input().split())) #各マスの高さ
move = 0
max_move = 0
for i in range(N-1):
if H[i] >= H[i+1]:
move += 1
if max_move <= move:
max_move = move
else:
move = 0
print(max_move)
| p02923 |
N = int(eval(input()))
H = list(map(int, input().split()))
ans = 0
L = 0
count = 0
for i in range(N):
if L >= H[i]:
count += 1
else:
ans = max(ans, count)
count = 0
L = H[i]
ans = max(ans, count)
print(ans)
| def LI():
return list(map(int, input().split()))
N = int(eval(input()))
H = LI()
ans = 0
count = 0
for i in range(1, N):
if H[i-1] >= H[i]:
count += 1
else:
ans = max(ans, count)
count = 0
print((max(ans, count)))
| p02923 |
N = int(eval(input()))
H = list(map(int, input().split()))
dp = [0]*N
for i in range(1, N):
if H[i-1] >= H[i]:
dp[i] = dp[i-1] + 1
print((max(dp)))
| N = int(eval(input()))
H = list(map(int,input().split()))
dp = [0] * (N+1)
dp[0] = 0
for i in range(1, N):
if H[i] <= H[i-1]:
dp[i+1] = dp[i] + 1
print((max(dp)))
| p02923 |
import sys
import math
from collections import Counter
import itertools
import fractions
#from functools import reduce
# 入力を整数に変換して受け取る
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def MI1(): return map(int1, sys.stdin.readline().split())
# 入力全てを整数に変換したも... | import sys
import math
from collections import Counter
import itertools
import fractions
#from functools import reduce
# 入力を整数に変換して受け取る
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def MI1(): return map(int1, sys.stdin.readline().split())
# 入力全てを整数に変換したも... | p02923 |
N = int(eval(input()))
H = list(map(int, input().split()))
ans = 0
for i in range(N-1):
tmp = 0
for j in range(i, N-1):
if H[j] >= H[j+1]:
tmp += 1
else:
break
ans = max(ans, tmp)
print(ans) | N = int(eval(input()))
H = list(map(int, input().split()))
ans = 0
cnt = 0
for i in range(N-1):
if H[i] >= H[i+1]:
cnt += 1
else:
if ans < cnt:
ans = cnt
cnt = 0
if ans < cnt:
ans = cnt
print(ans) | p02923 |
n = int(eval(input()))
h = list(map(int,input().split()))
dp = [0] * n
for i in range(len(h)-1):
cnt = 0
for j in range(i,len(h)-1):
if h[j] < h[j+1]:
dp[i] = cnt
break
cnt += 1
dp[i] = cnt
print((max(dp))) | n = int(eval(input()))
h = list(map(int,input().split()))
cnt = 0
ans = 0
for i in reversed(list(range(1,len(h)))):
if h[i-1] >= h[i] :
cnt +=1
else:
ans = max(ans,cnt)
cnt = 0
if i == 1 :
ans = max(ans,cnt)
print(ans) | p02923 |
N=int(eval(input()))
H=[int(s) for s in input().split()]
count_max=0
for j in range(N):
count=0
for i in range(j,N-1):
if H[i]-H[i+1] >= 0:
count+=1
else:
break
if count > count_max:
count_max=count
X=j
print(count_max) | N=int(eval(input()))
H=[int(s) for s in input().split()]
count_max=0
count=0
for i in range(N-1):
if H[i]-H[i+1] >= 0:
count+=1
if count > count_max:
count_max=count
else:
count=0
print(count_max)
| p02923 |
#
import sys
input=sys.stdin.readline
def main():
N=int(eval(input()))
H=list(map(int,input().split()))
maxc=0
for i in range(N-1):
cnt=0
while(i+1<=N-1 and H[i+1]<=H[i]):
cnt+=1
i+=1
maxc=max(maxc,cnt)
print(maxc)
if __name__==... | #
import sys
input=sys.stdin.readline
def main():
N=int(eval(input()))
H=list(map(int,input().split()))
H=H[::-1]
cnt=[0]*N
for i in range(1,N):
if H[i]>=H[i-1]:
cnt[i]=cnt[i-1]+1
print((max(cnt)))
if __name__=="__main__":
main()
| p02923 |
#!/usr/bin/env python3
n = int(eval(input()))
h = list(map(int, input().split()))
ans = 0
for i in range(n):
tmp = 0
for j in range(i, n - 1):
if h[j] < h[j + 1]:
tmp = 0
else:
tmp += 1
ans = max(ans, tmp)
print(ans)
| #!/usr/bin/env python3
n = int(eval(input()))
h = list(map(int, input().split()))
ans = 0
tmp = 0
for i in range(n - 1):
if h[i] < h[i + 1]:
tmp = 0
else:
tmp += 1
ans = max(ans, tmp)
print(ans)
| p02923 |
N = int(eval(input()))
H = list(map(int, input().split()))
ans = 0
ansk = 0
tmp = 0
for i in range(N-1):
if tmp > 0:
tmp -= 1
continue
ans = 0
for j in range(i+1,N):
if H[j-1] < H[j]:
tmp = ans
ansk = max(ansk,ans)
bre... | N = int(eval(input()))
H = list(map(int, input().split()))
ans = 0
ansk = 0
tmp = -1
while tmp < N:
tmp += 1
if ans > 0:
tmp += ans-1
ans = 0
continue
for j in range(tmp+1,N):
if H[j-1] < H[j]:
ansk = max(ansk,ans)
break
... | p02923 |
n = int(eval(input()))
hs = [int(x) for x in input().split()]
candidates = []
for i in range(n-1):
if hs[i] >= hs[i+1]:
candidates.append(i)
curr_height = 0
max_stepnum = 0
for start_point in candidates:
stepnum = 0
curr_height = hs[start_point]
for i in range(start_point+1, n):
if cur... | n = int(eval(input()))
hs = [int(x) for x in input().split()]
curr_height = 0
max_stepnum = 0
start_point = 0
while start_point < n-1:
stepnum = 0
curr_height = hs[start_point]
for i in range(start_point+1, n):
if curr_height >= hs[i]:
stepnum += 1
curr_height = hs[i]
else:
... | p02923 |
n=int(eval(input()))
ls = list(map(int,input().split()))
ans = 0
for i in range(n-1):
for j in range(n-i):
if i+1!=n and ls[i]<ls[i+1]:
break
else:
i+=1
ans = max(ans,j)
if ans > n-1-i:
break
print(ans) | n=int(eval(input()))
ls = list(map(int,input().split()))
ls2 = [0]*(n+1)
for i in range(n-1):
if ls[i]<ls[i+1]:
ls2[i+1]=ls2[i]*0
elif ls[i]>=ls[i+1]:
ls2[i+1]=ls2[i]+1
print((max(ls2))) | p02923 |
n = int(eval(input()))
h = list(map(int, input().split()))
c = 0
a = 0
for i in range(n-1):
if h[i] >= h[i+1]:
c += 1
else:
a = max(c, a)
c = 0
a = max(c, a)
print(a)
| N = int(eval(input()))
H = list(map(int, input().split()))
ans = 0
curr = 0
for i in range(N-1):
if H[i] >= H[i+1]:
curr += 1
else:
ans = max(ans, curr)
curr = 0
else:
ans = max(ans, curr)
print(ans)
| p02923 |
N = int(eval(input()))
masu = list(map(int, input().split()))
masu2 = [None] * N
cnt_max = 0
for i in range(N):
cnt = 0
for j in range(i, N-1):
if masu[j] < masu[j+1]:
break
cnt += 1
masu2[i] = cnt
print((max(masu2))) | N = int(eval(input()))
masu = list(map(int, input().split()))
cnt = 0
masu2 = []
for i in range(N-1):
if masu[i] < masu[i+1]:
masu2.append(cnt)
cnt = 0
else:
cnt += 1
else:
masu2.append(cnt)
print((max(masu2))) | p02923 |
def main():
N = int(eval(input()))
H = [int(x) for x in input().split()]
ans = 0
count = 0
if N == 2:
if H[0] >= H[1]:
ans = 1
elif N > 2:
for i in range(1, N):
j = i + 1
if H[-i] <= H[-j]:
count += 1
... | def main():
N = int(eval(input()))
H = [int(x) for x in input().split()]
ans = 0
count = 0
if N > 1:
for i in range(1, N):
j = i + 1
if H[-i] <= H[-j]:
count += 1
if j == N:
if ans <= count:
... | p02923 |
N = int(eval(input()))
H = [int(n) for n in input().split()]
max_count = 0
for i in range(N):
count = 0
for j in range(0, N-i-1):
if H[i+j+1] <= H[i+j]:
count += 1
else:
max_count = max(max_count, count)
break
else:
max_count = max(ma... | N = int(eval(input()))
H = [int(n) for n in input().split()]
reached = [False] * N
max_count = 0
for i in range(N):
if reached[i] == True:
continue
else:
count = 0
for j in range(0, N-i-1):
if H[i+j+1] <= H[i+j]:
count += 1
reach... | p02923 |
t=eval(input())
s=list(map(int,input().split()))
a=int(t)
list=[]
for i in range(a-1):
if s[i]>=s[i+1]:
list.append(1)
else:
list.append(0)
d=0
for i in range(a-1):
c=0
for j in range(i,a-1):
if list[j]==1:
c += 1
else:
break
d=max(d,c)
print(d) | t=eval(input())
s=list(map(int,input().split()))
a=int(t)
list=[]
for i in range(a-1):
if s[i]>=s[i+1]:
list.append(1)
else:
list.append(0)
d=0
c=0
for i in range(a-1):
if list[i]==1:
c+=1
d=max(d,c)
else:
c=0
print(d) | p02923 |
N=int(eval(input()))
list1=list(map(int,input().split()))
#print(list1)
ans_list=[]
ans=0
for i in range(N):
j=i
ans=0
while True:
if j==N-1:
break
if list1[j]>=list1[j+1]:
ans+=1
j+=1
else :
break
ans_list.append(ans)
print((max(ans_list))) | N=int(eval(input()))
list1=list(map(int,input().split()))
#print(list1)
ans_list=[]
j=0
while True:
ans=0
while True:
if j==N-1:
break
if list1[j]>=list1[j+1]:
ans+=1
j+=1
else :
break
j+=1
ans_list.append(ans)
if j==N:
break
print((max(ans_list))) | p02923 |
N = int(eval(input()))
H = [int(i) for i in input().split()]
res = 0
cur_cnt = 0
for i in range(N-1):
if H[i] >= H[i+1]:
cur_cnt += 1
else:
cur_cnt = 0
if cur_cnt > res:
res = cur_cnt
print(res)
| N = int(eval(input()))
H = list(map(int, input().split()))
ans = 0
tmp = 0
for i in range(N-1):
if H[i] >= H[i+1]:
tmp += 1
if tmp > ans:
ans = tmp
else:
tmp = 0
print(ans)
| p02923 |
import sys
input=sys.stdin.readline
n=int(eval(input()))
high=list(map(int,input().split()))
ans=[]
for i in range(n):
count=0
for k in range(i,n-1):
if high[k]>=high[k+1]:
count+=1
else:
break
ans.append(count)
print((max(ans))) | n=int(eval(input()))
high=list(map(int,input().split()))
ans=[]
count=0
MaxC=0
for k in range(n-1):
if high[k]>=high[k+1]:
count+=1
MaxC=max(MaxC,count)
else:
count=0
print(MaxC) | p02923 |
N = int(eval(input()))
numbers = list(map(int, input().split()))
ans = 0
for i in range(N-1):
x = 0
for j in range(i, N-1):
if numbers[j] >= numbers[j + 1]:
x += 1
i += 1
if j == N - 2:
if x > ans:
ans = x
else:
if x > ans:
ans = x
bre... | def resolve():
n = int(eval(input()))
h = list(map(int, input().split()))
c = 0
ans = 0
for i in range(n - 1):
if h[i + 1] <= h[i]:
c += 1
if c > ans:
ans = c
else:
c = 0
print(ans)
if __name__ == '__main__':
... | p02923 |
# encoding: utf-8
N=int(eval(input()))
H=list(map(int, input().split()))
def get_distance(s,H):
distance=0
for i in range(s,len(H)-1):
if H[i+1] <= H[i]:
distance += 1
else:
break
return distance
ans = 0
i=0
while i < N:
t = get_dista... | # encoding: utf-8
N=int(eval(input()))
H=list(map(int, input().split()))
def get_distance(s,H):
distance=0
for i in range(s,len(H)-1):
if H[i+1] <= H[i]:
distance += 1
else:
break
return distance
ans = 0
i=0
while i < N:
t = get_dista... | p02923 |
n=int(eval(input()))
h=list(map(int,input().split()))
r=[None]*(n-1)
for i in range(n-1):
if h[i]>=h[i+1]:
r[i]=True
else:
r[i]=False
m=0
count=0
for i in range(len(r)):
if r[i]:
count=count+1
m=max(m,count)
else:
count=0
print(m) | N=int(eval(input()))
H=list(map(int,input().split()))
cur=H[0]
streak=0
ans=0
for i in range(1,N):
if H[i]<=cur:
streak+=1
if ans<streak:
ans=streak
else:
streak=0
cur=H[i]
print(ans) | p02923 |
import sys
import bisect
input = sys.stdin.readline
def main():
n = int(eval(input()))
s = list(map(int,input().split()))
ans=0
point=-1
for i in range(n-1):
mark=0
if i > point and i + ans < n:
for j in range(n-i-1):
if s[i+j]>=s[i+j+1]:
... | def main():
n = int(eval(input()))
s = list(map(int,input().split()))
ans=0
point=-1
for i in range(n-1):
mark=0
if i > point and i + ans < n:
for j in range(n-i-1):
if s[i+j]>=s[i+j+1]:
mark+=1
if mark>=a... | p02923 |
import sys
N = int(eval(input()))
H = input().split()
count = 0
max = 0
flag = []
for i in (list(range(int(N)-1))):
if(int(H[i]) >= int(H[i+1])):
flag.append(i)
else:
continue
H.append(10000000000)
for i in flag:
for j in range(i,int(N)):
if(int(H[j]) >= int(H[j+1])):
contin... | n = int(eval(input()))
L = list(map(int,input().split()))
count = 0
mcount = 0
for i in range(1,n):
if L[i - 1] >= L[i]:
count += 1
if count >= mcount:
mcount = count
else:
count = 0
print(mcount) | p02923 |
n=int(eval(input()))
h=[int(i) for i in input().split()]
c=0
d=c
for i in range(n-1):
if h[i]>=h[i+1]:
c+=1
else:
d=max([c,d])
c=0
print((max([c,d]))) | n = int(eval(input()))
L = list(map(int, input().split()))
tmp = 0
result = 0
for i in range(n-1):
if L[i] >= L[i+1]:
tmp += 1
else:
if tmp > result:
result = tmp
tmp = 0
if tmp > result:
result = tmp
print(result) | p02923 |
def c_lower():
N = int(eval(input()))
H = [int(i) for i in input().split()]
can_move = [0] * N
for i in range(N - 1):
if H[i] >= H[i + 1]:
can_move[i] = 1
cnt = 0
for i in range(N - 1, -1, -1):
if can_move[i] != 0:
cnt += 1
can_move[... | def c_lower():
N = int(eval(input()))
H = [int(i) for i in input().split()] + [float('inf')]
can_move = []
tmp = 0
for i in range(N):
if H[i] >= H[i + 1]:
tmp += 1
else:
can_move.append(tmp)
tmp = 0
return max(can_move)
print((c... | p02923 |
n = int(eval(input()))
h = list(map(int, input().split()))
h.reverse()
k = [0]
s = 0
for i in range(n-1):
if h[i] <= h[i+1]:
s += 1
k.append(s)
else:
s = 0
k.append(s)
ans = max(k)
print(ans)
| n = int(eval(input()))
h = list(map(int, input().split()))
h.reverse()
k = [0]*n
for i in range(1, n):
if h[i-1] <= h[i]:
k[i] = k[i-1] + 1
ans = max(k)
print(ans) | p02923 |
n = int(eval(input()))
H = list(map(int, input().split()))
tmp = H[0]
cnt = 0
ans = 0
for h in H[1:]:
if tmp >= h:
cnt += 1
else:
cnt = 0
tmp = h
ans = max(ans, cnt)
print(ans) | n = int(eval(input()))
H = list(map(int, input().split()))
cnt = 0
ans = 0
tmp = H[0]
for h in H[1:]:
if h <= tmp:
cnt += 1
ans = max(ans, cnt)
if h > tmp:
cnt = 0
tmp = h
print(ans) | p02923 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.