Template:Problem

UVa 10534 Wavio Sequence
http://acm.uva.es/p/v105/10534.html

Summary
Summary of the problem statement goes here.

Explanation
Explanation of the ideas behind the solution goes here.

Gotchas

 * Any points one can easily overlook?
 * The correct way to understand ambiguous formulations?

Implementations
Notes/Hints on actual implementation here.

Optimizations
Optimizations here.

Input
Input Here

Output
Output Here