摘要: PS:以后把模板就放这里了~qwq 有时间就填坑233 常用定义 数学 筛法 线性筛质数 矩阵乘法&快速幂 ST表 一维 字符串 KMP Manacher AC自动机 网络流 Dinic ISAP cpp //By Menteur_Hxy include include include includ 阅读全文
posted @ 2018-07-15 22:49 Menteur_hxy 阅读(366) 评论(0) 推荐(0) 编辑
摘要: T1 方程的解 Solution exgcd求ax+by=c 设方程$a'x+b'y=c'$ 其中$a'=a/(a,b)$ ; $b'=b/(a,b)$ ; $c'=c/(a,b)$ 我们能求出$ax'+by'=(a,b)$的一解 那么因为有$x=x' c'$和$y=y' c'$ 便可以求出设方程的 阅读全文
posted @ 2018-07-15 20:07 Menteur_hxy 阅读(886) 评论(0) 推荐(0) 编辑
摘要: T1 "[Codeforces Round 250 Div1 B] The Child and Zoo" Solution 分析性质后,发现与最大生成树相关,然后就直接套就行了 Code cpp include include include include include define F(i,a 阅读全文
posted @ 2018-07-15 18:41 Menteur_hxy 阅读(233) 评论(0) 推荐(0) 编辑