// Prototype of dynamic programming for Longest Strictly Increasing Subsequence // Based on D. Gries, The Science of Programming, p. 262 // which is based on M. Fredman, Discrete Mathematics 11 (1975), // 29-35. // See CSE 2320 Notes 07 import java.util.Scanner; public class LSIS { public static void main(String[] args) { // Get input sequence Scanner sc=new Scanner(System.in); int n=sc.nextInt(); int y[]=new int[n+1]; for (int i=1;i0; i=j[i]) System.out.print(y[i]+"\n"); } }