Problem Description
A number sequence is defined as follows:
f(1) = 1, f(2) = 1, f(n) = (A * f(n - 1) + B * f(n - 2)) mod 7.
Given A, B, and n, you are to calculate the value of f(n).
I...
分类:
其他好文 时间:
2015-04-22 14:01:08
阅读次数:
145
Problem Description
Given a sequence a[1],a[2],a[3]......a[n], your job is to calculate the max sum of a sub-sequence. For example, given (6,-1,5,4,-7), the max sum in this sequence is 6 + (-1) + 5 +...
分类:
其他好文 时间:
2015-04-22 11:36:55
阅读次数:
137
Description
The twenty-first century is a biology-technology developing century. One of the most attractive and challenging tasks is on the gene project, especially on gene sorting program. Recentl...
分类:
其他好文 时间:
2015-04-21 20:49:10
阅读次数:
186
InUnix/Linux, a
file is a sequence of bytes withoutstructure. Any necessary structure (e.g. for a database) isadded by the programs that manipulate the data in the file. Linuxitself doesn’t know abou...
分类:
系统相关 时间:
2015-04-21 18:11:09
阅读次数:
166
1 id自动增长 MySQL可设置auto increment,oracle中则不可直接设置,需要通过序列实现。oracle 序列create sequence emp_sequenceincrement by 1start with 1nomaxvaluenocyclecash 10注意:第一次....
分类:
数据库 时间:
2015-04-21 12:53:21
阅读次数:
201
Approximation by a Progression
Time Limit: 500MS
Memory Limit: 65536KB
64bit IO Format: %I64d & %I64u
Submit Status
Description
Your are given a sequence of integer...
分类:
移动开发 时间:
2015-04-21 09:45:54
阅读次数:
196
#lang racket;guo lv qi(define (filter predicate sequence) (cond ((null? sequence) '()) ((predicate (car sequence)) (cons (car sequence) ...
分类:
其他好文 时间:
2015-04-20 22:38:28
阅读次数:
169
一:Leetcode 89 Gray Code
题目:The gray code is a binary numeral system where two successive values differ in only one bit.
Given a non-negative integer n representing the total number of bits in ...
分类:
其他好文 时间:
2015-04-20 17:10:42
阅读次数:
148
Description
Here is a circle sequence S of length n, and you can choose a position and remove the number on it.
After that,you will get a integer. More formally,you choose a number x( 1<=x<=n ),then...
分类:
编程语言 时间:
2015-04-20 15:01:12
阅读次数:
209
The set [1,2,3,…,n] contains a total of n! unique permutations.By listing and labeling all of the permutations in order,We get the following sequence (ie, for n = 3):"123""132""213""231""312""321"Give...
分类:
其他好文 时间:
2015-04-20 15:00:36
阅读次数:
116