Fibonacci(N)=Fibonacii(N-1)+Fibonacci(N-2)其中
Fibonacci(0)=0;Fibonacci(1)=1用循环或则递归实现Fibonacci算法很简单,这里就不说了,如果要用公式实现的话,需要进行开根号和幂运算,普通的long型号只能精确到小数点之后的16...
分类:
其他好文 时间:
2014-06-02 19:15:06
阅读次数:
296
Rope Folding [Brian Dean, 2012]时间限制: 1 Sec
内存限制: 128 MB题目描述Farmer John has a long rope of length L (1 =f(i)的最大i值,递归即可。Work
Scheduling [Richard Peng, ....
分类:
其他好文 时间:
2014-06-02 17:40:21
阅读次数:
1039
下面就介绍这个模块中的几个方法。 struct.pack():我的理解是,python利用
struct模块将字符(比如说 int,long ,unsized int 等)拆成 字节流(用十六进制表示),便于传输。
其函数原型为:struct.pack(fmt, v1, v2, ...),fmt表示...
分类:
编程语言 时间:
2014-06-02 17:13:12
阅读次数:
253
题目:给定一个数,,求它最少可以用多少个包含字符串"61"的数字来表示,并输出这些数。
分析:对于大于6161的任何一个整数,都有如下表示
对于小于1616的数,直接背包即可。
代码:
#include
#include
#include
using namespace std;
typedef long long LL;
const...
分类:
其他好文 时间:
2014-06-02 10:35:40
阅读次数:
223
感觉不会再爱了,呜呜!A题原来HACK这么多!很多人跟我一样掉坑了!If there is some
choice whose description at least twice shorter than all other descriptions, or
at least twice long...
分类:
其他好文 时间:
2014-06-02 06:33:26
阅读次数:
238
要想ssh远程登录,需要准备两件事:配置同网段IP和开启SSH服务。
由于live系统没有IP,所以首先需要配置IP。
我的live系统是在虚拟机上启动的,宿主IP为192.168.230.1,live系统的IP我设置为192.168.230.180:
#ifconfig eth0 192.168.230.180
然后在SecurityCRT上连接live系统,输入密码时发现liv...
分类:
系统相关 时间:
2014-06-01 10:32:07
阅读次数:
304
看了下论坛的帮助,把自己喜欢的WLW内容整理了一下:下载地址http://windows.microsoft.com/en-us/windows-live/download-windows-essentials账号配置首次运行会弹出配置界面当然也可以在菜单FileàOptions
项中进行账号配置点...
http://poj.org/problem?id=2891这道题的题意是:给你多个模性方程组:m mod ai=ri 求最小的m;中国剩余定理 1
#include 2 #include 3 #include 4 #define ll long long 5 using namespace ...
分类:
其他好文 时间:
2014-05-31 19:06:39
阅读次数:
191
函数原型: double exp (double x); float exp (float
x);long double exp (long double x); double exp (T x); // additional overloads
for in...
分类:
其他好文 时间:
2014-05-31 18:25:15
阅读次数:
233
原型: double abs (double x); float abs (float
x);long double abs (long double x); double abs (T x); // additional overloads
for int...
分类:
其他好文 时间:
2014-05-31 18:20:46
阅读次数:
250