随笔分类 -  2012暑期培训--acm--快速幂和矩阵

矩阵快速幂求数列 仍然需要优化
摘要:E Crawling in process... Crawling failed Time Limit:12000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u Submit StatusDescriptionA cellular automaton is a collection of cells on a grid of specified shape that evolves through a number of discrete time steps according to a set of rules that 阅读全文

posted @ 2012-07-29 12:43 wpdxzabm 阅读(156) 评论(0) 推荐(0)

数列操作,记住循环优化
摘要:Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Submit StatusDescriptionThere are n lights in a circle numbered from 1 to n. The left of light 1 is light n, and the left of light k (1< k<= n) is the light k-1.At time of 0, some of them turn on, and others turn off. Cha 阅读全文

posted @ 2012-07-29 12:41 wpdxzabm 阅读(136) 评论(0) 推荐(0)

矩阵快速幂求数列和
摘要:Crawling in process... Crawling failed Time Limit:3000MS Memory Limit:131072KB 64bit IO Format:%I64d & %I64u Submit StatusDescriptionGiven a n × n matrix A and a positive integer k, find the sum S = A + A2 + A3 + … + Ak.InputThe input contains exactly one test case. The first line of input 阅读全文

posted @ 2012-07-29 12:34 wpdxzabm 阅读(156) 评论(0) 推荐(0)

矩阵快速幂求数列
摘要:B - 矩阵快速幂求数列Crawling in process... Crawling failed Time Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u Submit StatusDescriptionIn 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, 阅读全文

posted @ 2012-07-29 12:28 wpdxzabm 阅读(143) 评论(0) 推荐(0)

整数快速幂 初步了解快速幂 从n到logN时间的优化
摘要:Crawling in process... Crawling failed Time Limit:1000MS Memory Limit:30000KB 64bit IO Format:%I64d & %I64u Submit StatusDescriptionPeople are different. Some secretly read magazines full of interesting girls' pictures, others create an A-bomb in their cellar, others like using Windows, and 阅读全文

posted @ 2012-07-29 12:25 wpdxzabm 阅读(124) 评论(0) 推荐(0)

导航