每天进步一点!每天离梦想靠近一点!
to_zoe_yang · 共 109 篇文章
Problem 28
问题描述: Starting with the number 1 and moving to the right in a clockwise direction a 5 by 5 spiral is formed as follows: 21 22 23 24 25 20 7 8 9 10 19 6 1 2 11 18 5 4 3 12 17 16 15 14 13 It can be verified that the sum of the numbers on the diagonals is 101. What is the sum of the numbers on the dia…
2011-08-17 15:06 · 算法 · 评论(0)
Problem 27
问题描述: Euler published the remarkable quadratic formula: n ² + n + 41 It turns out that the formula will produce 40 primes for the consecutive values n = 0 to 39. However, when n = 40, 402 + 40 + 41 = 40(40 + 1) + 41 is divisible by 41, and certainly when n = 41, 41² + 41 + 41 is clearly divisible b…
2011-08-17 15:03 · 算法 · 评论(0)
Problem 25
问题描述: The Fibonacci sequence is defined by the recurrence relation: F n = F n 1 + F n 2, where F1 = 1 and F2 = 1. Hence the first 12 terms will be: F1 = 1 F2 = 1 F3 = 2 F4 = 3 F5 = 5 F6 = 8 F7 = 13 F8 = 21 F9 = 34 F10 = 55 F11 = 89 F12 = 144 The 12th term, F12, is the first term to contain three di…
2011-08-17 14:55 · 算法 · 评论(0)
Problem 24
问题描述: A permutation is an ordered arrangement of objects. For example, 3124 is one possible permutation of the digits 1, 2, 3 and 4. If all of the permutations are listed numerically or alphabetically, we call it lexicographic order. The lexicographic permutations of 0, 1 and 2 are: 012 021 102 120…
2011-08-17 14:53 · 算法 · 评论(0)
Problem 21
问题描述: Let d( n ) be defined as the sum of proper divisors of n (numbers less than n which divide evenly into n ). If d( a ) = b and d( b ) = a , where a b , then a and b are an amicable pair and each of a and b are called amicable numbers. For example, the proper divisors of 220 are 1, 2, 4, 5, 10,…
2011-08-17 09:57 · 算法 · 评论(0)
Problem 15
问题描述: Starting in the top left corner of a 2 2 grid, there are 6 routes (without backtracking) to the bottom right corner. How many routes are there through a 20 20 grid? 解决问题: 运用排列组合的知识,问题就是 (m+n)!/(m!*n!) 可以运用动态规划递归解决 public static int find(int a, int b){ if(a<0||b<0){ return 0; }else if(a==0&&b=…
2011-08-17 09:52 · 算法 · 评论(0)
Problem 13
问题描述: Work out the first ten digits of the sum of the following one-hundred 50-digit numbers. 37107287533902102798797998220837590246510135740250 46376937677490009712648124896970078050417018260538 74324986199524741059474233309513058123726617309629 91942213363574161572522430563301811072406154908250 2…
2011-08-17 09:47 · 算法 · 评论(0)
Problem 16
问题描述: 215 = 32768 and the sum of its digits is 3 + 2 + 7 + 6 + 8 = 26. What is the sum of the digits of the number 21000? 解决问题: 大数相乘
2011-08-12 09:58 · 算法 · 评论(0)
免签出国,我们这些懒人的长假有救了
(一) 如果你只想来个短期旅行 ★建议目的地:韩国济州岛 ★推荐理由:两小时直达韩剧外景天堂 ★签证类型:免签 从地球仪上看,济州岛是国外离上海最近的海岛,从声纳公海出发,55分钟抵达。即使是从北京出发,2小时的航程也比去三亚和香港快得多。更便利的是,只要带着护照和酒店预订单,就可以顺利出关。直线飞行,不转机,飞行时间短,比起飞其他国家需要中转,或动辄十几二十小时的行程,是多么幸福的事。 济州岛比一般的海岛游选择性更多——阳光、沙滩、火山、丛林、牧场、果园,还有大名鼎鼎的泰迪熊博物馆。但这些路线逛起来却非常简单,沿着12号公路线玩下去就可以。这一路上都是韩剧外景天堂:住“对不起我爱你”的Se…
2011-08-09 19:04 · 未来 · 评论(0)
<分享>动态规划算法剖析
转载于: http://blog.csdn.net/sharpdew/article/details/763180 最优化原理 1951年美国数学家R.Bellman等人,根据一类多阶段问题的特点,把多阶段决策问题变换为一系列互相联系的单阶段问题,然后逐个加以解决。一些静态模型,只要人为地引进“时间”因素,分成时段,就可以转化成多阶段的动态模型,用动态规划方法去处理。与此同时,他提出了解决这类问题的“最优化原理”(Principle of optimality): “一个过程的最优决策具有这样的性质:即无论其初始状态和初始决策如何,其今后诸策略对以第一个决策所形成的状态作为初始状态的过程而言…
2011-08-09 18:44 · 算法 · 评论(0)
problem 23
问题描述: A perfect number is a number for which the sum of its proper divisors is exactly equal to the number. For example, the sum of the proper divisors of 28 would be 1 + 2 + 4 + 7 + 14 = 28, which means that 28 is a perfect number. A number n is called deficient if the sum of its proper divisors i…
2011-08-07 20:09 · 算法 · 评论(1)
【经典】这四个故事写得太犀利了,很好很强大
第一课 一个男人在他妻子洗完澡后准备进浴室洗澡。这时,门铃响了。 妻子迅速用浴巾裹住自己冲到门口。 当她打开门时,邻居鲍勃站在那儿。 在她开口前,鲍勃说,“你如果把浴巾拿掉,我给你800美元。” 想了一会儿,这个女人拿掉浴巾赤裸地站在鲍勃面前。几秒钟后,鲍勃递给她800美元然后离开了。 女人重新裹好浴巾回到屋里。 当她踏进浴室时,丈夫问她,“是谁呀?” “是邻居鲍勃。”她回答。 “哦,”丈夫说,“他有没有提到还欠我800美元?” 故事寓意: 及时与同舟共济的股东分享重要信息,将会避免不必要的曝光。 第二课 一个销售员、一个办事员和他们的经理步行去午餐时发现了一盏古代油灯。 他们摩擦油灯,一个…
2011-08-07 14:13 · 我的生活 · 评论(0)
Problem 22
问题描述: Using names.txt (right click and 'Save Link/Target As...'), a 46K text file containing over five-thousand first names, begin by sorting it into alphabetical order. Then working out the alphabetical value for each name, multiply this value by its alphabetical position in the list to obtain a n…
2011-08-07 14:13 · 算法 · 评论(0)
Problem 18
问题描述: By starting at the top of the triangle below and moving to adjacent numbers on the row below, the maximum total from top to bottom is 23. 3 7 4 2 4 6 8 5 9 3 That is, 3 + 7 + 4 + 9 = 23. Find the maximum total from top to bottom of the triangle below: 75 95 64 17 47 82 18 35 87 10 20 04 82 47…
2011-08-07 14:11 · 算法 · 评论(0)
主元分析(PCA)理论分析及应用
主元分析(PCA)理论分析及应用 (主要基于外文教程翻译) 什么是PCA? PCA是Principal component analysis的缩写,中文翻译为主元分析。它是一种对数据进行分析的技术,最重要的应用是对原有数据进行简化。正如它的名字:主元分析,这种方法可以有效的找出数据中最 “主要”的元素和结构,去除噪音和冗余,将原有的复杂数据降维,揭示隐藏在复杂数据背后的简单结构。它的优点是简单,而且无参数限制,可以方便的应用与各个场合。因此应用极其广泛,从神经科学到计算机图形学都有它的用武之地。被誉为应用线形代数最价值的结果之一。 在以下的章节中,不仅有对PCA的比较直观的解释,同时也配有较…
2011-07-20 16:16 · 毕业论文 · 评论(0)