上一页 1 2 3 4 5 6 ··· 28 下一页
摘要: 题面 提供一种不需要多项式/生成函数的做法。 方便起见,记 \(P(G)=0/1\) 表示 \(G\) 是否不存在非平凡自同构。 首先发现对于图 \(G\) 的补图 \(G'\),显然 \(P(G)=P(G')\)。 那么边数的最大值 \(=\frac{n(n-1)}{2}-\) 边数的最小值。 显 阅读全文
posted @ 2023-12-01 16:37 A_zjzj 阅读(35) 评论(0) 推荐(0) 编辑
摘要: using LL=__int128; int mod=998244353; ll qpow(ll x,ll y=mod-2,ll ans=1){ for(;y;(x*=x)%=mod,y>>=1)if(y&1)(ans*=x)%=mod; return ans; } mt19937 rnd(time 阅读全文
posted @ 2023-11-30 09:00 A_zjzj 阅读(16) 评论(0) 推荐(0) 编辑
摘要: 多项式vector模板 任意模数多项式vector模板 非负数vector高精度模板 二维计算几何模板 最大流/费用流模板 矩阵乘法模板 组合数模板 阅读全文
posted @ 2023-11-30 07:55 A_zjzj 阅读(51) 评论(0) 推荐(0) 编辑
摘要: vector 实现。 using LL=__int128; const int mod=998244353; ll qpow(ll x,ll y=mod-2,ll ans=1){ for(;y;(x*=x)%=mod,y>>=1)if(y&1)(ans*=x)%=mod; return ans; } 阅读全文
posted @ 2023-11-30 07:53 A_zjzj 阅读(23) 评论(0) 推荐(0) 编辑
摘要: Day \(-1\) 早上开了场 CF Div1+2 VP,ABCD 都一眼秒,E 假了一发,然后仔细差分了一下才过。 中午吃得有点饱,感觉车上要吐。 上车和 fls 看了一下 CSP 2023 大巴车上没看完的《爱乐之城》,然而看到一半眼皮撑不住了,电脑耳机给了 fls,开始睡大觉。 睡醒的时候 阅读全文
posted @ 2023-11-19 16:32 A_zjzj 阅读(224) 评论(1) 推荐(1) 编辑
摘要: #include<bits/stdc++.h> using namespace std; using ll=long long; #ifdef DEBUG template<typename T> ostream& operator << (ostream &out,vector<T> a){ ou 阅读全文
posted @ 2023-11-17 07:30 A_zjzj 阅读(21) 评论(0) 推荐(0) 编辑
摘要: 构造题注意事项 一定要转化思路,不要总是盯着一个特殊点; 多注意特殊点的变化: 例如 P7115 [NOIP2020] 移球游戏,如果总是盯着一个全不是 \(c\) 的栈和一个空的栈对其他栈操作,就会使得步数要翻一倍,然而如果只操作一半,那么此时可以用当前栈作为新的空栈,原来的空栈作为新的全不是 \ 阅读全文
posted @ 2023-11-01 10:56 A_zjzj 阅读(34) 评论(0) 推荐(0) 编辑
摘要: 二维 using vec=complex<int>; ll dot(const vec &a,const vec &b){ return 1ll*real(a)*real(b)+1ll*imag(a)*imag(b); } ll cross(const vec &a,const vec &b){ r 阅读全文
posted @ 2023-10-11 13:43 A_zjzj 阅读(12) 评论(0) 推荐(0) 编辑
摘要: 最大流 const int N=5e2+10,M=26,INF=1e9; namespace Flow{ const int V=N+M,E=N*M*2+N*2+M*2+V*2; int s,t,kk,head[V],d[V],cur[V]; struct edges{ int to,c,nex; 阅读全文
posted @ 2023-10-09 16:08 A_zjzj 阅读(11) 评论(0) 推荐(0) 编辑
摘要: 思路来自 [这里](https://www.luogu.com.cn/blog/zifanwang/sta-r3-gao-wei-li-fang-ti-ti-xie)。 $\operatorname{fib}(1)=\operatorname{fib}(2)=1,\operatorname{fib} 阅读全文
posted @ 2023-08-09 22:51 A_zjzj 阅读(20) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 28 下一页