Problem 3637 · Easy

Trionic Array I

Find the peak-then-valley boundaries by scanning runs, then check the three segments have the required strict directions.

Open the interactive visualisation