Given two sequences A = a1a2...am and B = b1b2...bn, the longest common subsequence problem is to find a subsequence such that the subsequence is a common subsequence of A and B and its length is longest. In this paper, we present a method for the longest common subsequence in the query answer setting. Under some assumptions, the problem can be solved in time O(mn / log n) where m, n are the lengths of sequences A and B.