给定长度为 n 的字符串 s,仅含字符 'e'、'l'、'm'。你可以把 s 中若干互不相交的连续子串分别匹配为下列模式并计分(未匹配的字符不计分):
ele,得 x 分;me,得 y 分;eleme,得 z 分。每个字符至多被使用一次。求能获得的最高分数。
字符串长度 n 满足 1≤n≤105。分数 x,y,z 满足 1≤x,y,z≤1000。
By signing up a CodeFun2000 universal account, you can submit code and join discussions in all online judging services provided by us.