lcs in c