码迷,mamicode.com
首页 >  
搜索关键字:largest    ( 1413个结果
leetcode || 53、Maximum Subarray
problem: Find the contiguous subarray within an array (containing at least one number) which has the largest sum. For example, given the array [?2,1,?3,4,?1,2,1,?5,4], the contiguous su...
分类:其他好文   时间:2015-03-31 18:00:23    阅读次数:121
lightoj 1297(三分)
传送门:Largest Box题意:长度为L宽度为W的纸四个角去掉x*x的正方形,然后形成一个长方体,问能组成长方体的最大体积为多少。分析:三分x求最值。#include #include #include #include #define N 100010#define mod 100000000...
分类:其他好文   时间:2015-03-31 17:19:41    阅读次数:122
Leetcode: Maximum Subarray
题目: Find the contiguous subarray within an array (containing at least one number) which has the largest sum.For example, given the array [?2,1,?3,4,?1,2,1,?5,4], the contiguous subarray [4,?1,2,1] h...
分类:其他好文   时间:2015-03-30 23:11:53    阅读次数:188
Leetcode: Maximum Product Subarray
题目: Find the contiguous subarray within an array (containing at least one number) which has the largest product.For example, given the array [2,3,-2,4], the contiguous subarray [2,3] has the largest...
分类:其他好文   时间:2015-03-30 23:10:30    阅读次数:175
max值——单元测试
设计思想在调试的时候,尽可能的将所有可能出现的情况都考虑到,输入这些情况,查看程序运行的结果源代码#includeusing namespace std;int Largest(int list[], int length);int main(){ int list[100]; int lenght...
分类:其他好文   时间:2015-03-30 22:36:51    阅读次数:160
[LeetCode] Maximum Subarray 最大子数组
Find the contiguous subarray within an array (containing at least one number) which has the largest sum.For example, given the array[?2,1,?3,4,?1,2,1,...
分类:编程语言   时间:2015-03-30 11:10:46    阅读次数:154
【课堂练习】输出一个数组中的最大值并测试
设计思想用函数封装求数组最大值的代码,主函数中调用函数实现功能。源程序代码#include using namespace std;int Largest(int list[],int length){ int i; int max=list[0]; for (i=0;imax) { max=lis...
分类:编程语言   时间:2015-03-29 17:48:31    阅读次数:165
软件工程概论---max单元测试
题目:一个单元测试,查找list[]中的最大值编写一个程序对Largest函数进行测试,列举所有测试用例。思路:首先确保数组不为空,和数组长度不为0,否则输入错误。根据老师所给的函数写一个主函数,在运行中进行测试。自己写的主函数输入输出就可以了。#includeusing namespace std...
分类:其他好文   时间:2015-03-29 16:29:44    阅读次数:136
class 3 求数组中的最大值(单元测试)
1.问题引出:int Largest(int list[], int length){ int i,max; for(i = 0; i max) { max=list[i]; } } return ...
分类:编程语言   时间:2015-03-28 23:13:23    阅读次数:139
课堂练习--单元测试
1.程序代码//郭婷 20132916 信1305 2015/3/27#includeusing namespace std;int Largest(int list[], int length){ int i, max; max = list[0]; for (i = 0; i ...
分类:其他好文   时间:2015-03-28 23:12:22    阅读次数:202
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!