- 博客(6)
- 收藏
- 关注
转载 HDU 1002 A + B Problem II
纯粹的大数问题题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1002感觉代码好龊 QAQ 但是写的应该还是比较好理解的...(面壁...#include <stdio.h>#include <string.h>int main(){ char s1[1001], s2[1001]; ...
2012-03-31 17:23:00
80
转载 巴什博弈问题 HDU 1846 1847
目前学博弈中...巴什博弈问题HDU 1846 Brave Game题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1846可以取走1...m个石子,即拿到(m+1)的倍数的棋子的人必胜代码如下:View Code #include <stdio.h>int main(){ int c, n, m; scanf...
2012-03-31 17:00:00
107
转载 HDU 2602 Bone Collector
某某骨头收藏家~~~红果果的01背包问题...题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2602大致题意:输入:第一行T,T组数据;第二行N、V,N为接下来输入N个骨头的信息,V为背包的体积;第三行为N个骨头各自的价值;第四行为N个骨头各自的体积。输出:在不超过背包体积的范围内,背包可以装载骨头的最大的价值...
2012-03-28 21:38:00
92
转载 HDU 1159 Common Subsequence
LCS,动态规划基本题型...题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1159代码如下:#include <stdio.h>#include <string.h>char a[1000005], b[1000005];int dp[10005][10005];int lena, lenb;i...
2012-03-28 21:14:00
67
转载 HDU 1087 Super Jumping! Jumping! Jumping!
另一动态规划基本题型,LIS...题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1087代码如下:#include <stdio.h>int n;int max;int num[1000005];int dp[1000005];void d_p(){ max = dp[0]; for( int...
2012-03-28 21:08:00
80
转载 HDU 2084 数塔
几天前学了动态规划,做了下题。数塔是动态规划入门的一个基本问题,题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2084代码如下:#include <stdio.h>int a[10005][10005],f[10005][10005];int n;int max(int x,int y){ retu...
2012-03-28 20:59:00
59
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人