You are given two strings S, P and two integers, \(K1\), \(K2\). You have to find the length of the longest common subsequence after performing at-most \(K1\) operations on string S and at-most \(K2\) operations on string P. In one operation, you can change a character of the string to any alphabet.
INPUT FORMAT :
First line contains a string, S .
Second line contains a string, P.
Third line contains two space separated integers, \(K1\) and \(K2\) .
OUTPUT FORMAT :-
Print the length of the longest common subsequence after performing at-most \(K1\) operations on string S and at-most \(K2\) operations on string P.
CONSTRAINTS :-
Please login to use the editor
You need to be logged in to access the code editor
Loading...
Please wait while we load the editor
Login to unlock the editorial