ACM Warmup Problem - Longest Adjacent Subsequences
It is occasionally useful for mathematicians examining long strings of
numeric information to find the longest runs of numbers that are
strictly increasing or strictly decreasing.
You will be given a series of integers on standard input. Your task
is to print out the length of the longest sequence of these integers
for which each successive integer is larger than the previous, and the
length of the longest sequence of decreasing-value integers.
Input
Read integers from standard input until EOF.
Output
Two integers: the length of the longest increasing adjacent
subsequence, and the length of the longest decreasing adjacent
subsequence.