我的眼睛看世界

2012年01月11日

按说是个挺简单的题目,怎么就是想不起来该怎么做了

Filed under: 广告 — gcd0318 @ 01:54

n个小球放进m个口袋(其中m<n),可以有空口袋,有多少种放法
现在只会编程动态规划解,就是不记得排列组合的基本方法——就像学了方程不会列式子解应用题一样

136条评论 »

  1. 能告诉我动态规划怎么做吗, 谢谢!

    评论 由 匿名 — 2012年01月11日 @ 13:06

    • def p2(n, m, d):
      if(n < m):
      return p2(n, n, d)
      if not(n in list(d.keys())):
      d[n] = [0, 1]
      td={1:1, n:1, n-1:1}
      for i in range(2, n-1):
      td[i] = p2(n-i, i, d)
      for k in range(2, len(td)+1):
      d[n].append(td[k] + d[n][k-1])
      return d[n][m]

      评论 由 gcd0318 — 2012年01月11日 @ 17:46

      • k,空格都没了,乱

        评论 由 gcd0318 — 2012年01月11日 @ 17:47

      • 第一层两个if,两个for都是第二个if下的,并列关系
        希望有助于理解

        评论 由 gcd0318 — 2012年01月11日 @ 17:48

  2. I simply want to tell you that I’m new to weblog and seriously enjoyed you’re web site. Almost certainly I’m planning to bookmark your blog . You amazingly have terrific articles and reviews. With thanks for sharing with us your website page.

    评论 由 Matthew C. Kriner — 2012年01月14日 @ 07:28

  3. Remarkable! Its truly remarkable post, I have got much clear idea about from this post.

    评论 由 India Oropesa — 2012年04月14日 @ 23:59

  4. Personally I’m impressed by the quality of this. Generally when I come across these sort of things I like to post them on Digg. I don’t think this would be the best to submit though. I’ll look around and find another article that may work.

    评论 由 Adalberto Klopfer — 2012年06月15日 @ 09:42

  5. Hi. I have just tried this and all I’m getting is an indexed/directory list of files on my internet site. Can anyone help ? Many thanks

    评论 由 Antone Aird — 2012年08月22日 @ 10:42

  6. They can obtain a bit as well much

    评论 由 Inger Matchen — 2012年08月22日 @ 11:39

  7. cool graffiti fonts.

    评论 由 Mickey Blunden — 2012年08月22日 @ 11:43

  8. I have to say that for your past few of hours we have been hooked by the awesome posts on this website. Keep up the wonderful do the job.

    评论 由 Bruce Amedro — 2012年08月22日 @ 12:18

  9. Is it iWork or iLife, Wayne?

    评论 由 Lean Glotzbach — 2012年08月22日 @ 13:20

  10. There’s a free app that could enable zoom for my sidekick 4g? Already tried Vignette, but should purchase to consider photos bigger than .3MP

    评论 由 Xiomara Crogan — 2012年08月22日 @ 14:31

  11. C9cCPS This is one awesome blog article. Much obliged.

    评论 由 cheap seo services — 2012年10月26日 @ 18:11

  12. Appreciate you sharing, great article.Much thanks again.

    评论 由 goji — 2012年10月30日 @ 20:44

  13. This is one awesome article.Thanks Again. Will read on…

    评论 由 gagner de l'argent — 2012年10月31日 @ 00:31

  14. Major thankies for the blog article. Awesome.

    评论 由 prom dresses — 2012年10月31日 @ 03:58

  15. I value the article.Much thanks again. Awesome.

    评论 由 cheap bridal gowns — 2012年10月31日 @ 07:24

  16. I really enjoy the article.Really looking forward to read more. Will read on…

    评论 由 laptop repairs in manchester — 2012年10月31日 @ 08:32

  17. I truly appreciate this post.Thanks Again. Cool.

    评论 由 joggesko norge — 2012年10月31日 @ 09:40

  18. Really enjoyed this blog article.Much thanks again.

    评论 由 articles — 2012年10月31日 @ 10:48

  19. Im grateful for the blog post.Really thank you! Keep writing.

    评论 由 Robbie's Aquaponics Fish System — 2012年10月31日 @ 14:14

  20. I truly appreciate this post.Really looking forward to read more. Cool.

    评论 由 chauffeur service — 2012年10月31日 @ 15:24

  21. I loved your blog post.Really looking forward to read more. Really Cool.

    评论 由 kids resale holladay — 2012年10月31日 @ 16:31

  22. I cannot thank you enough for the post.Really thank you! Will read on…

    评论 由 service heating and air — 2012年10月31日 @ 17:38

  23. This is one awesome article post.Really thank you! Great.

    评论 由 casino bonus — 2012年10月31日 @ 18:49

  24. Very neat blog post.Thanks Again. Want more.

    评论 由 bingo slots — 2012年10月31日 @ 20:00

  25. Enjoyed every bit of your blog post.Much thanks again. Cool.

    评论 由 government mortgage help — 2012年10月31日 @ 21:09

  26. A big thank you for your blog post. Much obliged.

    评论 由 indoor growing tips — 2012年10月31日 @ 22:20

  27. Thanks a lot for the article post.Thanks Again. Cool.

    评论 由 magazine — 2012年10月31日 @ 22:39

  28. A big thank you for your article.Much thanks again. Really Cool.

    评论 由 aweber tutorial — 2012年11月1日 @ 02:01

  29. Wow, great blog article.Really looking forward to read more. Will read on…

    评论 由 tvc mca — 2012年11月1日 @ 02:12

  30. Thanks so much for the article.Thanks Again. Will read on…

    评论 由 travel agent to the stars — 2012年11月1日 @ 03:22

  31. Awesome blog article.Thanks Again.

    评论 由 Kids Face Painting Melbourne — 2012年11月1日 @ 04:23

  32. Looking forward to reading more. Great article post.Really looking forward to read more.

    评论 由 flat top paramotors — 2012年11月1日 @ 09:26

  33. Thanks so much for the blog article. Cool.

    评论 由 flat top paramotors — 2012年11月1日 @ 10:39

  34. Thank you ever so for you blog.Really looking forward to read more. Will read on…

    评论 由 carpet cleaners in Pottstown — 2012年11月1日 @ 12:51

  35. Really enjoyed this blog.Really thank you!

    评论 由 flat top paramotors — 2012年11月1日 @ 13:06

  36. Hey, thanks for the post.Much thanks again. Really Great.

    评论 由 locksmith in nyc — 2012年11月1日 @ 15:17

  37. Great, thanks for sharing this article. Really Great.

    评论 由 fro knows photo honest review take professional photos — 2012年11月1日 @ 16:31

  38. Very neat article post.Much thanks again.

    评论 由 relatos eroticos — 2012年11月1日 @ 21:41

  39. Very informative article post.Thanks Again. Much obliged.

    评论 由 Zermatt — 2012年11月2日 @ 04:12

  40. Im thankful for the article.Much thanks again. Really Cool.

    评论 由 College Counseling — 2012年11月2日 @ 05:34

  41. Really enjoyed this post.Really thank you! Cool.

    评论 由 Business Networking — 2012年11月2日 @ 23:29

  42. Wow, great post.Thanks Again. Cool.

    评论 由 Chicago Cheap auto insurance — 2012年11月3日 @ 00:28

  43. Say, you got a nice article post.Really looking forward to read more. Great.

    评论 由 nike shox sko — 2012年11月3日 @ 01:02

  44. Appreciate you sharing, great blog post. Keep writing.

    评论 由 of — 2012年11月3日 @ 01:03

  45. This is one awesome article.Thanks Again. Great.

    评论 由 24hr dural — 2012年11月3日 @ 03:08

  46. Muchos Gracias for your blog article.Really looking forward to read more. Awesome.

    评论 由 Hardwood flooring charlotte nc — 2012年11月3日 @ 04:29

  47. Great post.Thanks Again. Awesome.

    评论 由 Deborah Dolen — 2012年11月3日 @ 05:55

  48. Really informative article post.Thanks Again. Want more.

    评论 由 Book a holiday — 2012年11月3日 @ 07:38

  49. Thanks so much for the article.Much thanks again. Awesome.

    评论 由 Healing Waters Spa & Cosmetic Clinic — 2012年11月3日 @ 07:44

  50. Muchos Gracias for your blog post.Really looking forward to read more. Really Cool.

    评论 由 Nike Høyhælte Sko — 2012年11月3日 @ 08:33

  51. I cannot thank you enough for the post.Really looking forward to read more.

    评论 由 Devon — 2012年11月3日 @ 09:29

  52. Thank you for your post. Keep writing.

    评论 由 Nike Air Max TN — 2012年11月3日 @ 09:55

  53. Major thankies for the blog.Really thank you! Great.

    评论 由 Longchamp Bags — 2012年11月3日 @ 11:16

  54. A round of applause for your blog post.Thanks Again. Great.

    评论 由 Nike Shox — 2012年11月3日 @ 14:01

  55. Thank you for your blog post.Really looking forward to read more. Really Great.

    评论 由 Dog Show Judges — 2012年11月3日 @ 18:18

  56. Thank you for your blog post.Much thanks again. Much obliged.

    评论 由 condos in florida — 2012年11月4日 @ 18:36

  57. I really like and appreciate your blog article. Cool.

    评论 由 Truth About Abs Review — 2012年11月4日 @ 20:00

  58. I really enjoy the blog article.Really looking forward to read more. Really Cool.

    评论 由 weight loss pills that work — 2012年11月5日 @ 16:34

  59. Awesome post.

    评论 由 Music in Nashville — 2012年11月5日 @ 16:52

  60. Major thankies for the blog post.Thanks Again. Will read on…

    评论 由 kitchen remodeling sacramento — 2012年11月5日 @ 18:19

  61. I really liked your article.Really looking forward to read more. Want more.

    评论 由 UK barter website 2012 — 2012年11月5日 @ 19:43

  62. Major thankies for the article. Really Great.

    评论 由 FIFA Manager 13 Keygen — 2012年11月5日 @ 22:23

  63. Very neat post.Thanks Again. Keep writing.

    评论 由 interface — 2012年11月6日 @ 00:20

  64. Awesome blog post.Really looking forward to read more. Keep writing.

    评论 由 Daidaihua — 2012年11月6日 @ 00:37

  65. Enjoyed every bit of your blog.Really thank you!

    评论 由 tava tea — 2012年11月6日 @ 04:17

  66. Enjoyed every bit of your post. Fantastic.

    评论 由 Magic Slim Pills — 2012年11月6日 @ 04:27

  67. I appreciate you sharing this blog article.Really thank you!

    评论 由 Zhen De Shou Capsule — 2012年11月6日 @ 09:08

  68. Major thankies for the blog.Thanks Again. Fantastic.

    评论 由 How to Play Piano — 2012年11月6日 @ 10:29

  69. Fantastic post.Really thank you!

    评论 由 louis vuitton replica handbags — 2012年11月6日 @ 13:12

  70. Vacation Travel Quotes #2…

    When faced with a challenge, look for a way, not a way out. David L. Weatherford…

    Trackback 由 National Specialty Dog Show — 2012年11月6日 @ 15:13

  71. Awesome article.Really thank you! Keep writing.

    评论 由 wordpress amazon store theme — 2012年11月6日 @ 17:09

  72. A big thank you for your article post.Much thanks again. Will read on…

    评论 由 assurance e-reputation — 2012年11月6日 @ 19:51

  73. I really liked your blog.Much thanks again. Really Cool.

    评论 由 How to pay off a mortgage faster — 2012年11月6日 @ 21:59

  74. Wow, great article post.Really thank you! Awesome.

    评论 由 visita mi website — 2012年11月6日 @ 22:57

  75. I value the article post.Thanks Again. Will read on…

    评论 由 breast implants — 2012年11月6日 @ 23:24

  76. A round of applause for your article post.Really thank you! Great.

    评论 由 wire cloth — 2012年11月6日 @ 23:58

  77. Very informative blog article.Really thank you! Really Cool.

    评论 由 hospital gift shops — 2012年11月7日 @ 00:21

  78. Looking forward to reading more. Great article.Thanks Again. Will read on…

    评论 由 Augustus Shivers — 2012年11月7日 @ 01:46

  79. Muchos Gracias for your article post.Really thank you! Keep writing.

    评论 由 parfumuri originale — 2012年11月7日 @ 02:13

  80. Thank you ever so for you post.Really looking forward to read more. Really Great.

    评论 由 personal financial — 2012年11月7日 @ 09:38

  81. Thank you ever so for you article.Much thanks again. Cool.

    评论 由 twitter followers for sale — 2012年11月7日 @ 16:08

  82. Thank you ever so for you article.Really thank you! Will read on…

    评论 由 how do I invest in real estate — 2012年11月7日 @ 19:18

  83. Thanks again for the article post.Much thanks again. Really Great.

    评论 由 chlorella — 2012年11月7日 @ 22:35

  84. A round of applause for your article post.Really thank you! Really Cool.

    评论 由 hot girl games — 2012年11月8日 @ 01:32

  85. Thanks for the posting. I have often seen that most people are wanting to lose weight when they wish to appear slim and also attractive. However, they do not continually realize that there are other benefits so that you can losing weight additionally. Doctors say that over weight people suffer from a variety of illnesses that can be perfectely attributed to their excess weight. Thankfully that people who sadly are overweight along with suffering from numerous diseases are able to reduce the severity of their illnesses by simply losing weight. You possibly can see a gradual but identifiable improvement in health when even a moderate amount of losing weight is achieved.– vacation travel puppies

    评论 由 Chance Mayoras — 2012年11月8日 @ 02:20

  86. Im thankful for the article. Fantastic.

    评论 由 www.firewoodlogsmanchester.com/prices/ — 2012年11月8日 @ 03:00

  87. I really liked your post.Thanks Again.

    评论 由 gothic shoes — 2012年11月8日 @ 05:08

  88. Major thanks for the post.Really looking forward to read more. Cool.

    评论 由 handtas — 2012年11月8日 @ 07:31

  89. I really enjoy the blog post. Keep writing.

    评论 由 artists — 2012年11月8日 @ 09:05

  90. I value the blog article.Much thanks again.

    评论 由 fat loss factor results — 2012年11月8日 @ 10:38

  91. Appreciate you sharing, great article post.Thanks Again. Fantastic.

    评论 由 thing big — 2012年11月8日 @ 12:54

  92. Really appreciate you sharing this post.Thanks Again. Really Great.

    评论 由 Order here — 2012年11月8日 @ 13:40

  93. This is one awesome blog post.Much thanks again. Much obliged.

    评论 由 Rob's Most Popular Electronic Cigarette — 2012年11月8日 @ 16:42

  94. Thanks again for the article. Awesome.

    评论 由 What is google sniper — 2012年11月8日 @ 19:40

  95. Great, thanks for sharing this article post.Really looking forward to read more. Much obliged.

    评论 由 www.squidoo.com/the-tao-of-badass-download — 2012年11月8日 @ 19:50

  96. Wow, great blog article.Thanks Again. Really Cool.

    评论 由 http://thetaoofbadasspdfreview.blogspot.com/ — 2012年11月8日 @ 21:25

  97. ZQAx6K I cannot thank you enough for the article post.Really thank you! Really Great.

    评论 由 crork — 2012年11月9日 @ 05:09

  98. Thanks for the auspicious writeup. It if truth be told was once a leisure account it. Glance complex to more added agreeable from you! However, how can we be in contact?– vacation travel puppies

    评论 由 Mauro Foussell — 2012年11月13日 @ 02:56

  99. I tried using numerous tools but the one I bought from http://iphoneunlockgroup.com/ worked for me. Consider it for on your own. It’s just 29 dollars.

    评论 由 fotokalender — 2012年11月13日 @ 10:10

  100. I’m commenting to let you understand what a fantastic experience our child obtained studying the blog. She discovered plenty of issues, with the inclusion of how it is like to possess a great helping heart to make the rest without hassle know just exactly a variety of complex matters. You truly surpassed my desires. Thank you for producing the warm and friendly, dependable, edifying as well as cool guidance on your topic to Lizeth.– vacation travel puppies

    评论 由 Emmett Ducasse — 2012年11月14日 @ 20:26

  101. May I just say what a relief to discover somebody that truly understands what they are talking about on the net. You actually realize how to bring a problem to light and make it important. A lot more people have to check this out and understand this side of your story. It’s surprising you aren’t more popular given that you definitely have the gift.

    评论 由 Aldo Lawery — 2012年11月21日 @ 14:32

  102. You got a very superb website, Sword lily I observed it through yahoo.

    评论 由 Paul Ranson — 2012年11月22日 @ 14:27

  103. obviously like your web site but you have to check the spelling on several of your posts. Many of them are rife with spelling problems and I in finding it very bothersome to tell the truth then again I’ll definitely come back again.

    评论 由 Wonda Dedios — 2012年11月22日 @ 23:47

  104. thanks to the author used for captivating his clock schedule by this one.

    评论 由 shot peening equipment — 2012年11月23日 @ 00:43

  105. Do you have a spam problem on this website; I also am a blogger, and I was curious about your situation; we have developed some nice procedures and we are looking to swap solutions with others, why not shoot me an email if interested.

    评论 由 liposuction costs — 2012年11月23日 @ 07:52

  106. These reserve accounts are set aside for the payments, because you will submit a business may not be as intensive as other creditors may run. For starters, always acquire home equity options, consider the following equity scams, and learn how you can get the money right away. Do not confuse a “guarantor” with a multitude of modification requests and the guarantor is able to pay back with your lender with a guarantor makes qualifying easier. This can be great when the debt to settle with the bank.

    评论 由 loans — 2012年11月23日 @ 10:24

  107. I’m really enjoying the theme/design of your blog. Do you ever run into any web browser compatibility problems? A couple of my blog readers have complained about my blog not operating correctly in Explorer but looks great in Firefox. Do you have any recommendations to help fix this issue?|I am curious to find out what blog system you happen to be using? I’m having some small security issues with my latest blog and I would like to find something more safeguarded. Do you have any recommendations?

    评论 由 Maximina Kaeser — 2012年11月23日 @ 13:14

  108. would love to incessantly get updated outstanding website ! .

    评论 由 Xavier Hatzenbuhler — 2012年11月23日 @ 18:18

  109. hi!,I like your writing so so much! share we communicate extra about your article on AOL? I need a specialist in this area to resolve my problem. May be that’s you! Looking ahead to peer you.

    评论 由 Rachal Baese — 2012年11月23日 @ 19:05

  110. Good day I am so excited I found your website, I really found you by accident, while I was looking on Askjeeve for something else, Nonetheless I am here now and would just like to say many thanks for a marvelous post and a all round thrilling blog (I also love the theme/design), I don’t have time to read it all at the moment but I have book-marked it and also added in your RSS feeds, so when I have time I will be back to read more, Please do keep up the superb job.

    评论 由 supplement insurance — 2012年11月25日 @ 02:28

  111. Hello just wanted to give you a quick heads up. The text in your article seem to be running off the screen in Internet explorer. I’m not sure if this is a format issue or something to do with internet browser compatibility but I thought I’d post to let you know. The layout look great though! Hope you get the problem fixed soon. Kudos

    评论 由 what is a dedicated server — 2012年11月25日 @ 23:07

  112. Hi there! Someone in my Facebook group shared this site with us so I came to take a look. I’m definitely loving the information. I’m bookmarking and will be tweeting this to my followers! Excellent blog and superb style and design.

    评论 由 More Info Here — 2012年11月26日 @ 08:46

  113. Hi there just wanted to give you a quick heads up. The text in your article seem to be running off the screen in Internet explorer. I’m not sure if this is a formatting issue or something to do with internet browser compatibility but I figured I’d post to let you know. The layout look great though! Hope you get the problem resolved soon. Kudos

    评论 由 see here — 2012年11月27日 @ 17:07

  114. Hi there, i read your blog occasionally and i own a similar one and i was just wondering if you get a lot of spam comments? If so how do you reduce it, any plugin or anything you can recommend? I get so much lately it’s driving me crazy so any help is very much appreciated.

    评论 由 skyrim easy leveling — 2012年11月27日 @ 19:00

  115. I love looking at and I conceive this website got some genuinely useful stuff on it! .

    评论 由 phone no — 2012年11月27日 @ 21:24

  116. I’ve come across that now, more and more people are being attracted to digital cameras and the issue of images. However, as a photographer, you will need to first spend so much time period deciding the exact model of digital camera to buy as well as moving via store to store just so you may buy the lowest priced camera of the trademark you have decided to decide on. But it doesn’t end generally there. You also have take into consideration whether you should purchase a digital dslr camera extended warranty. Many thanks for the good recommendations I acquired from your site.

    评论 由 people search — 2012年11月28日 @ 07:31

  117. Greetings! I’ve been reading your weblog for a long time now and finally got the courage to go ahead and give you a shout out from Austin Tx! Just wanted to say keep up the great job!

    评论 由 useful source — 2012年11月28日 @ 10:12

  118. I completely agree with your ideas on this subject above. Excellent Post, keep up the fantastic job.

    评论 由 blog url — 2012年11月28日 @ 13:39

  119. Hello! I’ve been reading your site for a while now and finally got the bravery to go ahead and give you a shout out from Humble Texas! Just wanted to say keep up the fantastic work!

    评论 由 best life insurance — 2012年11月28日 @ 16:46

  120. Yet another thing is that while looking for a good on the internet electronics store, look for online stores that are consistently updated, always keeping up-to-date with the most recent products, the most beneficial deals, along with helpful information on services. This will ensure that you are getting through a shop which stays ahead of the competition and provides you what you ought to make educated, well-informed electronics expenditures. Thanks for the significant tips I have really learned through the blog.

    评论 由 criar blog — 2012年11月28日 @ 18:51

  121. Who definitely not only have been that can report this even more had puzzled really a long time ought to are aware of it for instance useKoi

    评论 由 Anderson Delguidice — 2012年11月28日 @ 19:54

  122. The other day, while I was at work, my sister stole my iPad and tested to see if it can survive a forty foot drop, just so she can be a youtube sensation. My apple ipad is now destroyed and she has 83 views. I know this is entirely off topic but I had to share it with someone!

    评论 由 Discover More — 2012年11月28日 @ 22:45

  123. hddflp Thank you for your blog. Much obliged.

    评论 由 Seo Service — 2012年11月28日 @ 23:47

  124. Howdy! This post could not be written any better! Reading this post reminds me of my good old room mate! He always kept chatting about this. I will forward this write-up to him. Pretty sure he will have a good read. Thank you for sharing!

    评论 由 buy term life insurance — 2012年11月29日 @ 00:33

  125. Greetings! This is my first comment here so I just wanted to give a quick shout out and tell you I genuinely enjoy reading your articles. Can you recommend any other blogs/websites/forums that cover the same subjects? Many thanks!

    评论 由 je eigen website maken voor kinderen — 2012年11月29日 @ 02:06

  126. In this grand pattern of things you actually receive an A+ for effort. Where you actually lost me personally was on all the particulars. You know, it is said, details make or break the argument.. And that couldn’t be much more accurate in this article. Having said that, allow me tell you precisely what did do the job. Your writing is highly powerful which is most likely why I am making an effort in order to opine. I do not really make it a regular habit of doing that. Second, although I can easily notice a jumps in reason you make, I am not necessarily certain of just how you appear to connect the ideas that help to make the conclusion. For the moment I shall yield to your position but wish in the near future you actually link your dots much better.

    评论 由 zander life insurance — 2012年11月29日 @ 22:34

  127. Excellent post however , I was wondering if you could write a litte more on this subject? I’d be very thankful if you could elaborate a little bit more. Bless you!

    评论 由 good — 2012年11月30日 @ 11:02

  128. It’s funny that you would write this as I have been in the progress of looking for information on this topic. Thanks for the data on the topic.

    评论 由 check it out — 2012年12月3日 @ 09:49

  129. A thing that completely bothered me was that even with the internet, most people still do not tend to write about the subject in this quality.

    评论 由 Discover More Here — 2012年12月5日 @ 09:38

  130. Stunning story there. What occurred after? Thanks!

    评论 由 lv handbag — 2012年12月5日 @ 16:15

  131. One word “informative”, you stepped down exactly what I have been looking for. Looking forward to reading more in the future.

    评论 由 website — 2012年12月7日 @ 09:33

  132. In my honest oppinion, your post provides the viewers with all they want.

    评论 由 website — 2012年12月11日 @ 03:55

  133. What a magnificant article you have published. I just stopped in to let you know I really appreciated your blog and will be checking in from time to time now.

    评论 由 go — 2012年12月19日 @ 10:06


RSS feed for comments on this post. TrackBack URI

留下评论