But let's look for a slight variant of it, where greedy is not so good. And that's what's called the zero-one knapsack problem.
但是让我们找一找它的一些变种,在这些变种中贪婪算法用处不大,这些问题也就是0/1背包问题。
You can brute force it and unfortunately, the so-called Caesar cipher is not very secure because if you assume, for our purposes in English alphabet with 26 characters, say all lowercase for all uppercase, my God, you only have to try like 24, 25, 26 possible rotations until you can figure out what his secret message is.
你可以强行解密但是不幸地是,所谓的凯撒密码不是很安全的,因为如果假设,对于我们的26个字符的字母表,指明所有的小写为大写,我的天,你只要试24,25次,26次就可以解答出,密文的内容。
应用推荐