fixed a bug the length of LIS was incorrect when the last element in a[] is not part of the LIS