该文被密码保护。 阅读全文
posted @ 2012-11-29 11:02 长溪 阅读(4) 评论(0) 推荐(0) 编辑
摘要: 题目是HDU 4463:Outlets 一道最小生成树的题,开始时一头雾水,数据结构也不懂,自己在那写,觉得这个方法麻烦,那个方法麻烦。。网上搜了下,知道了最小生成树,又对着网上的代码写了点。 其实要是一开始坚定自己的思路写下去,也能写出来的,就是没有信心,数据结构就是把自己的想法写下来。。... 阅读全文
posted @ 2012-11-20 19:29 长溪 阅读(501) 评论(2) 推荐(1) 编辑
该文被密码保护。 阅读全文
posted @ 2012-10-29 18:59 长溪 阅读(5) 评论(0) 推荐(0) 编辑
摘要: ifelse ifelse一开始语序反了。。View Code 1 #include 2 #include 3 int main() 4 { 5 char *in,*out,*middle; 6 int top=0,i=0,j=0,k=0,n,p; 7 int *flag,... 阅读全文
posted @ 2012-10-08 17:44 长溪 阅读(149) 评论(0) 推荐(0) 编辑
摘要: Recently you must have experienced that when too many people use the BBS simultaneously, the net becomes very, very slow.To put an end to this problem... 阅读全文
posted @ 2012-09-28 16:53 长溪 阅读(223) 评论(0) 推荐(0) 编辑
摘要: Problem DescriptionFatMouse prepared M pounds of cat food, ready to trade with the cats guarding the warehouse containing his favorite food, JavaBean.... 阅读全文
posted @ 2012-09-27 11:55 长溪 阅读(215) 评论(0) 推荐(0) 编辑
摘要: There 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 contai... 阅读全文
posted @ 2012-09-27 11:50 长溪 阅读(134) 评论(0) 推荐(0) 编辑
摘要: 字符链表的创建,不清楚的时候,指针乱飞,出现Segmentation Fault。改正后,creat函数中,p1=p2时,p1去调用malloc,p1指向另外的一个区域,这点还是不太清楚。代码先贴着~View Code 1 #include 2 #include 3 typedef struct... 阅读全文
posted @ 2012-09-27 11:39 长溪 阅读(219) 评论(0) 推荐(0) 编辑
摘要: n层楼梯,可以1次上2阶,或1阶,问有多少种方法走楼梯。View Code 1 #include 2 #include 3 int main() 4 { 5 int n; 6 int *array; 7 void calculate(int n,int *array,i... 阅读全文
posted @ 2012-09-27 11:35 长溪 阅读(448) 评论(0) 推荐(0) 编辑