随笔分类 -  基础莫队

摘要:PS:没看出这个可以离线。。。官方题解 标程貌似不是常规莫队的写法,同一个块内,没有对 r 排序,优先处理每个块的答案。学习到了阶乘逆元的递推公式。 避免加法溢出 避免乘法溢出 避免减法取模溢出 阅读全文
posted @ 2018-08-02 13:27 天之道,利而不害 阅读(148) 评论(0) 推荐(0) 编辑
摘要:After a long series of jobless days, Sherlock and Watson frustated by the lack of new cases, decide to turn their minds toward something interesting l 阅读全文
posted @ 2018-05-06 16:10 天之道,利而不害 阅读(403) 评论(0) 推荐(0) 编辑
摘要:You have a rooted tree consisting of n vertices. Each vertex of the tree has some color. We will assume that the tree vertices are numbered by integer 阅读全文
posted @ 2018-05-03 15:58 天之道,利而不害 阅读(441) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示