struct BIT { LL h[(int)1e5 + 9], n; void init(int x) { n = x; f(i,1,n)update(i); } void update(int x) { while(x<=n){ h[x]=aa[x]; int low=lowbit(x); for(int i=1;…
考虑对于区间 , Bob 是否可以达成平手。 如果 Alice 取 ,Bob 取 并且有 ,那么区间就转移到了 上。相反的,如果 Alice 取 ,那么 Bob 可以取 ,也是同上的。 如果 Alice 取 ,Bob 取 并且有 ,那么区间就转移到 上…
英语不好被题面搞了老半天,:) 不过 unrated 了,好事!
还好光荣下班?A: #include <bits/stdc++.h> /* #include<ext/pb_ds/assoc_container.hpp> #include<ext/pb_ds/hash_policy.hpp> */using namespace std; const double eps =…
第一类斯特林数 下降幂转普通幂: 上升幂转普通幂:$$x^{\overline {n}} = \sum\l…
反演:求逆映射的过程 二项式反演
\begin{aligned} ans & = \sum_{i=0}^n\dbinom{n}{i}p^iq^{n-i}i^k \ & =\sum_{i=0}^n {n\choose i}p^iq^{n-i}\sum_{j=0}^k{k \brace j}i^{\underline{j} } \ & =\sum_{i=0}…
今晚看见 ec 上 gym 了,也是时候写写游记了 E. Prof. Pang and Poker 开场有人开了 A 和 I,队友读完 I 后觉得可做,我看榜后去弄 A。 然后队友 I 写出了些问题,我上机写 A,此时评测机繁忙,后面显示 correct 过了,罪恶 - 1 然后队友讨论完 I 后也过了,接下来我看完 L 也上机写,但是写着写着写挂了(此时理解错题意,1 不代表是正数而应该是…
求点在直线上的投影坐标,考虑定比分点的性质做,注意特判边界条件 #include <cstdio> #include <cmath> using namespace std; double xx1, x2, yy1, y2, xx0, yy0; int q; int main () { scanf ("% lf% lf% lf% lf", &…
https://yun.ilyh.xyz/s/x9T4/code?name=geo.cpp