摘要: 题目 Given an integer matrix, find the length of the longest increasing path. From each cell, you can either move to four directions: left, right, up or 阅读全文
posted @ 2016-04-28 18:54 marcusxu 阅读(208) 评论(0) 推荐(0) 编辑
摘要: 自动对齐快捷键为:ctrl+k+d 按快捷键前,请先将需要对齐的代码选中。不选中是不行的。 阅读全文
posted @ 2016-04-28 16:20 marcusxu 阅读(1643) 评论(0) 推荐(0) 编辑
摘要: 产生随机数在程序中很有用,这篇文章简单介绍一下产生随机数的方法。 伪随机数 使用标准库<cstdlib>中的rand()函数产生随机数。 表面上看,这段程序会产生三个随机数,但一个有趣的事情是,每次程序运行时产生的数据都是相同的。 我每次运行的结果都如下: 可以看出,rand()函数并不会产生一个真 阅读全文
posted @ 2016-04-28 11:11 marcusxu 阅读(2933) 评论(0) 推荐(0) 编辑