题目大意是求一段序列中子序列之和除m余0的子序列数量。
用sum[i]表示∑a[i],题目所求即所有(sum[i]-sum[j]) mod m=0的组合数量(包括sum[0])。(sum[i]-sum[j]) mod m=0即sum[i]与sum[j]除m的余数相同,所以可以记录sum[i]除m的每种余数的数量。用f[j]表示sum[i]除m余j的数量,则ans=∑f[j]*(f[j]-1)/2。
1653449 2008-10-01 23:23:58 Accepted 1569 FPC 10 120 IwfWcf
roshe run, http://www.rosherunshoessale.com/
回复删除tory burch outlet, http://www.toryburchoutletonline.in.net/
ralph lauren uk, http://www.ralphlauren-outletonline.co.uk/
michael kors outlet, http://www.michaelkorsoutlet.org.uk/
ralph lauren outlet, http://www.ralphlaurenoutlet.in.net/
asics, http://www.asicsisrael.com/
nike free, http://www.nikefreerunning.org/
coach handbags, http://www.coachhandbagsoutletonline.us.com/
christian louboutin uk, http://www.christianlouboutinoutlet.org.uk/
replica watches, http://www.replicawatchesforsale.us.com/
hogan, http://www.scarpehogan-outlet.it/
stuart weitzman boots, http://www.stuartweitzmanoutlet.us/
basketball shoes, http://www.basketballshoes.us.com/
ray ban sunglasses, http://www.raybansunglass.us.com/
nike huarache, http://www.nikeairhuarache.org.uk/
prada outlet, http://www.pradaoutlet.us/
michael kors handbags, http://www.michaelkorshandbag.co.uk/
air jordan 13, http://www.airjordan13s.com/
air max 90, http://www.airmax90.us.com/
mulberry outlet, http://www.mulberryoutlet.com.co/
hollister, http://www.hollistercanada.com/
toms shoes, http://www.toms.us.com/
louis vuitton outlet, http://www.louisvuittonoutletstore.name/
true religion jeans, http://www.truereligionjean.in.net/
ugg boots, http://www.uggboot.com.co/
michael kors outlet, http://michaelkors.outletonlinestores.us.com/
nike air max uk, http://www.nikeairmaxshoes.org.uk/
air jordan 11, http://www.airjordan11.net/
1003maoqiuyun
zhengjx20160520
回复删除retro jordans 13
jordan 3 powder blue
designer handbags
nike trainers sale
hollister clearance
nike store outlet
coach outlet
cheap jordans
christian louboutin sale
michael kors outlet
kobe 8
michael kors bags
oakley outlet
michael kors handbags
oakley outlet
louis vuitton handbags
retro 11
michael kors outlet
cheap oakley sunglasses
louis vuitton outlet
kd 7 shoes
ray bans
tiffany and co
nfl jerseys
michael kors outlet
jordan retro 8
coach factory outlet online
toms wedges
ray ban sunglasses
michael kors
copy watches
louis vuitton bags
coach outlet store online clearances
cheap ray ban sunglasses
fitflop clearance
michael kors outlet
north face jackets
cheap oakleys
burberry outlet online
michael kors purses
sac longchamp
回复删除cheap jordan shoes
ugg boots
michael kors outlet
gucci shoes
ugg boots
true religion outlet store
ugg boots
fitflops
ugg outlet