https://hack.codingblocks.com/contests/c/457/1006 https://ide.codingblocks.com/#/s/29867
https://ide.codingblocks.com/#/s/29926
this is the correct way of implementing LIS.