Recently, Bob bought a TV. The TV can be considered as a string
Alice can only do one hitting for one time, each hitting she can choose one character of the TV string and make it become space. Now what she wants is to make Bob's TV become no wonderful. That is, after all her hittings, the TV will not contain any one of the amazing features.
Alice doesn't want to be very tired, so please help her find the minimum times of hittings to achieve her goal.
The alphabet of the strings consists of characters and the value of ASCII in decimal is from 33 to 126.
The first line contains a string
The second line contains an integer
Then
A single integer, denotes the minimum times of hittings.
sustechcs208television
4
cs
television
cs208
sustech
3
<<<====================@=====>~
3
<<
~
===
9
For 30% testcases:
For another 30% testcases:
For all testcases:
For all testcases: the sum of the appearance times of amazing features in
BTW, Can you solve this problem when