Description
Problem A
Tribbles
Input: Standard Input
Output: Standard Output
GRAVITATION, n.
"The tendency of all bodies to approach one another with a strength
proportion to the q...
分类:
其他好文 时间:
2014-08-29 13:09:27
阅读次数:
162
static int* Min;static int* Max;void LeastCoin2(int* Value, int Len, int *d, int Goal) { for(int i = 1; i = Value[j]) { ...
分类:
其他好文 时间:
2014-08-29 12:59:17
阅读次数:
171
本文为senlie原创,转载请保留此地址:http://blog.csdn.net/zhengsenlie
Plus One
Total Accepted: 17614 Total
Submissions: 55852My Submissions
Given a non-negative number represented as an array ...
分类:
其他好文 时间:
2014-08-29 02:53:26
阅读次数:
223
http://poj.org/problem?id=3252题意:问从a到b有多少个round number。如果某数的二进制表示中0的个数不少于1的个数,那么它就是一个round number。分析:数位dp。就我目前碰到的几道数位dp来说,其实所谓数位dp,就是和组合数有联系的递推罢了。还是转换...
分类:
其他好文 时间:
2014-08-28 19:45:55
阅读次数:
232
static int* Min;
static int* Max;
void LeastCoin2(int* Value, int Len, int *d, int Goal)
{
for(int i = 1; i <= Goal; i++)
{
for(int j = 0; j = Value[j])
...
分类:
其他好文 时间:
2014-08-28 16:18:49
阅读次数:
216
递推...
Little Tiger vs. Deep Monkey
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65535/65535 K (Java/Others)
Total Submission(s): 661 Accepted Submission(s): 244
Problem Des...
分类:
其他好文 时间:
2014-08-28 11:28:29
阅读次数:
269
How many Fibs?DescriptionRecall the definition of the Fibonacci numbers:f1 := 1 f2 := 2 fn := fn-1 + fn-2 (n>=3) Given two numbers a and b, calcul...
分类:
其他好文 时间:
2014-08-27 20:17:48
阅读次数:
208
一个Catalan数的题,打表对每个数都求一次逆元会T,于是问到了一种求阶乘逆元的打表新方法。 比如打一个1~n的阶乘的逆元的表,假如叫inv[n],可以先用费马小定理什么的求出inv[n],再用递推公式求出前面的项。 我们记数字 x 的逆元为f(x) (%MOD)。 因为 n! = (n-...
分类:
其他好文 时间:
2014-08-27 18:09:18
阅读次数:
227
JAVA大数类练手 748 - ExponentiationUva 424Uva 10106Uva 465Uva 10494POJ 2389POJ 2756HDU 1715HDU 1047HDU 1297HDU 1002HDU 1316HDU 1865HDU 1250HDU 1042HDU 1753...
分类:
其他好文 时间:
2014-08-26 21:15:16
阅读次数:
164
http://acm.neu.edu.cn/hustoj/problem.php?id=1456
题意很明白,但是不知道怎么下手,纠结了好久。后来看了题解,才发现是dp递推。 还是觉得自己太弱。
dp[i][j]表示在i个数里面选j个数,那么 dp[i][3]=dp[i-1][3]+dp[i-1][2]*f[i];
#include
#include
#define mod 40082382...
分类:
其他好文 时间:
2014-08-26 17:34:36
阅读次数:
183