摘要:inline long long multi(long long x,long long y,long long mod)//mod long long { long long tmp=(x*y-(long long)((long double)x/mod*y+0.5)*mod); return tmp<0 ? tmp+mod : tmp; } int pdt(int x,...
阅读全文
摘要:struct point { double x, y; }; point p[N]; struct alpha { double v; bool flag; bool friend operator 2.0 * R) continue; theta = atan2(p[j].y - p[i].y, p[j]...
阅读全文
摘要:void jj(ll x1,ll y1,ll x2,ll y2,ll&A,ll&B,ll&C){ A=y2-y1; B=x1-x2; C=x2*y1-x1*y2; } bool px(ll x1,ll y1,ll x2,ll y2){ return x1*y2==x2*y1; } void getjiao(){//1-2 3-4 ll x1,y1,x...
阅读全文
摘要:namespace polysum { const int D=101000; ll a[D],f[D],g[D],p[D],p1[D],p2[D],b[D],h[D][2],C[D]; ll calcn(int d,ll *a,ll n) {//d次多项式(a[0-d])求第n项 if (n<=d) return a[n]; p1[0]=...
阅读全文