|
同样是n^3的做法,为什么差别这么大?
|
|
证明:
Sort the haybales by location. Consider two haybales i and j such that Bessie can start somewhere between those haybales and break through all the haybales from i+1 to j−1, but she can't break haybale i or haybale j. It must be the case then that no haybale between i and j is strictly taller than those two. That motivates the following O(NlogN)solution: Sort the haybales in decreasing order of size. Consider having an empty road, and place the haybales in that order. When placing a haybale, look immediately to its left and to its right and see if you can break through either one of those haybales if you were inside that interval. Mark that interval as "trapped" if so. This will be O(NlogN) as long as you check to make sure that the interval isn't already marked as trapped. 按重量从大到小排序,可以保证区间不会被漏掉 |
|
莫比乌斯反演的裸题。。
|
|
我竟然把sv设成0了。。。都可以去卖萌了QAQ
|
|
这个题竟然半颗星....
题目 1389 number-b
2016-04-05 14:54:17
|
|
最后一句话亮了...话说让他切题的那个人做我右面的右面的左面
页面 63 ZLXSCDay2&&USACO(本周日下午15:00-19:00)
2016-04-05 14:29:22
|
|
最后一句话亮了...话说让他切题的那个人做我右面的右面
页面 63 ZLXSCDay2&&USACO(本周日下午15:00-19:00)
2016-04-05 14:28:39
|
|
貌似如果数据是一个标准的矩形,就会被卡掉。。。。。 $\sum poet$
题目 2008 [USACO Dec08] 巨大的围栏
2016-04-05 14:18:24
|
|
%%%%%%
妈蛋银组题都那么丧(wu)病(liao)。。。 我是不是弱的没救了呢
页面 63 ZLXSCDay2&&USACO(本周日下午15:00-19:00)
2016-04-05 13:35:41
|
|
最后一句话亮了。。。。。。
![]()
页面 63 ZLXSCDay2&&USACO(本周日下午15:00-19:00)
2016-04-05 11:54:27
|
|
最后一句话亮了。。。。。。
![]()
页面 63 ZLXSCDay2&&USACO(本周日下午15:00-19:00)
2016-04-05 11:53:47
|
|
最后一句话亮了。。。。。。
![]()
页面 63 ZLXSCDay2&&USACO(本周日下午15:00-19:00)
2016-04-05 11:53:25
|
|
最后一句话亮了。。。。。。
![]()
页面 63 ZLXSCDay2&&USACO(本周日下午15:00-19:00)
2016-04-05 11:53:16
|
|
强占一楼
页面 63 ZLXSCDay2&&USACO(本周日下午15:00-19:00)
2016-04-05 11:04:44
|
|
题目 2208 [USACO US open15]回文路径(金组)
2016-04-05 07:56:00
|
|
二维前缀和+单调队列,暴力是O((NM))^2的枚举矩形左上角和右下角,但是我们可以利用矩形的特殊性质,单调队列滑一滑就可以了,有时间写题解
|
|
HHD...
题目 2206 Travel
2016-04-05 07:05:30
|
|
补发一个评论,dinic暴力过的,一颗赛艇
|
|
补发一个评论,dinic暴力过的,一颗赛艇
题目 14 [网络流24题] 搭配飞行员
2016-04-05 00:31:22
|
|
http://www.cnblogs.com/TenderRun/p/5279893.html 我的博客:Blog (若,勿喷)
|