Oscar enjoys watching crime movies very much. He admires all those villains for how creative some of them can get. He would like to show off some of his creativity, too. Sadly, he’s quite inexperien
Oscar enjoys watching crime movies very much. He admires all those villains for how creative some of them can get. He would like to show off some of his creativity, too. Sadly, he’s quite inexperienced and he is unable to come up with his own kind of a trick. So he would like to get inspired by some old trick. He always loved watching criminals cutting out the letters from newspapers and putting them together to form a ransom text. However, Oscar ain’t a total rip off so he came up with his own variant of this trick. He feels that putting the text together letter by letter is simply too boring and time consuming. So he decided to create his ransom note by cutting out whole words. Oscar bought several mainstream newspapers, therefore he has practically unlimited source of paper to cut the words from. He can cut out any particular word as many times as he wishes. However, he’s still limited by the set of words which appear in the newspapers. The trouble is that some words are just not used in the newspapers at all. To make his job a bit easier, he decided to erase all punctuation and all whitespace characters from the ransom note and ignore the case of characters. He also allows the cut-out words to overlap, as far as the overlapping parts contain the same text. Oscar now wonders how many words at minimum he has to cut out from the newspapers to put together the ransom note.
![HBC233977收集纸片,枚举,状压dp,动态规划[CERC2018]The ABCD Murderer题解
-第1张图片-东莞河马信息技术 HBC233977收集纸片,枚举,状压dp,动态规划[CERC2018]The ABCD Murderer题解
-第1张图片-东莞河马信息技术](https://www.xxstcz.com/zb_users/upload/2023/11/20231110200602169961796219588.jpeg)