Hill Sequence
Chef has met up with his friend Isaac recently. Isaac told Chef that his team needs to solve the following problem to win ACPC and qualify to ICPC 2021. However, no one in the team is good at expected value problems ― can you help them qualify? A sequence $a_1, a_2, \ldots, a_N$ is said to be a *hill sequence* if there is an integer $p$ ($1 \leq p \leq N$) such that $0 \leq a_1 \leq a_2 \ldots
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.
Sign in to chat with the tutor and save your progress.
Sign in to start