- 博客(9)
- 收藏
- 关注
原创 [USACO07OPEN] City Horizon
题目描述Farmer John has taken his cows on a trip to the city! As the sun sets, the cows gaze at the city horizon and observe the beautiful silhouettes formed by the rectangular buildings.The entire hori...
2020-01-31 11:41:31 345
原创 [HNOI2001] 矩阵乘积
一道上古时代的题这道题看上去很简单,一个矩阵乘法的板子题但是数据范围N≤6000N\leq6000N≤6000,那么时间复杂度O(N3)O(N^3)O(N3),空间复杂度O(N2)O(N^2)O(N2)都炸了,所以我们要进一步考虑我们发现他只询问一个位置的数所以我们就可以只存答案那一行,而且,答案只和那一行(或者那一列有关)切了!said gjm(sto gjm)别急,这道题读...
2020-01-30 17:30:46 287
原创 [USACO13DEC] 最优挤奶Optimal Milking
题目描述Farmer John has recently purchased a new barn containing N milking machines (1 <= N <= 40,000), conveniently numbered 1…N and arranged in a row.Milking machine i is capable of extracting M...
2020-01-29 16:16:33 548
原创 P2184 贪婪大陆
这道题看上去就是一道线段树(树状数组)的题,但是我们似乎不能直接去做,所以我们想到我们可以把这个情况转化一下正着不好做,我们想到差分我们开两棵线段树,一棵表示开始的点,一棵表示结束的点,对于每一个加入的点,我们把他的lll加入到起点线段树的lll位置,表示在这个点开始有一个新的颜色,rrr加入到终点线段树的r+1r+1r+1的位置,表示在这个点开始少了一种颜色,那么答案也显而易见了,就是:...
2020-01-28 19:45:55 179
原创 平衡树·splay
文章目录1.About splay2.基本操作2.1 数组是干啥的?2.2 基本操作1.About splaysplaysplaysplay是实现平衡树的一种方法他需要满足一个条件,就是对于一个点为根节点的子树,他的左子树全部小于根节点,右子树全部大于根节点那他为什么叫这个名字呢?我们查询一下百度翻译但是事实上,感觉splaysplaysplay跟张开没什么关系…splayspla...
2020-01-27 19:30:16 3092 4
原创 [USACO18JAN] Lifeguards S
题目描述FJ为他的奶牛们建造了一个游泳池,FJ认为这将有助于他们放松身心以及生产更多牛奶。为了确保奶牛们的安全,FJ雇佣了N头牛,作为泳池的救生员,每一个救生员在一天内都会有一定的事情,并且这些事情都会覆盖一天内的一段时间。为了简单起见,泳池从时间t=0时开门,直到时间t=1000000000关门,所以每个事情都可以用两个整数来描述,给出奶牛救生员开始以及结束事情的时间。例如,一个救生员在时间...
2020-01-26 18:44:09 939
原创 [CF35E] Parade
No Great Victory anniversary in Berland has ever passed without the war parade. This year is not an exception. That’s why the preparations are on in full strength. Tanks are building a line, artillery...
2020-01-25 15:26:16 244
原创 [CF19D] Points
Pete and Bob invented a new interesting game. Bob takes a sheet of paper and locates a Cartesian coordinate system on it as follows: point (0, 0) is located in the bottom-left corner, Ox axis is direc...
2020-01-24 13:25:05 489
原创 [POJ2828]Buy Tickets
Railway tickets were difficult to buy around the Lunar New Year in China, so we must get up early and join a long queue…The Lunar New Year was approaching, but unluckily the Little Cat still had sche...
2020-01-23 18:09:19 274
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人