随笔分类 -  算法—高精度

摘要:实数二分,最短路,线段树,记忆化搜索,模拟,状压dp,杜教筛 maze,bird,stone,军训队列,山屋惊魂,彩球问题 阅读全文
posted @ 2019-10-28 20:03 xukl21 阅读(266) 评论(0) 推荐(0)
摘要:题面:https://www.cnblogs.com/Juve/articles/11639923.html simple: 考试时只想到的暴力exgcd判断 考虑n,m互质的情况: 我们枚举y,对于方程$n*x+m*y \leq q$,$x\leq\frac{q-m*y}{n}$ 其中y的范围是[ 阅读全文
posted @ 2019-10-09 10:21 xukl21 阅读(196) 评论(0) 推荐(0)
摘要:题面:https://www.cnblogs.com/Juve/articles/11479415.html T1:高精度gcd,其实不用写高精度取模,gcd还有一种求法 然后愉快地AC T2: 正解$O(n)$,数状数组卡常可A $sum_i$表示前缀和 我们对于每一个i,求出$sum_i-sum 阅读全文
posted @ 2019-09-07 10:42 xukl21 阅读(183) 评论(0) 推荐(0)
摘要:题目描述 某城市的街道呈网格状,左下角坐标为A(0, 0),右上角坐标为B(n, m),其中n >= m。 现在从A(0, 0)点出发,只能沿着街道向正右方或者正上方行走,且不能经过图示中直线左上方的点,即任何途径的点(x, y)都要满足x >= y, 请问在这些前提下,到达B(n, m)有多少种走 阅读全文
posted @ 2019-07-21 19:34 xukl21 阅读(419) 评论(0) 推荐(0)
摘要:struct node{ int m[MAXN]; node(){memset(m,0,sizeof(m));} inline friend void operator *= (node &a,re int b){ int x=0; for(re int i=1;i<=a.m[0];i++){ re 阅读全文
posted @ 2019-07-21 17:18 xukl21 阅读(174) 评论(0) 推荐(0)