2008年10月1日星期三

ZJU/ZOJ 1636 Evaluate Matrix Sum 解题报告

题目大意是给出一个矩阵,求出矩阵中某些指定子矩阵的所有元素的平方和。

先利用递推预处理出所有以(1,1)为左上角的矩阵的所有元素的平方和。用f[i,j]表示左上角为(1,1),右下角为(i,j)的矩阵的所有元素的平方和,则f[i,j]=f[i-1,j]+sum[j];sum[j]表示第i行前j个元素的平方和。则所求子矩阵(r1,c1,r2,c2)的所有元素平方和即为f[r2,c2]-f[r1-1,c2]-f[r2,c1-1]+f[r1-1,c1-1]。

1653473    2008-10-01 23:50:40     Accepted    1636    FPC    140    1092    IwfWcf

4 条评论:

  1. 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

    回复删除

相关文章

 
Creative Commons License
除非另有声明,本网站采用知识共享署名-非商业性使用-相同方式共享 3.0 许可协议授权。