you give stre s integer x y you perform type operation number timesremove substre ab gain x pointsfor example remove ab cabxbae cxbaeremove substre ba gain y pointsfor example remove ba cabxbae cabxeReturn maximum point gain apply operation s Example 1input s cdbcbbaaabab x 4 y 5output 19explanation Remove ba underline cdbcbbaaabab now s cdbcbbaaab 5 point add score Remove ab underline cdbcbbaaab now s cdbcbbaa 4 point add score Remove ba underline cdbcbbaa now s cdbcba 5 point add score Remove ba underline cdbcba now s cdbc 5 point add scoretotal score 5 4 5 5 19example 2input s aabbaaxybbaabb x 5 y 4Output 20 Constraints1 slength 1051 x y 104s consist lowercase english letter