摘要:
N. Best Solution Unknown 题解 [ N. Best Solution Unknown ]( Problem - N - Codeforces ) 怎么也没想到竟然是线段树! 我是大笨蛋呜呜~ 参考大佬博客: N. Best Solution Unknown(线段树+思维)_2 阅读全文
摘要:
G. Shorten the Array题解 [ G. Shorten the Array ]( Problem - G - Codeforces ) 看了题解,感觉有点像是线段树中的动态开点或者主席树。 参考大佬博客: Codeforces Round 1016 (Div. 3) A-F(略讲)G 阅读全文
摘要:
[ E. Light Up the Grid ] ( Problem - E - Codeforces ) 题解待补…… 总之是把2*2网格看成二进制码,每种操作相当于异或操作,预处理16个操作的代价,把每种状态连边,然后跑反向边最短路。 剩下的之后再补~(想不起来就不补了 😛 代码 #inclu 阅读全文
摘要:
[ M. Obliviate, Then Reincarnate ]( Problem - M - Codeforces ) 读题读不懂怎么办qwq~ 题意分析 首先,我们要知道,房间编号是需要通过楼层确定的,即房间a编号变成 ((a mod n)+n) mod n,即将编号变成 [0,n] 中的正 阅读全文
摘要:
[ G. Unusual Entertainment ]( Problem - 1899G - Codeforces ) 题意描述 给一棵n个顶点,n-1条边的树,再给你一个长度为n的排列p,然后q次询问,每次询问对于排列p的区间$ [ l , r ] $中是否存在至少一个顶点是以x为根的子树的叶子 阅读全文