An implementation of LCS in C++