码迷,mamicode.com
首页 >  
搜索关键字:regular    ( 1979个结果
zoj 2711 - Regular Words
题目:求由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
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
正则表达式
正则表达式定义 正则表达式(regular expression)描述了一种字符串匹配的模式,可以用来检查一个串是否含有某种子串、将匹配的子串做替换或者从某个串中取出符合某个条件的子串等。 列目录时, dir *.txt或ls *.txt中的*.txt就不是一个正则表达式,因为这里*与正则式...
分类:其他好文   时间:2014-09-17 11:40:02    阅读次数:256
Regular Expression Matching
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
Wildcard Matching[leetcode]直接匹配和DP
这题类似 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
DELPHI正则表达式
在 Delphi 中使用正则表达式, 目前 PerlRegEx 应该是首选, 准备彻底而细致地研究它.官方网站: http://www.regular-expressions.info/delphi.html直接下载: http://www.regular-expressions.info/down...
分类:其他好文   时间:2014-09-14 23:24:57    阅读次数:466
Linux服务器编程之:truncate()函数+案例说明
1.依赖头文件 #include #include 2.函数定义: int truncate(const char *path,off_t length); int ftruncate(int fd,off_t length); 函数说明: The  truncate()  and ftruncate() functions cause the regular file named...
分类:系统相关   时间:2014-09-14 19:20:57    阅读次数:289
LeetCode Regular Expression Matching
class Solution {#define SINGLE 1#define MULTIP 2public: bool isMatch(const char *s, const char *p) { if (s == NULL || p == NULL) return true...
分类:其他好文   时间:2014-09-14 01:20:56    阅读次数:261
UVA12300-Smallest Regular Polygon
给出两点,求经过这两点的正n边形的最小面积 大白鼠上说要注意精度,我没觉得精度有什么影响,然后就过了 我的做法: 相当于这两点构成的线段是正n边形的最长弦 我的代码: #include #include #include #include #include #include #include #include #include #include using names...
分类:其他好文   时间:2014-09-11 22:26:22    阅读次数:215
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!