注意题目中存在一个很重要的条件,区间是互不包含的,所以不需要用树套树,只需要对区间按左端点排序后,按顺序进行插入和删除操作即可维护平衡树使其只包含所求区间的元素。我使用SBT作为本题的数据结构,求第k小元素是其基本功能。由于插入和删除最多进行n次,所以时间复杂度是O(nlogn)。注意输出要按题目所给定的区间顺序输出,而且排序后的区间顺序。
这里说一下这题比较恶心的地方,仅仅按照提示使用write输出还是不够的,要每输出1000个答案就进行一次换行,否则最后4个点会"提示运行超时|格式错误"或"运行超时|无输出"……
R1184294 Accepted 100 From IwfWcf- P1081 FPC Vivid Puppy 2009-3-22 21:21:13
请把sbt的代码发给我 谢谢
回复删除dzs9203@163.com
非常感谢 这么快就发了过来
回复删除写的很漂亮
abercrombie and fitch, http://www.abercrombie-fitch.us.com/
回复删除cheap jordans, http://www.cheapjordanshoes.in.net/
cheap wedding dresses, http://www.cheap-weddingdresses.net/
oakley sunglasses, http://www.oakleysunglassescanada.com/
nike mercurial, http://www.nikemercurial.org/
michael kors outlet, http://www.michaelkorsoutletonlinstore.us.com/
ray ban sunglasses, http://www.raybansunglassesonline.us.com/
prada shoes, http://www.pradashoes.us/
moncler coats, http://www.moncler.us.com/
oakley sunglasses, http://www.wholesaleoakleysunglasses.us.com/
lacoste polo shirts, http://www.lacostepoloshirts.cc/
cheap oakley sunglasses, http://www.cheapoakleysunglassess.us.com/
adidas outlet store, http://www.adidasoutletstore.us.com/
north face outlet, http://www.thenorthface.me/
gucci, http://www.borseguccioutlet.it/
ugg outlet, http://www.uggsoutlet.us.org/
mulberry outlet, http://mulberryoutlet.outlet-store.co.uk/
ray ban sunglasses, http://www.rayban-sunglassess.us.com/
canada goose outlet, http://www.canadagoose.us.org/
futbol baratas, http://www.futbol-baratas.com/
kobe bryant shoes, http://www.kobebryantshoes.in.net/
cheap mlb jerseys, http://www.cheapmlbjerseys.net/
timberland boots, http://www.timberlandboots.name/
cheap nfl jerseys, http://www.cheapnfljerseys.org/
longchamp handbags, http://www.longchamphandbag.us.com/
michael kors outlet, http://www.michaelkorsoutletcanada.in.net/
montblanc pens, http://www.montblanc-pens.com.co/
coach outlet store, http://www.coach-outlet-store.us.com/
1003maoqiuyun
browse around here replica designer bags useful reference best replica bags navigate to this website Louis Vuitton replica Bags
回复删除