永夜初晗凝碧天

本博客现已全部转移到新地址,欲获取更多精彩文章,请访问http://acshiryu.github.io/

导航

2011年8月9日 #

poj3233 又见矩阵,不过是等比吗?

摘要: Given a n × n matrix A and a positive integer k, find the sum S = A + A^2 + A^3 + … + A^k.也许可以用等比数列的前n项来求和??? 阅读全文

posted @ 2011-08-09 11:44 ACShiryu 阅读(2367) 评论(7) 推荐(1) 编辑

poj3070来体会矩阵的妙用

摘要: In the Fibonacci integer sequence, F0 = 0, F1 = 1, and Fn = Fn − 1 + Fn − 2 for n ≥ 2. For example, the first ten terms of the Fibonacci sequence are: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, … Given an integer n, your goal is to compute the last 4 digits of Fn. 阅读全文

posted @ 2011-08-09 11:11 ACShiryu 阅读(1623) 评论(1) 推荐(0) 编辑

poj3370同样的是抽屉原理

摘要: Every year there is the same problem at Halloween: Each neighbour is only willing to give a certain total number of sweets on that day, no matter how many children call on him, so it may happen that a child will get nothing if it is too late. To avoid conflicts, the children have decided they will put all sweets together and then divide them evenly among themselves. From last year's experience of Halloween they know how many sweets they get from each neighbour. Since they care more about justice 阅读全文

posted @ 2011-08-09 10:54 ACShiryu 阅读(1846) 评论(0) 推荐(0) 编辑

从poj2356来体会 抽屉原理 的妙用

摘要: 抽屉原理又称鸽巢原理,它是组合数学的一个基本原理,最先是由德国数学家狭利克雷明确地提出来的,因此,也称为狭利克雷原理。这个原理可以简单地叙述为“把10个苹果,任意分放在9个抽屉里,则至少有一个抽屉里含有两个或两个以上的苹果”。这个道理是非常明显的,但应用它却可以解决许多有趣的问题,并且常常得到一些令人惊异的结果。 阅读全文

posted @ 2011-08-09 10:53 ACShiryu 阅读(3572) 评论(7) 推荐(2) 编辑

poj 2115 同余方程与扩展欧几里德

摘要: a loop which starts by setting variable to value A and while variable is not equal to B, repeats statement followed by increasing the variable by C. We want to know how many times does the statement get executed for particular values of A, B and C, assuming that all arithmetics is calculated in a k-bit unsigned integer type (with values 0 = x 2k) modulo 2k. 阅读全文

posted @ 2011-08-09 10:10 ACShiryu 阅读(472) 评论(0) 推荐(0) 编辑

poj1006 中国剩余定理

摘要: Some people believe that there are three cycles in a person's life that start the day he or she is born. These three cycles are the physical, emotional, and intellectual cycles, and they have periods of lengths 23, 28, and 33 days, respectively. There is one peak in each period of a cycle. At the peak of a cycle, a person performs at his or her best in the corresponding field (physical, emotional or mental). For example, if it is the mental curve, thought processes will be sharper and concentrat 阅读全文

posted @ 2011-08-09 09:52 ACShiryu 阅读(655) 评论(0) 推荐(0) 编辑