From this blog, we start to talk about the index in mongo Database, which is similar to the traditional database. Generally speaking, if the index need to be created in the traditional database, so do...
分类:
数据库 时间:
2014-10-20 02:09:01
阅读次数:
236
I would like to retrieve the content of a url. Similar to pythons:html_content = urllib.urlopen("http://www.test.com/test.html").read()In examples(jav...
分类:
Web程序 时间:
2014-10-18 15:21:48
阅读次数:
232
题目:hdoj 4786 Fibonacci Tree
题意:给出 n 个点 m 条边的图,边只有两种颜色,白色和黑色,让你判断能不能让一个生成树中白边的个数为斐波那契数。
分析:这是个想法题目,前提是知道生成树的定义:生成树必须是所有点都在树中
那么既然要是斐波那契数,我只要把白色边的最大个数和最小个数求出来,如果这个范围内有斐波那契数的话,那么就满足条件。
当然...
分类:
其他好文 时间:
2014-10-17 00:52:13
阅读次数:
188
Problem
Minesweeper is a computer game that became popular in the 1980s, and is still included in some versions of the Microsoft Windows operating system. This problem has a similar idea, but it does...
分类:
其他好文 时间:
2014-10-16 13:26:02
阅读次数:
255
每天一个JavaScript实例-使用缓存计算(memoization)来提高应用程序性能
window.onload = function(){
var fibonacci = function(){
var memo = [0,1];
var fib = function(n){
var result = memo[n];
if(typeof resu...
分类:
编程语言 时间:
2014-10-16 12:06:52
阅读次数:
182
# 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 will be: 1, 2, 3...
分类:
编程语言 时间:
2014-10-15 23:13:51
阅读次数:
245
1.小兔子繁殖问题 (有该问题的详细来由介绍)2.台阶问题题目:一个人上台阶可以一次上一个或者两个,问这个人上n层的台阶,一共有多少种走法。递归的思路设计模型:i(台阶阶数) n(走法种数) 组合情况1 1 ...
分类:
其他好文 时间:
2014-10-15 13:33:10
阅读次数:
167
题解:直接计算即可。#include #include using namespace std;int main(){ int T; scanf("%d",&T); while(T--){ int a,b,c; bool flag=1; scanf("%...
分类:
其他好文 时间:
2014-10-14 17:37:59
阅读次数:
119
Fibonacci
Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 3569 Accepted Submission(s): 1627
Problem Description
2007年到来了。经过2006年...
分类:
其他好文 时间:
2014-10-13 18:16:39
阅读次数:
159
学习资源《Algorithms》,作者S.Dasgupta,C.H.Papadimitriou,and U.V.Vazirani。
电子版可到资源库中下载http://download.csdn.net/detail/segen_jaa/7900765。
1、问题描述
Fibonacci数列想必大家都比较熟悉,后一位数字是前两位的和。
0,1,1,2,3,5,8,13,21,34
对...
分类:
编程语言 时间:
2014-10-13 17:37:20
阅读次数:
253