Stair, Peak, or Neither?

Problem Name:
Stair, Peak, or Neither?
Site:CodeForces
Links:
Tags:
Problem setters: