{"trustable":false,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003e\r\n\tWrite a program that will select the longest\u0026nbsp;\u003cem\u003estrictly\u003c/em\u003e\u0026nbsp;increasing subsequence from a sequence of integers.\u003c/p\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003e\r\n\tThe input file will contain a sequence of integers (positive, negative, and/or zero). Each line of the input file will contain one integer.\u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003e\r\n\tThe output for this program will be a line indicating the length of the longest subsequence, a\u0026nbsp;\u003cspan data-scayt_word\u003d\"newline\" data-scaytid\u003d\"1\"\u003enewline\u003c/span\u003e, a dash character (\u0026#39;\u003ctt\u003e-\u003c/tt\u003e\u0026#39;), a\u0026nbsp;\u003cspan data-scayt_word\u003d\"newline\" data-scaytid\u003d\"2\"\u003enewline\u003c/span\u003e, 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 file.\u003c/p\u003e\r\n\u003cp\u003e\r\n\tNotice that the second 8 was not included -- the subsequence must be strictly increasing.\u003c/p\u003e"}},{"title":"Sample Input","value":{"format":"HTML","content":"\u003cpre\u003e\r\n-7\r\n10\r\n9\r\n2\r\n3\r\n8\r\n8\r\n1\u003c/pre\u003e"}},{"title":"Sample Output","value":{"format":"HTML","content":"\u003cpre\u003e\r\n4\r\n-\r\n-7\r\n2\r\n3\r\n8\u003c/pre\u003e"}}]}