链接 :click here~~
题意:
A sequence Sn is defined as:
Where a, b, n, m are positive integers.┌x┐is the ceil of x. For example, ┌3.14┐=4. You are to calculate Sn.
You, a top coder, say: So eas...
分类:
其他好文 时间:
2015-04-08 11:01:02
阅读次数:
112
例如当前文章的ID是4 sql如下:上一篇:select top 1 id,title from tb_ScGongGao where id4 and isdel=0 order by addTime asc,id asc一个倒序,一个正序, 取结果的TOP1 就是想要上下篇文章了
分类:
其他好文 时间:
2015-04-08 10:40:01
阅读次数:
106
1.对查询进行优化,应尽量避免全表扫描,首先应考虑在 where 及 order by 涉及的列上建立索引。2.应尽量避免在 where 子句中对字段进行 null 值判断,否则将导致引擎放弃使用索引而进行全表扫描,如:select id from t where num is null可以在num...
分类:
数据库 时间:
2015-04-08 10:39:44
阅读次数:
148
又一道DFS题,题意如下:
Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum.
For example:
Given the below binary tree and sum
= 22,
5
...
分类:
其他好文 时间:
2015-04-08 09:12:40
阅读次数:
116
midifan.com/moduleuser-index-416628.htmmidifan.com/moduleuser-index-416627.htmmidifan.com/moduleuser-index-416698.htmmidifan.com/moduleuser-index-4167...
分类:
其他好文 时间:
2015-04-08 06:36:41
阅读次数:
137
题目链接: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 the code, print th...
分类:
其他好文 时间:
2015-04-07 23:34:18
阅读次数:
318
Given a sequence of K integers { N1, N2, ..., NK }. A continuous subsequence is defined to be { Ni, Ni+1, ..., Nj } where 1 =0)25 {26 ...
分类:
其他好文 时间:
2015-04-07 22:58:11
阅读次数:
214
目录1、SQL语句分类2、DDL语句3、DML语句4、DCL语句5、事务相关语句6、mysql查询6.1、单表简单查询6.2、多表组合查询6.2.1、联结查询(交叉联结,内联结,外联结(左外联结、右外联结))6.2.2、联合查询(UNION)6.2.3、自联结6.3、子查询6.3.1、WHERE子查询6.3.2、FROM子查询..
分类:
数据库 时间:
2015-04-07 19:53:45
阅读次数:
217
本文来自:http://blog.csdn.net/xuejianwu/article/details/6931804一、投影操作符1. SelectSelect操作符对单个序列或集合中的值进行投影。下面的示例中使用select从序列中返回Employee表的所有列:[csharp]view pla...
分类:
其他好文 时间:
2015-04-07 19:27:43
阅读次数:
164
public class yms_Entity where T :DbContext { private static T _instance; public static readonly object SyncObject = new object(); ...
分类:
其他好文 时间:
2015-04-07 19:10:04
阅读次数:
113