-- Create sequence create sequence MFB_REGION_SEQminvalue 1maxvalue 999999999start with 6increment by 1nocache;针对这个序列添加触发器。CREATE OR REPLACE TRIGGER T...
分类:
数据库 时间:
2014-08-14 14:02:08
阅读次数:
188
Description
Problem B - BFS (Binary Fibonacci String)
We are familiar with the Fibonacci sequence (1, 1, 2, 3, 5, 8, ...). What if we define a similar sequence for strings? Sounds interesting? Let...
分类:
其他好文 时间:
2014-08-14 10:45:58
阅读次数:
252
题解:因为模比较小,所以一定会产生循环节,所有先计算循环节,然后直接求解。#include int main(){ int a,b,n,f[50]; f[1]=f[2]=1; while(scanf("%d%d%d",&a,&b,&n),a|b|n){ int t1,t2,...
分类:
其他好文 时间:
2014-08-14 10:42:18
阅读次数:
170
题目:UVA - 10534Wavio Sequence(LIS)
题目大意:给出N个数字,找出这样的序列:2 * n + 1个数字组成。前面的n + 1个数字单调递增,后面n + 1单调递减。
解题思路:从前往后找一遍LIS,再从后往前找一遍LIS。最后只要i这个位置的LIS的长度和LDS的长度取最小值。再*2 - 1就是这个波浪数字的长度。注意这里的求LIS要用nlog...
分类:
其他好文 时间:
2014-08-13 22:25:17
阅读次数:
332
Given an unsorted array of integers, find the length of the longest consecutive elements sequence.For example,Given [100, 4, 200, 1, 3, 2],The longest...
分类:
其他好文 时间:
2014-08-13 21:50:47
阅读次数:
318
Description
D
Anti-Rhyme Pairs
Input: Standard Input
Output: Standard Output
Often two words that rhyme also end in the same sequence of characters. We use...
分类:
其他好文 时间:
2014-08-13 18:45:37
阅读次数:
230
Problem DescriptionA 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 t...
分类:
其他好文 时间:
2014-08-13 18:43:47
阅读次数:
209
The count-and-say sequence is the sequence of integers beginning as follows:1, 11, 21, 1211, 111221, ...1is read off as"one 1"or11.11is read off as"tw...
分类:
其他好文 时间:
2014-08-13 14:20:26
阅读次数:
204
这题真是神坑啊,经过递归、for循环的思路,发现都会超时,而程序不能再化简了,就想到规律,不过本题的规律不是很好找,随着a、b不同,周期也不同,这个题神坑的一点在于当n%zhouqi == 0的情况,需要单独挑出来,以下是AC代码:
#include
#include
#include
#include
#include
#include
#include
using namespace std...
分类:
其他好文 时间:
2014-08-13 13:08:06
阅读次数:
167
目录结构先设计数据表结构DROP SEQUENCE BDLLY_2V.SEQ_CUSTOMER;CREATE SEQUENCE BDLLY_2V.SEQ_CUSTOMER START WITH 6 MAXVALUE 999999999999999999999999999 MINVALUE 0 ...
分类:
Web程序 时间:
2014-08-13 00:52:04
阅读次数:
393