题目大意:给你$n$项多项式$A(x)$,求出$B(x)$满足$B^2(x)\equiv A(x)\pmod{x^n}$ 题解:考虑已经求出$B_0(x)$满足$B_0^2(x)\equiv A(x)\pmod{x^{\lceil\frac n 2\rceil}}$$$B(x)-B_0(x)\equiv0\pmod{x^{\lceil\frac n 2\rceil}}\\B^2(x)−2B(x)B_0(x)+B_0^2(x)≡0\pmod{x^n}\\A(x)-2B(x)B_0(x)+B_0^2…
题意 题目链接 Sol 这个就很没意思了 求个ln,然后系数除以2,然后exp回去. #include<bits/stdc++.h> #define Pair pair<int, int> #define MP(x, y) make_pair(x, y) #define fi first #define se second #define LL long long #define ull unsigned long long #define Fin(x) {freopen(#x&q…
思路 按如下式子计算即可 \[ B(x)=\frac{A(x)+B'^2(x)}{2B'(x)} \] 代码 // luogu-judger-enable-o2 #include <cstdio> #include <cstring> #include <algorithm> #define int long long using namespace std; const int MAXN = 300000; const int G = 3; const int inv…
思路: RT //By SiriusRen #include <bits/stdc++.h> using namespace std; <<,mod=; int A[N],C[N],invC[N],c[N],d[N],R[N],tmp[N],xx,len,sqrA[N],F[N]; typedef long long ll; int power(ll x,int y){ ll res=; while(y){ )res=res*x%mod; x=x*x%mod,y>>=;…
生成函数这个东西太好用了~ code: #include <bits/stdc++.h> #define ll long long #define setIO(s) freopen(s".in","r",stdin) using namespace std; const int mod=998244353,G=3,N=1000003; int A[N],B[N],F[N],g[N],inv2,C[N],D[N],tmp1[N]; inline int q…
在焦作站的acm网络赛中遇到了一个高精度开根的水题--但是那时候WA了 后面学写java补题还T了orz 所以写一篇文章来记录一下java的大整数类型的基础和开根还有一点心得体会吧 首先给那一题的题面和模板 Jessie and Justin want to participate in e-sports. E-sports contain many games, but they don't know which one to choose, so they use a way to make…