- 博客(12)
- 收藏
- 关注
原创 hdu acn 1028 Ignatius and the Princess III
Problem Description"Well, it seems the first problem is too easy. I will let you know how foolish you are later." feng5166 says."The second problem is, given an positive integer N, we define an
2013-11-15 19:44:23
1048
原创 hdu acm 1331 1579 Function Run Fun
挺有意思一道题/*w6 1002 Function Run Fun作者:vivider本题意:算法已给,运用递归时间复杂度太高,思想:防止重复运算*/#include #include using namespace std;int w(int,int,int);int t[22][22][22]= {{{0}}};int main(){ int
2013-11-06 17:10:12
1220
原创 杭电 acm 1176 免费馅饼
终于AC了,简简单单道题 费了那么多时间 哎/*免费馅饼 zhh 动态规划————————————————————时间对应搞清楚*/#include #include#include #include #define MAX 100005int a[11][MAX],dp[11][MAX];//a[i][j]第j秒,落在位置i的馅饼的个数us
2013-11-05 13:27:55
1297
原创 东软实训总结
十二天的实训匆匆而逝,仿佛我们昨天才下船,今天便可以相视一笑问一声:这里的一切都过去了。参加这次实训有很多收获,第一个收获便是新环境的适应能力越来越强,每当到达一个新地方,首先需要做的便是适应这里的环境,新的宿舍,新的室友,新的教室,以及新的学习氛围,令人感到欣慰的是这里的环境,在炎炎夏天,能来到这样一个沿海温润的城市,真的感觉很不错。不得不承认在这儿的日子虽不长,却蛮喜欢这儿的。这里的环境,
2013-08-27 18:41:58
1657
原创 东软实训随笔
十二天的实训匆匆而逝,仿佛我们昨天才下船,今天便可以相视一笑问一声:这里的一切都过去了。参加这次实训有很多收获,第一个收获便是新环境的适应能力越来越强,每当到达一个新地方,首先需要做的便是适应这里的环境,新的宿舍,新的室友,新的教室,以及新的学习氛围,令人感到欣慰的是这里的环境,在炎炎夏天,能来到这样一个沿海温润的城市,真的感觉很不错。不得不承认在这儿的日子虽不长,却蛮喜欢这儿的。这里的环境,
2013-08-27 18:41:02
868
原创 hdu1021 Fibonacci Again
Fibonacci Again Problem DescriptionThere are another kind of Fibonacci numbers: F(0) = 7, F(1) = 11, F(n) = F(n-1) + F(n-2) (n>=2).InputInput consists of a sequence of lines, each containing
2013-08-03 15:07:44
1034
原创 acm笔记
浮点型保留两位小数:去尾法t=int(t/n*100)/100;四舍五入t=int(t/n*100+0.5)/100;输出保留两位小数printf("$%.2f",z);
2013-07-30 10:16:53
1061
原创 HDU 1257 最少拦截系统(贪心算法)
/*HDU 1257为了使得使用的拦截系统最少,自然是要考虑使用与当前高度最接近的系统拦截(应该是贪心算法)*/#include#define INF 0x7ffffff#define MAXN 10000int dp[MAXN];//dp[i]代表第i个int main(){ int n,x,i,res,flag; int minh;
2013-05-16 15:30:22
1027
原创 Prime Ring Problem(搜索 深度优先)
/*HDU 1016*/#include #include using namespace std;int num[21],mark[21],n;//数组num 储存需输出的结果int prim(int t)//判断是否为素数{ for(int i=2;i*i<=t;i++) if(t%i==0) return 0; return 1;}
2013-05-16 11:31:19
879
原创 Max Sum(动态规划)
/*HDU 1003*/#include#includeusing namespace std;int main(){ int c=1,b,a,sum,n,i,j,k,maxs,l; scanf("%d",&k); while(k--) { maxs=-9999; sum=0; j=0;
2013-05-16 09:37:20
963
原创 动态链表
/*由主程序先后调用各个函数实现链表的建立、输出、删除和插入,在主程序中指定需要删除和插入的节点*/#include using namespace std;#define NULLs 0struct student{ long num; float score; student *next;};int n;
2013-04-21 20:44:59
738
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人