Single(条件):确定只符合条件的结果只有一个值;否则报错,如果有多个值则报Sequence contains more than one matching element 如果没有符合的则报Sequence contains no matching element。SingleOrDefaul...
分类:
其他好文 时间:
2014-09-02 12:19:54
阅读次数:
172
在Oracle中,即使条件不符合, NVL函数也会执行条件不符合的选项,对于DECODE函数,如果里面有自定义函数,则decode不会执行不符合条件的函数,但是如果decode里面有sequence.nextval,不管条件是否符合,sequence都会自增。
分类:
数据库 时间:
2014-09-02 11:50:44
阅读次数:
308
感觉可以用bfs暴力,一开始写了一个很暴力的bfs,hash判重,本地跑了几组数据发现至少要2s才能过,交上去估计要TLE,试探性的交了一发1A了,原来时限是10s,我看成1s了,真是逗逼。。。还一直不敢写#include #include #include #include #include #i...
分类:
其他好文 时间:
2014-09-01 22:36:53
阅读次数:
334
Implement wildcard pattern matching with support for '?' and '*'.'?' Matches any single character.'*' Matches any sequence of characters (including th...
分类:
其他好文 时间:
2014-09-01 19:34:43
阅读次数:
224
DescriptionA sequence of N positive integers (10 >T;33 while(T--)34 {35 cin>>n>>S;36 for(int i=0;i>a[i];38 solve();39 ...
分类:
其他好文 时间:
2014-09-01 19:22:33
阅读次数:
216
for index, item in enumerate(sequence): process(index, item)列表初始化:multilist = [[0 for col in range(5)] for row in range(3)]用*初始化,出现的问题:http://www.j...
分类:
编程语言 时间:
2014-09-01 19:22:13
阅读次数:
268
一、 Sequence的内置函数1.sequence?first 返回sequence的第一个值。2.sequence?last 返回sequence的最后一个值。3.sequence?reverse 将sequence的现有顺序反转,即倒序排序4.sequence?size 返回sequence的...
分类:
其他好文 时间:
2014-09-01 15:16:03
阅读次数:
235
昨天 yep 问了一个问题:
For two positive integers a and b, the Ulam sequence U(a,b) is defined by U(a,b)1 = a, U(a,b)2 = b and for k > 2, U(a,b)k is the smallest integer greater
than U(a,b)(k-1) which can...
分类:
其他好文 时间:
2014-08-31 20:07:21
阅读次数:
359
Given a string s and a dictionary of words dict, determine if s can be segmented into a space-separated sequence of one or more dictionary words.
For example, given
s = "leetcode",
dict = ["leet"...
分类:
其他好文 时间:
2014-08-31 20:07:12
阅读次数:
233
题意 给你一个环形串 输出它以某一位为起点顺时针得到串的最小字典序
直接模拟 每次后移一位比较字典序即可 注意不能用strcpy(s+1,s)这样后移 strcpy复制地址不能有重叠部分
#include
#include
using namespace std;
const int N = 150;
char s[N], ans[N], ...
分类:
其他好文 时间:
2014-08-31 10:33:51
阅读次数:
508