Subsequences of Length Two SOLUTION
You are given two strings s and t comprising of lowercase Latin letters. The length of t is 2 (for example this string comprises just of two characters).
In one move, you can pick any character of s and supplant it with any lowercase Latin letter. All the more officially, you pick some I and supplant si (the character at the position I) with some character from ‘a’ to ‘z’.
You need to do close to k substitutions so that expands the quantity of events of t in s as an aftereffect.
Review that an aftereffect is a succession that can be gotten from the given grouping by erasing at least zero components without changing the request for the rest of the components.
The principal line of the information contains two numbers n and k (2≤n≤200; 0≤k≤n) — the length of s and the most extreme number of moves you can make. The second line of the information contains the string s comprising of n lowercase Latin letters. The third line of the information contains the string t comprising of two lowercase Latin letters.
Print one number — the most extreme conceivable number of events of t in s as an aftereffect on the off chance that you supplant close to k characters in s ideally.
In the principal model, you can acquire the string “abab” supplanting s1 with ‘an’ and s4 with ‘b’. At that point the appropriate response is 3.
In the subsequent model, you can get the string “ssddsdd” and find the solution 10.
In the fourth model, you can get the string “aaacaaa” and find the solution 15.