二分法专题
wens
marine origin
wens
展开
-
pie
Problem DescriptionMy birthday is coming up and traditionally I’m serving pie. Not just one pie, no, I have a number N of them, of various tastes and of various sizes. F of my friends are coming to my...原创 2020-05-04 07:33:02 · 102 阅读 · 0 评论 -
HDU-2141
开始 开始会疑问怎么一分为二 double 精确位数10e-6 可以让整形*10e-6,但是奇数除以二会除不尽 #include <iostream> #include <algorithm> using namespace std; int a[505],b[505],c[505];int sab[250005]; bool find( int a, int l ,...原创 2020-04-27 08:28:13 · 103 阅读 · 0 评论 -
算法复杂度
时间复杂度 一个程序的算法时间和效率 常表示O(n)O(n^2)... 四维空间时间用虚轴i来表示 计算机算法里用运算的次数表示时间 **如果复杂度是多个n的函数和,只关心数量级最大** 常数复杂度O(1) 时间和问题的规模无关!? 对数复杂度O(log(n)) 线性复杂度o(n) 多项式复杂度O(n的k次方)k大概是最高次数 指数复杂度 a的n次方 结成复杂度 n! 复杂度分为平均复杂度和最坏复...原创 2020-04-26 20:31:53 · 107 阅读 · 0 评论