上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 52 下一页
摘要: http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=5274 1 #include 2 #include 3 #include 4 using namespace std; 5 6 int n,l; 7 char str[10... 阅读全文
posted @ 2014-10-28 21:45 null1019 阅读(182) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=4550贪心 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #define maxn 200 8 using na... 阅读全文
posted @ 2014-10-23 21:00 null1019 阅读(124) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=4545 1 #include 2 #include 3 #include 4 #define maxn 2000 5 using namespace std; 6 7 char s1[maxn],s2[ma... 阅读全文
posted @ 2014-10-23 20:09 null1019 阅读(102) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=4507用dp结构体里面存有符合要求的个数cnt,各位数和的sum1,符合要求的数的平方和sum2三个值。在维护sum2时需要用到sum1和cnt两个值。数位dp 1 #include 2 #include 3 ... 阅读全文
posted @ 2014-10-22 23:23 null1019 阅读(195) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=3709题意:在一个区间内有多少个,可以一这个数中的一个数字为支点,两边的数字乘上边距的和相等。数位dp,枚举支点。 1 #include 2 #include 3 #include 4 #define ll ... 阅读全文
posted @ 2014-10-22 19:50 null1019 阅读(174) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=3652数位dp题意:求1到n中能被13整除且含有13的数的个数。dp[i][j][k][c]表示dfs到i位,余数为j,是否含有13的标志k,最后一个数为m的有多少个符合要求的数。dfs枚举每一位。 1 #incl... 阅读全文
posted @ 2014-10-22 11:27 null1019 阅读(103) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=2089和hdu 3555 一样,先预处理,从最高位处理。然后减去不符合要求的,就是所求的。 1 #include 2 #include 3 #include 4 #define ll int 5 using ... 阅读全文
posted @ 2014-10-21 11:17 null1019 阅读(197) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=3555 1 #include 2 #include 3 #include 4 #define ll __int64 5 using namespace std; 6 7 ll dp[30][3]; 8 in... 阅读全文
posted @ 2014-10-21 10:52 null1019 阅读(133) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=4658这道题不会做,看着别人的写的。这道题求的是一个数的划分,但是划分中一个数不能重复k次,用到了五边形数定理,没看懂。 1 #include 2 #include 3 #include 4 #define ... 阅读全文
posted @ 2014-10-20 20:52 null1019 阅读(150) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=2197长度为n的01串有2的n次方个,再减去不符合要求的。不符合要求的字符串就是长度为n的约数的字符串。 递归处理,然后用map映射记录求出的每一个数的值,为以后再次输入处理过的数,就可以直接输出,不用递归处理。 ... 阅读全文
posted @ 2014-10-20 19:23 null1019 阅读(109) 评论(0) 推荐(0) 编辑
上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 52 下一页