longest increasing weight problem