摘要: 二分法求函数零点 long double l=INT_MIN,r=INT_MAX,mid,eps=1e-6; while(r-l>eps) { mid=(l+r)/2; if(f(mid)<0) l=mid; else r=mid; } cout<<l<<endl; 三分法求单谷函数最小值 long 阅读全文
posted @ 2022-09-13 11:32 凌云_void 阅读(70) 评论(0) 推荐(3)
摘要: 控制台代码「三选一」 document.body.contentEditable='true';document.designMode='on'; javascript:document.querySelectorAll(".prism").forEach((b)=>{b.onclick = fun 阅读全文
posted @ 2022-09-05 10:19 凌云_void 阅读(532) 评论(0) 推荐(3)
摘要: P8110 [Cnoi2021]矩阵 传送门 题解 分析 以样例1为例: 3 0 1 2 3 4 5 6 根据题意,Aij=ai×bj,很容易得到: $$ A= \begin{bmatrix} 4&5&6\ 8&10&12\ 12&15&18\ \end{bmatrix 阅读全文
posted @ 2022-07-21 18:23 凌云_void 阅读(72) 评论(0) 推荐(3)
摘要: 斐波那契数列 a0=0,a1=1,an=an1+an2{an}通项公式 前置芝士——普通生成函数 作用:在无穷级数、函数和数列之间建立关系,通过函数对数列进行操作 举个栗子 对于最简单的一个数列{1,1,1,1,...},我们可以将其每一项 阅读全文
posted @ 2022-07-10 18:33 凌云_void 阅读(668) 评论(0) 推荐(4)
摘要: Interesting codes in console 使用方法:按 F12 并进入控制台,将下面的代码直接复制粘贴到控制台中,回车即可生成特效。 Bo Bo Ball「单击特效」 function clickEffect() { let balls = []; let longPressed = 阅读全文
posted @ 2022-06-19 11:05 凌云_void 阅读(40) 评论(0) 推荐(3)
摘要: 2021/12/06 #define LOCAL #define STDIO #include<iostream> #include<cstdio> #include<climits> using namespace std; namespace IO { #ifdef STDIO template 阅读全文
posted @ 2021-12-06 17:54 凌云_void 阅读(176) 评论(0) 推荐(3)
摘要: 控制台代码如下: var colors = ['rgb(191, 191, 191)', 'rgb(254, 76, 97)', 'rgb(243, 156, 17)', 'rgb(255, 193, 22)', 'rgb(82, 196, 26)', 'rgb(52, 152, 219)', 'r 阅读全文
posted @ 2021-09-21 22:10 凌云_void 阅读(460) 评论(0) 推荐(3)
摘要: 归并排序 模版 #include<iostream> #include<cstdio> using namespace std; int n,a[100100],b[100100]; template<typename type> inline void read(type &x) { x=0;bo 阅读全文
posted @ 2021-09-18 10:08 凌云_void 阅读(29) 评论(0) 推荐(3)
摘要: 取模的性质 性质一:a 证明: 设 a÷b=cd,则 a=bc+d。 在 c++ 中,有 a/b=c,a。将 c,d 代入,得: $$ a=b\cdot\lfloor\frac ab\rflo 阅读全文
posted @ 2021-09-16 16:58 凌云_void 阅读(51) 评论(0) 推荐(0)
摘要: 函数+模板实现 #include<iostream> #include<cstdio> #include<cstring> #include<vector> using namespace std; int n,m,k; vector<vector<int> >a,b,c;//因为普通二维数组不能作 阅读全文
posted @ 2021-09-08 20:07 凌云_void 阅读(91) 评论(2) 推荐(3)
点击右上角即可分享
微信分享提示