摘要: 引用博客: 带边数的无向连通图计数 Pretty is a smart girl who loves math very much. She has already learned FFT algorithm. She loves traveling and she is looking forwa 阅读全文
posted @ 2020-07-27 16:32 zhuzihan 阅读(125) 评论(0) 推荐(0) 编辑
摘要: 题目链接 学习线段树的区间懒标记想法,我们把整个区间当作一个区间。 懒标记有$add,mul,cov$ \(add\):区间里每个数加上多少。 \(mul\):区间里每个数乘上多少。 \(cov\):最近一次区间赋值的值是多少。 利用上面三个标记,我们就解决了所有区间修改。 但是单点修改呢? 题目中 阅读全文
posted @ 2020-07-27 16:26 zhuzihan 阅读(89) 评论(0) 推荐(0) 编辑
摘要: 题目链接 求给定区间内有无两个数的和/差/积为给定的数(两个数可相同)。 首先操作可离线,范围又只有$10^5$,还是区间问题,又没有什么数据结构维护,那大概就是莫队吧。 我们维护每种数出现次数,记为$sum_i$ 然后开两个bitset当作bool 数组用,分别统计$i$和$100000 - i$ 阅读全文
posted @ 2020-07-27 16:13 zhuzihan 阅读(100) 评论(0) 推荐(0) 编辑
摘要: Ball In Geometry, a spherical cap is a portion of a sphere cut off by a plane. If the radius of the sphere is \(r\) and the height of the spherical ca 阅读全文
posted @ 2020-07-27 16:01 zhuzihan 阅读(118) 评论(0) 推荐(0) 编辑
摘要: 题面: In digital image processing, thresholding is the simplest method of segmenting images. From a grayscale image, thresholding can be used to create 阅读全文
posted @ 2020-07-27 14:52 zhuzihan 阅读(104) 评论(0) 推荐(0) 编辑