枚举
_lyl
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
找零钱问题(暴力枚举+剪枝)
找零钱 Time Limit: 1000ms Memory limit: 65536K 有疑问?点这里^_^ 题目描述 我们知道人民币有1、2、5、10、20、50、100这几种面值。 现在给你n(1≤n≤250)元,让你计算换成用上面这些面额表示且总数不超过100张,共有几种。 比如4元,能用4张1元、2张1元和1张2元、2张2元,三种表示方法。 输入 输入原创 2014-06-21 14:52:48 · 1078 阅读 · 1 评论 -
poj 2109 Power of Cryptography(暴力枚举)
B - Time Limit:1000MS Memory Limit:30000KB 64bit IO Format:%I64d & %I64u Submit Status Description Current work in cryptography involves (among other things) large prime num原创 2014-08-04 20:02:36 · 804 阅读 · 0 评论 -
Codeforces 327A-Flipping Game(暴力枚举)
A. Flipping Game time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Iahub got bored, so he invented a game to b原创 2014-10-11 22:36:02 · 1463 阅读 · 0 评论 -
UVA 11889-Benefit(数学_快速枚举因子)
Recently Yaghoub is playing a new trick to sell some more. When somebody gives him A Tomans, he who never has appropriate changes, asks for B Tomans such that lowest common multiple of A and B equal原创 2014-10-29 21:05:07 · 1323 阅读 · 0 评论 -
POJ 1580-String Matching(枚举)
题目链接:http://poj.org/problem?id=1580 题意:给出两个串a,b,求它们的最大匹配度。最大匹配度=最大匹配个数*2/(len_a+len_b) 因为a和b的最开始匹配的部位都是任意的,所以枚举它们最开始匹配的部位即可。复杂度O(len_a*len_b*(k))k 其实这个穿应该都不是很长(不然这么挫的办法不可能0MS过。。) #include #includ原创 2014-11-22 18:27:47 · 1049 阅读 · 0 评论
分享