08 2022 档案
摘要: 做法 我在考场上只想到此做法,不难想到,可以将三段用二分预处理。 表示从开始总和为的末尾编号,可以用二分处理。 最后 判断即可。 #include <bits/stdc++.h> #define ll long long us
阅读全文
摘要:今天看jiangly代码的时候,发现jiangly用vector而不是数组: 于是我测试了一下。 #include <bits/stdc++.h> using namespace std; const int N=1e8; int a[N]; vector<int>b(N); vector<int>
阅读全文
摘要:Educational Codeforces Round 132 (Rated for Div. 2) B #include <bits/stdc++.h> #define ll long long using namespace std; const ll N=1e5+5; ll a[N],s1[
阅读全文
摘要:Miller-Rabin 素数判断 #include <bits/stdc++.h> #define ll long long using namespace std; const int T=10; ll n; ll fp(ll a,ll r,ll p){ ll res=1; for(;r;r>>
阅读全文
摘要:多项式乘法 FFT #include <bits/stdc++.h> using namespace std; const int N=1e7+6; const double P=acos(-1); int n,m; struct node{ double x,y; node(double xx=0
阅读全文
摘要:计算圆周率,最简单的是莱布尼茨公式: $$ \begin{align} \arcsin x &= x-\frac{x^3}{3}+\frac{x^5}{5}-\cdot \cdot \cdot \ 代入x=1得:\frac{\pi}{4} &=\sum_{i=0}^{\infty}{\frac{(-
阅读全文