Answer the question
In order to leave comments, you need to log in
How to speed up the code?
b = list(map(int,input().split()))
d = []
j = 0
x = 0
for i in range(len(b)) :
x = 0
for j in range(len(d)):
if b[i] >= d[j]:
x += 1
elif x > 0:
break
else:
j = 0
break
d = d[x:]
d.append(b[i])
d.sort()
print(len(d))
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question