摘要:
完美数列(25) 时间限制 1000 ms 内存限制 32768 KB 代码长度限制 100 KB 判断程序 Standard (来自 小小) 题目描述 给定一个正整数数列,和正整数p,设这个数列中的最大值是M,最小值是m,如果M <= m * p,则称这个数列是完美数列。现在给定参数p和一些正整数 阅读全文
posted @ 2018-03-07 20:05
最美遇见你
阅读(435)
评论(0)
推荐(0)
摘要:
注意:b % 2 == 0 时候不要直接返回 binaryPow(a,b/2,m) * binaryPow(a,b/2,m);因为这样时间复杂度就会上升到O(b),而不是O(logb) 阅读全文
posted @ 2018-03-07 19:04
最美遇见你
阅读(358)
评论(0)
推荐(0)
摘要:
/* 区间贪心算法: 区间不相交问题,给出n个开区间(x,y),从中选择尽可能多的开区间,使得这些区间亮亮没有交集 */ #include #include #include #include using namespace std; const int maxn = 110; struct Inteval{ int x , y; }I[maxn]; int cmp(... 阅读全文
posted @ 2018-03-07 18:51
最美遇见你
阅读(235)
评论(0)
推荐(0)

浙公网安备 33010602011771号