Edit Distance
Given two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each operation is counted as 1 step.)
You have the following 3 operati...
分类:
其他好文 时间:
2014-08-18 20:35:02
阅读次数:
206
好几天没写题解了… 都怪我太弱 补题补不动…
HDU 4937 Lucky Number
题意:一个数字如果只有3456这四种数字组成 那么这个数字是幸运的 问 给出一个x 它在几种进制下是幸运的 如果无穷输出-1
思路:
分类讨论 如果x是3或4或5或6 那么一定有无穷个进制满足(从十进制开始…) 直接输出-1
除去上述情况 那么我们可以将一个数字写成这样 a0 +...
分类:
其他好文 时间:
2014-08-18 18:40:02
阅读次数:
243
TOYS
Time Limit: 2000MS Memory Limit: 65536K
Total Submissions: 10425 Accepted: 5002
Description
Calculate the number of toys that land in each bin of a partitioned toy box.
Mom and dad have a...
分类:
其他好文 时间:
2014-08-18 18:38:13
阅读次数:
307
先是想筛法素数表啊,然后1~2000000000枚举打表啊,结果越想越不对。
后来想到唯一分解定理,可是怎么实现呢。。果然还是需要努力啊。。
研究了discuss代码,码之~
~~~~
dp的思想,若dp[i]是Humble Numbers,那么dp[i]*2,dp[i]*3,dp[i]*5,dp[i]*7都将是Humble Numbers。
所以只需要注意连续性便好了。
#inclu...
分类:
其他好文 时间:
2014-08-18 18:32:52
阅读次数:
166
题目如下:
215 = 32768 并且其各位之和为 is 3 + 2 + 7 + 6 + 8 = 26.
21000 的各位数之和是多少?
原题如下:
215 = 32768 and the sum of its digits is 3 + 2 + 7 + 6 + 8 = 26.
What is the sum of the digits of the number 210...
分类:
编程语言 时间:
2014-08-18 16:28:02
阅读次数:
272
A pair of numbers has a unique LCM but a single number can be the
LCM of more than one possible pairs. Forexample 12 is the
LCM of (1, 12), (2, 12),
(3,4) etc. For a given positive integer N, the ...
分类:
其他好文 时间:
2014-08-18 16:25:24
阅读次数:
240
Given two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each operation is counted as 1 step.)...
分类:
其他好文 时间:
2014-08-18 16:21:57
阅读次数:
148
HDU 3652 B-number (数位DP)...
分类:
其他好文 时间:
2014-08-18 14:35:22
阅读次数:
165
Description
Again Prime? No time.
Input: standard input
Output: standard output
Time Limit: 1 second
The problem statement is very easy. Given a number
n you have to determine the largest p...
分类:
其他好文 时间:
2014-08-18 14:34:52
阅读次数:
193
HDU 3709 Balanced Number (数位DP)...
分类:
其他好文 时间:
2014-08-18 14:34:22
阅读次数:
200