摘要: https://codeforces.com/contest/1899/problem/G 首先将将节点重新映射一下 然后就是个启发式合并板题 #include<cstdio> #include<algorithm> #include<cstring> #include<cmath> #includ 阅读全文
posted @ 2023-11-18 23:42 gan_coder 阅读(42) 评论(0) 推荐(0)
摘要: https://codeforces.com/contest/1864/problem/D 结论很好猜,直接从上到下做就行 我们可以维护差分数组,表示对下面的影响,逐行往下推就行,当然+和-要分开,因为一个是往前推,一个往后推。 时间复杂度\(O(n^2)\) #include<cstdio> #i 阅读全文
posted @ 2023-11-18 19:05 gan_coder 阅读(25) 评论(0) 推荐(0)