2013年1月12日

Rails(poj 1363 栈的应用)

摘要: RailsTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 19760Accepted: 7957DescriptionThere is a famous railway station in PopPush City. Country there is incredibly hilly. The station was built in last century. Unfortunately, funds were extremely limited that time. It was possible to establish 阅读全文

posted @ 2013-01-12 21:23 铁树银花 阅读(210) 评论(0) 推荐(0) 编辑

gets()

摘要: 参考资料:点击打开链接原型:char * gets ( char * str );功能:通过标准输入(stdin)读入字符并存储到C类型的字符串,当检测到换行符或者文件结束符时停止读入。换行符和文件结束符不读入字符串中。'\0'自动添加到字符串的最后。参数str:str是指向一段内存空间的指针或者是字符数组的数组名,它指向所读入的字符串,注意str指向的内存空间中原有的内容将被修改。返回值:(1)读入成功:返回str。(2)读入失败:返回NULL。例程:/* gets example */ #include <stdio.h> int main() { char s 阅读全文

posted @ 2013-01-12 15:31 铁树银花 阅读(249) 评论(0) 推荐(0) 编辑

Matrix Chain Multiplication(栈的简单应用)

摘要: Matrix Chain MultiplicationTime Limit: 2 Seconds Memory Limit: 65536 KBMatrix multiplication problem is a typical example of dynamical programming.Suppose you have to evaluate an expression like A*B*C*D*E where A,B,C,D and E arematrices. Since matrix multiplication is associative, the order in whi.. 阅读全文

posted @ 2013-01-12 11:57 铁树银花 阅读(416) 评论(0) 推荐(0) 编辑

导航