codechef
文章平均质量分 74
Sdywolf
沃是一只蒟蒻
展开
-
CodeChef Protecting The Poison【贪心】
DescriptionThe kingdom of the snakes is an N**x**N grid. Their most-valued possession is a huge collection of poison, which is stored in the central K**x**K grid. It is guaranteed that both N and K are原创 2017-09-03 16:23:48 · 399 阅读 · 0 评论 -
【Codechef】【主席树维护DP】【SnackDown 2017 Online Elimination Round】PREFIXOR: 异或前缀
如果能处理出每个点往右最多扩展到rgt[i]rgt[i]rgt[i],那么答案就是 ∑i=lrmin{rgt[i],r}−i=∑i=lrrgt[i]−∑i=lri−∑i=l&rgt[i]>rrrgt[i]−r∑i=lrmin{rgt[i],r}−i=∑i=lrrgt[i]−∑i=lri−∑i=l&rgt[i]>rrrgt[i]−r\sum_{i=l}^{r}min\...原创 2018-08-24 10:30:33 · 646 阅读 · 0 评论