摘要: 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) 编辑