Euler 14的不同解法 ----所涉及的知识 1. yield 2.BF 3. decorator 4.cache 5.等等
def euler_problem_14():
"""
最直接粗暴的解法:就是直接如下所示了
"""
max_count = 1
max_value = 1
for i in xrange(10010...
分类:
编程语言 时间:
2014-06-05 04:46:16
阅读次数:
266
1.select sum(CASE WHEN A.[STATUS]=0 THEN 1 ELSE
0 end) as a1,sum(CASE A.[STATUS] WHEN 1 THEN 1 ELSE 0 end) as a2,sum(CASE
A.[STATUS] WHEN 2 THEN 1 ELS...
分类:
数据库 时间:
2014-06-04 21:10:46
阅读次数:
513
简单深搜,可以完全暴力,不会超时的。#include#include#includeusing
namespace std;#define MAX(a,b) (a>b?a:b) char maze[10][10];int n, maxn;void
DFS(int step,int count);in...
分类:
Web程序 时间:
2014-06-04 20:43:04
阅读次数:
270
NHibernate这个框架用了有一年多了,相对有很大的优势,可以省去很多写Sql的时间。但是如果你想用它做统计,那么有点抱歉,只能手动写写了。它内置的东西很难符合你的需求。我遇到的问题是这样的。我需要统计一个表中根据一个字段分组统计这个每个组的数量。这个Sql很简单表名要用对象名替换,字段也要用对...
分类:
系统相关 时间:
2014-06-04 19:26:21
阅读次数:
315
DescriptionInputOutputSample InputSample
Output12HINT一开始还想什么离线做,其实不用,空间足够,我们直接开100个二维树状数组,然后就行了但是如果c范围很大就离线做好一些 1 type 2
tree=array[0..300,0..300]...
分类:
Web程序 时间:
2014-06-03 12:26:54
阅读次数:
277
文章标题 文章内容 编辑 prepare($query);
$result_acticle->execute(); $msg_count =$result_act...
分类:
Web程序 时间:
2014-05-31 21:10:01
阅读次数:
386
类似 153=1^3+5^3+3^3 这样的数就叫做水仙花数#include int
main(void){ int bw,sw,gw; int i; int count=0; for(i=100;i<=999;i++){
bw=i/100; //取出百位上的数 sw=i%100/10;/...
分类:
其他好文 时间:
2014-05-31 14:22:33
阅读次数:
173
1 2 13 25 26 You can count on this being a dark
29 background with light text on top, but should try to make no 30 other
assumptions ...
分类:
移动开发 时间:
2014-05-31 06:12:59
阅读次数:
492
1 CREATE PROC usp_OrgPage_SQL 2 @pageIndex INT, 3
@pageSize INT, 4 @totalCount INT OUTPUT 5 AS 6 BEGIN 7 SET @totalCount = (SELECT
COUNT(...
分类:
其他好文 时间:
2014-05-30 23:43:33
阅读次数:
516
Given a stringSand a stringT, count the number
of distinct subsequences ofTinS.A subsequence of a string is a new string which
is formed from the orig...
分类:
其他好文 时间:
2014-05-30 15:58:40
阅读次数:
187