分块
- Passerby ゛
这个作者很懒,什么都没留下…
展开
-
B - Time to Raid Cowavans CodeForces - 103D(分块+离线)
As you know, the most intelligent beings on the Earth are, of course, cows. This conclusion was reached long ago by the Martian aliens, as well as a number of other intelligent civilizations from oute...原创 2018-11-23 16:52:07 · 505 阅读 · 0 评论 -
A - 楼房重建 HYSBZ - 2957
A - 楼房重建 HYSBZ - 2957 小A的楼房外有一大片施工工地,工地上有N栋待建的楼房。每天,这片工地上的房子拆了又建、建了又拆。他经常无聊地看着窗外发呆,数自己能够看到多少栋房子。 为了简化问题,我们考虑这些事件发生在一个二维平面上。小A在平面上(0,0)点的位置,第i栋楼房可以用一条连接(i,0)和(i,Hi)的线段表示,其中Hi为第i栋楼房的高度。如果这栋楼房上任何一个高度大...原创 2018-11-23 15:14:51 · 196 阅读 · 0 评论 -
分块
题目链接 https://loj.ac/problems/search?keyword=分块 参考博客:http://hzwer.com/8053.html 1.区间加法,单点查值 完整的块打个tag标记,非完整直接暴力修改 #include<bits/stdc++.h> #define fi first #define se second using namespace std; ...原创 2019-08-01 23:35:56 · 101 阅读 · 0 评论