Input
The input will contain a sequence of integers (positive, negative, and/or zero). Maximum length of the sequence will be 25
Output
The output for this program will be a line indicating the length of the longest subsequence, a new line, a dash character ('-'), a new line, and then the subsequence itself printed with one integer per line. If the input contains more than one longest subsequence, the output file should print the one that occurs last in the input .
Notice that the second 8 was not included -- the subsequence must be strictly increasing.
Sample Input
-7
10
9
2
3
8
8
6
Sample Output
4
-
-7
2
3
8
2007-03-22
05:01:05
·
2 answers
·
asked by
atul a
1
in
Computers & Internet
➔ Programming & Design