← All problemsSign in

Amal’s Business

Amal decided to make some money doing business on the Internet for exactly $n$ days. She knows that on the $i$-th day $(1 ≤ i ≤ n)$ she makes $a_i$ money. Amal loves progress, that's why she wants to know the length of the maximum non-decreasing subsegment in sequence $a_i$. Let us remind you that the subsegment of the sequence is its continuous fragment. A subsegment of numbers is called non-decr

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start