文章列表

筛选

问题 1936: 蓝桥杯算法提高VIP-最大乘积

摘要: **对于n个数,从中取出m个数,如何取使得这m个数的乘积最大呢?** ** 输入: 第一行一个数表示数据组数 每组输入数据共2行: 第1行给出总共的数字的个数n和要取的数的个……

尺取法,p146

摘要: #include #include #include using namespace std; static const int MAX = 50……

尺取法,p149

摘要: #include #include #include #include #include using namespace std; ……

C enum(枚举)(转载)

摘要: 枚举是 C 语言中的一种基本数据类型,它可以让数据更简洁,更易读。 枚举语法定义格式为: enum 枚举名 {枚举元素1,枚举元素2,……}; 接下来我们举个例子,比如:一星期有 7……

开关问题,p150

摘要: #include #include #include using namespace std; static const int MAX = 50……

冒泡排序法

摘要: #include using namespace std; static const int MAX = 5000; int n; ……