2008年7月25日星期五

ZJU/ZOJ 1738 Lagrange's Four-Square Theorem 解题报告

题目大意是求用4个自然数的平方和组成一个数的不重复方案有多少种。预处理一下0的情况即可很方便地进行递推了。

f[i,j]=∑{f[i-k^2,j-1]}(1<=k<=181,1<=j<=4),f[i,j]表示用j个自然数的平方和组成i的不重复方案数,边界条件是f[0,1]=1,f[0,2]=1,f[0,3]=1。为了保证不重复累加方案数,k的循环应是最外层循环。

3005109 2008-07-25 20:04:20 Accepted 1738 FPC 00:00.00 464K IwfWcf@LZOI

3 条评论:

  1. hermes birkin, http://www.hermesbirkin.org/
    chanel outlet, http://www.chaneloutletstore.us.com/
    nike free uk, http://www.nikefreerunning.org.uk/
    ray ban sunglasses, http://www.raybansunglass.com.au/
    rolex watches, http://www.rolexwatches.in.net/
    ray ban sunglasses, http://www.ray-bansunglasses.eu.com/
    yoga pants, http://www.yogapants.us.com/
    beats headphones, http://www.beats-headphones.in.net/
    michael kors outlet, http://www.michaelkorsusa.us/
    pandora jewelry, http://www.pandora.eu.com/
    cheap ugg boots, http://www.cheapuggboots.net.co/
    air jordan shoes, http://www.airjordanshoes.us.org/
    louis vuitton outlet, http://www.louisvuittonus.us.com/
    ed hardy clothing, http://www.edhardy.us.com/
    replica handbags, http://www.replicahandbag.us.com/
    the north face outlet store, http://www.thenorthfaceoutletstores.org/
    tiffany jewellery, http://www.tiffanyjewelleryoutlets.co.uk/
    lebron james shoes, http://www.lebronjamesshoes.in.net/
    gucci handbags, http://www.guccihandbags-outlet.co.uk/
    true religion outlet, http://www.truereligionoutletstore.us.com/
    swarovski jewelry, http://www.swarovski.in.net/
    michael kors outlet, http://michaelkors.outletonlinestores.us.com/
    swarovski outlet, http://www.swarovski-outlet.co.uk/
    wedding dresses, http://www.weddingdressesoutlet.co.uk/
    louis vuitton handbags, http://www.louisvuittonhandbagsoutlet.co.uk/
    lebron james shoes, http://www.lebronjames.us.com/
    nike trainers, http://www.niketrainers.me.uk/
    kobe shoes, http://www.kobeshoes.us/
    cheap snapbacks, http://www.cheapsnapbacks.us.com/
    1003maoqiuyun

    回复删除

相关文章

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