挺有意思的一题,题目给出的信息实际上可以得到一些进一步的信息,显然如果a-b有偶数个1则1-(a-1)与1-b的1的个数的奇偶性相同,而如果a-b有奇数个1则1-(a-1)与1-b的1的个数的奇偶性必定不同。
用same[i]表示与i奇偶性相同的集合,用dif[i]表示与i奇偶性不同的集合,则对于a-b有偶数个1的信息,合并same[a-1]与same[b]的集合以及合并dif[a-1]与dif[b]的集合。若合并后same[a-1]=dif[b]或same[b]=dif[a-1]则可判定该信息不可能被满足。类似的,对于a-b有奇数个1的信息,合并same[a-1]与dif[b]的集合以及合并same[b]与dif[a-1]的集合,若合并后same[a-1]=same[b]则可判定该信息不可能被满足。但我们可以发现,经过集合合并,以上判定信息可以用same[a-1]=dif[a-1]或same[b]=dif[b]中的任意一条表示。
由于本题的区间范围很大但询问数很小,需要用离散化或hash来对区间的起点和终点进行处理。
R1188765 Accepted 100 From IwfWcf- P1112 FPC Vivid Puppy 2009-3-27 0:27:09
toms outlet, http://www.tomsoutlet-stores.com/
回复删除nike roshe, http://www.nikerosherunshoes.co.uk/
prada handbags, http://www.pradahandbagsoutlet.co.uk/
soccer jerseys, http://www.cheapsoccerjersey.net/
michael kors outlet store, http://www.michaelkorsoutlet-store.us.com/
true religion jeans, http://www.truereligionjeansoutlets.us.com/
oakley sunglasses, http://www.oakleysunglasses-outlet.us.com/
nike free 5, http://www.nikefree5.us/
louis vuitton bags, http://www.louisvuittonbag.us.com/
chanel handbags, http://www.chanelhandbags-outlet.co.uk/
chanel handbags, http://www.chanelhandbags-outlet.us.com/
louis vuitton handbags, http://www.louisvuittonhandbag.us/
louis vuitton outlet, http://www.louisvuittonoutlet.in.net/
ghd hair straighteners, http://www.ghdhairstraightenerssale.co.uk/
nba jerseys, http://www.nbajerseys.us.com/
coach outlet, http://www.coachoutletstores.com.co/
true religion jeans, http://www.truereligionjeanscanada.com/
swarovski crystal, http://www.swarovskicrystals.co.uk/
mbt shoes, http://www.mbtshoesoutlet.us.com/
michael kors handbags, http://www.michaelkorshandbags.in.net/
chanel handbags, http://www.chanelhandbagsoutlet.in.net/
michael kors outlet online, http://www.michaelkorsoutletonline.in.net/
polo ralph lauren, http://www.poloralphlauren.us.org/
the north face clearance, http://www.thenorthfaceclearances.us.com/
jordan shoes, http://www.jordan-shoes.us.com/
beats by dr dre, http://www.beatsbydrdre-headphones.us.com/
the north face uk, http://www.thenorthfaces.org.uk/
1003maoqiuyun
coach factory outlet
回复删除mbt shoes women
moncler outlet uk
michael kors outlet online
gucci outlet
steelers jerseys
cheap ugg boots
coach outlet online
cheap ray bans
true religion jeans
201612.26chenjinyan
cheap jordan shoes
回复删除ugg boots
ralph lauren outlet
michael kors outlet
nike free run
nhl jerseys
coach outlet
ugg outlet
mont blanc outlet
ugg boots
bengals jersey
回复删除boston celtics jersey
eagles jerseys
nike outlet
canada goose jackets
giuseppe zanotti outlet
ferragamo outlet
回复删除discount oakley sunglasses
coach outlet online
cheap ray ban sunglasses
snapbacks wholesale
polo ralph lauren
fitflops sale
prada shoes
cheap jordans
回复删除golden goose sneakers
yeezy
lebron 15 shoes
air max 270
jordan shoes
jordan 11
yeezy shoes
nike sneakers
michael jordan shoes
have a peek at this website web link over at this website click here to find out more view pop over to this site
回复删除s2o74f0f02 q2e88j1d85 l0w36r7d70 v0t49u2n30 k6f27l2o00 a7t52e5z12
回复删除