# Problem_2.py """ Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 terms... ...
分类:
其他好文 时间:
2019-05-31 19:58:03
阅读次数:
112
f(1) = 1; f(2) = 1; f(3) = f(1) + f(2) = 2; f(4) = f(3) + f(2) = 3; f(5) = f(4) + f(3) = 5; f(6) = f(5) + f(4) = 8; f(n) = f(n-1) + f(n-2) ; function ...
分类:
Web程序 时间:
2019-05-29 19:39:46
阅读次数:
196
CSE/EEE 230 Assignment 2Due May 28 (11:59PM)This assignment is designed to introduce you to the MIPS assembly language and the MIPS simulator.For this ...
分类:
其他好文 时间:
2019-05-26 19:44:44
阅读次数:
133
大意: 给定数$n$, 求将$n$划分为最少的斐波那契数的和或差. 每次取相邻$n$的斐波那契数一定最优, 考虑证明. 结论1:存在一个最优解,使得每个斐波那契数使用不超过1次.(考虑$2F_n=F_{n-2}+F_{n+1}$) 结论2:存在一个最优解,使得同号数不相邻, 异号数间隔$\ge 2$ ...
分类:
其他好文 时间:
2019-05-20 19:21:28
阅读次数:
105
华为芯片20年 https://www.cnbeta.com/articles/tech/848361.htmCPU 没有介绍 国产的兆鑫(x86)和国产的龙芯(MIPS) 以及江苏的OpenPower(浪商也在做)但是IBM好像没计划 让OpenPower 运行AIX 华为1991年从成立ASIC ...
分类:
其他好文 时间:
2019-05-19 09:25:49
阅读次数:
203
#斐波那契数列(F(N-1)/F(N)->0.618) & F(N)=F(N-2)+F(N-1) class Fibonacci: def __init__(self, n): self.__count = n def __iter__(self): return FiboIterator(self ...
分类:
其他好文 时间:
2019-05-12 17:04:13
阅读次数:
188
粗体 表示 概念 上的重点; 斜体 表示 行文逻辑 上的重点; 下划线表示 个人理解 ,可能含有大量的直觉,缺乏严谨的数学推导。 顺序与OI知识的学习顺序和难度不一定相关!!! 生成函数 排列组合 康托展开 容斥 斐波那契,Fibonacci 卡特兰,Catalan 卢卡斯,Lucas 斯特林,St ...
分类:
其他好文 时间:
2019-05-04 14:56:38
阅读次数:
148
链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=4108 题意:求第l个斐波那契数到第r个斐波那契数的和,判断这个和奇偶性,若为奇输出1,偶输出0 题解:很明显要利用前缀和,通过打表可以发现斐波那契前缀和的奇偶性为 奇 ...
分类:
其他好文 时间:
2019-05-04 12:15:06
阅读次数:
156
正解:矩阵快速幂 解题报告: 我永远喜欢loj! 一看到这个就应该能想到矩阵快速幂? 然后就考虑转移式,发现好像直接想不好想,,,主要的问题在于这个*$i$,就很不好搞$QAQ$ 其实不难想到,$\sum_{i=1}^{n}a_i\cdot(n-i)$这样一个式子是可以在矩阵快速幂中推出来的(类似这 ...
分类:
其他好文 时间:
2019-05-03 16:09:29
阅读次数:
117
A sequence X_1, X_2, ..., X_n is fibonacci-like if: n >= 3 X_i + X_{i+1} = X_{i+2} for all i + 2 <= n Given a strictly increasing array A of positive ...
分类:
其他好文 时间:
2019-05-03 09:23:55
阅读次数:
97