使用Eclipse可以方便的统计工程或文件的代码行数,方法如下:? 1.点击要统计的项目或许文件夹,在菜单栏点击Search,然后点击File...? 2.选中正则表达式(Regular expression),并在搜索文本框输入\n? 3.在文件...
分类:
系统相关 时间:
2014-09-19 15:48:55
阅读次数:
334
题目:求由A,B,C构成的有序传中长度为n,且每个B前面的A的个数不少于当前B,每个C前面的B的个数不少于当前C的个数。
分析:dp,求排列组合数。
考虑二维的状况:
如果 A>=B 则在 F(A-1,B)后面放上A,在F(A,B-1)后面放上B;
F(A,B)= F(A,B-1)+ F(A-1,...
分类:
其他好文 时间:
2014-09-19 11:58:15
阅读次数:
165
Priority Queue
Definition & Description:
In computer
science/data structures, a priority queue is
an abstract data type which
is like a regular queue or stack data
str...
分类:
其他好文 时间:
2014-09-19 03:25:45
阅读次数:
301
1 Code Expressions 代码表达式 @表达式 or @(Expressions ) 例如1: Listing @stuff.Length items.@rootNamespace.Models What hope to output was : MyApp.Models 必须这样写:@...
分类:
Web程序 时间:
2014-09-18 14:46:34
阅读次数:
171
正则表达式定义 正则表达式(regular expression)描述了一种字符串匹配的模式,可以用来检查一个串是否含有某种子串、将匹配的子串做替换或者从某个串中取出符合某个条件的子串等。 列目录时, dir *.txt或ls *.txt中的*.txt就不是一个正则表达式,因为这里*与正则式...
分类:
其他好文 时间:
2014-09-17 11:40:02
阅读次数:
256
Implement regular expression matching with support for'.'and'*'.'.' Matches any single character.'*' Matches zero or more of the preceding element.The...
分类:
其他好文 时间:
2014-09-15 21:14:39
阅读次数:
190
1、通配符 *: 任意长度的任意字符 ?: 任意单个字符 []: [^]: 2、正则表达式:REGular EXPression, REGEXP (1)元字符: .: 匹配任意单个字符 []: 匹配指定范围内的任意单个字符 [^]:匹配指定范围外的任意单个字符 (2)字符...
分类:
其他好文 时间:
2014-09-15 19:28:19
阅读次数:
133
这题类似
Regular Expression Matching,但是数据比较强。
首先介绍DP的解法,回忆Regular Expression Matching,我们也用dp(i,j)表示s[0...i-1]和p[0...j-1]是否匹配
基本情况相似,但是更简单:
1. dp(0,0) = true
2. dp(0,j) = dp(0,j-1) && p[j-1] == '*‘...
分类:
其他好文 时间:
2014-09-15 17:54:29
阅读次数:
221
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.ComponentModel; using System.Linq.Expressions; usin...
分类:
其他好文 时间:
2014-09-15 00:58:27
阅读次数:
267
在 Delphi 中使用正则表达式, 目前 PerlRegEx 应该是首选, 准备彻底而细致地研究它.官方网站: http://www.regular-expressions.info/delphi.html直接下载: http://www.regular-expressions.info/down...
分类:
其他好文 时间:
2014-09-14 23:24:57
阅读次数:
466