随笔分类 - 基础莫队
摘要:PS:没看出这个可以离线。。。官方题解 标程貌似不是常规莫队的写法,同一个块内,没有对 r 排序,优先处理每个块的答案。学习到了阶乘逆元的递推公式。 避免加法溢出 避免乘法溢出 避免减法取模溢出
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文