摘要: #include #include #include using namespace std;const int n = 10;/*cstdlib头文件要和ctime一起,否则无法使用srand*/void RandBetween(int s, int d, int num){ int res... 阅读全文
posted @ 2014-04-15 21:06 木叶火影 阅读(603) 评论(2) 推荐(0) 编辑
摘要: /*题目:一个长度为n的数组a[0],a[1],...,a[n-1]。现在更新数组的各个元素,即a[0]变为a[1]到a[n-1]的积,a[1]变为a[0]和a[2]到a[n-1]的积,...,a[n-1]为a[0]到a[n-2]的积。最后返回更新后数组的最大值。程序要求:要求1.具有线性复杂度。2... 阅读全文
posted @ 2014-04-15 16:36 木叶火影 阅读(390) 评论(0) 推荐(0) 编辑