摘要:
http://www.lydsy.com/JudgeOnline/problem.php?id=3527 今天肿么这么颓废啊。。。心态崩了 首先我们得出Ei=Fi/qj,然后我们设f[i]=1/i/i,那么我们把刚才的式子转化一下,就是ans[j]=f[i]*g[j-i]-f[i]*g[i-j](s 阅读全文
摘要:
http://www.lydsy.com/JudgeOnline/problem.php?id=2194 卷积。。。 卷积并不高深,其实卷积就是两个多项式相乘的系数,但是得满足一点条件,就是f[n]=a[i]*b[n-i],就是下标和固定。。。然后这道题下标和不固定,但是我们把b反过来,就是一个卷积 阅读全文
摘要:
模板 #include<bits/stdc++.h> #define pi acos(-1) using namespace std; const int N = 300010; int n, m, L, x; int r[N]; complex<double> a[N], b[N]; void f 阅读全文
摘要:
fft裸题 我还没有背下来fft #include<bits/stdc++.h> #define pi acos(-1) using namespace std; const int N = 300010; int n, m, L, x; int r[N]; complex<double> a[N] 阅读全文
摘要:
2-sat。。。求解2-sat方案直接每个变量枚举就行了,lrj的代码很靠谱。。。 #include<bits/stdc++.h> using namespace std; const int N = 300010; struct edge { int nxt, to; } e[N << 4]; i 阅读全文
摘要:
2-sat+二分。。。 每次二分答案然后连边2-sat。。。边要开到n*n 样例水得跟没有一样。。。 #include<bits/stdc++.h> using namespace std; const int N = 4010; struct edge { int nxt, to; } e[N * 阅读全文
摘要:
A:判断一下就可以了 #include<bits/stdc++.h> using namespace std; typedef long long ll; int a, b, c, n; ll ans; int main() { scanf("%d%d%d%d", &a, &b, &c, &n); 阅读全文
摘要:
http://www.lydsy.com/JudgeOnline/problem.php?id=1823 2-sat裸题 #include<bits/stdc++.h> using namespace std; const int N = 4010; struct edge { int nxt, t 阅读全文
摘要:
http://www.lydsy.com/JudgeOnline/problem.php?id=3112 模板题。。。模板又打错了。。。 #include<bits/stdc++.h> using namespace std; const int N = 1010; const double eps 阅读全文
摘要:
http://www.lydsy.com/JudgeOnline/problem.php?id=1061 单纯形。。。 先开始我不知道对偶,看着代码不知所措,并不能懂他们写的是什么。。。 单纯形的标准形式是uoj上那样的,限制小于,最大化,但是这道题是最小化,而且系数取负还不行(我的理解是取负了无法 阅读全文