Question: B. Hills And Valleys time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output You are given

B. Hills And Valleys time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output You are given a sequence of n integers a, az... Let us call an index j (2 si 3n-1) a hill if a, > az-1 and a; > 0,- 1; and let us call it a valley if a;
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
