码迷,mamicode.com
首页 >  
搜索关键字:regular expressions    ( 2287个结果
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
UVa 10157 - Expressions
题目:给你n个括号,求合法的匹配中,深度不超过d的组合数。 分析:组合,计数,dp,大整数。          这个题目很像卡塔兰数,不过深度有限制,可以利用卡塔兰数的递推公式求解;          设C(k,d)为k对括号形成深度不超过d的合法匹配方法数;则有:           C(k,d)= Σ(C(i,d-1)*C(k-1-i,d)) { i 取0到 k-1 }...
分类:其他好文   时间:2014-09-14 15:26:37    阅读次数:314
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
Evaluating Simple C Expressions UVA 327
说说: 这道题的题意就是求例如:a+b--+c++ 的值,其中a=1,b=2...依次类推。最后要求输出整个表达式的值和每个在表达式中出现过的变量最后的值。思路其实比较简单,先将整个表达式读取,然后遍历,遇到遍历时停下,并判断其是否有前缀++或--,并且找到该变量的运算符(如果有的话),接下来判断是否有后缀--或++,当然其间的空格是要忽略的。至于那些遍历是用一个大小为26的数组保存,没有出现过...
分类:其他好文   时间:2014-09-11 19:24:32    阅读次数:139
Regular Expression Matching
Implement regular expression matching with support for '.' and '*'.'.' Matches any single character.'*' Matches zero or more of the preceding element....
分类:其他好文   时间:2014-09-09 18:01:59    阅读次数:146
LeetCode中的动态规划问题(一)
Regular Expression MatchingProblem description:Implement regular expression matching with support for'.'and'*'.'.' Matches any single character.'*' Ma...
分类:其他好文   时间:2014-09-09 11:37:58    阅读次数:281
66. Regular Expression Matching
思路: 这题 ugly 之处,在于 '*' 给的很不明朗, 其实'c*', 表示 '*' 可以代表 'ccc...cc'。 对 '*' 的理解,若出现 p中出现 '*', 则要比较用 s 和 p 中 '*' 之前的那个元素比较,从左往右找出 s 中第一个与 p 之前的元素不同的元素。 (若全相同...
分类:其他好文   时间:2014-09-09 10:43:38    阅读次数:159
扩展正则表达式
1. 扩展正则表达式 扩展正则表达式 ERE Extended Regular Expressions 比基本正则表达式BRE 拥有更强大的功能。 2. ERE字符 egrep表示使用扩展正则表达式, 可以用 grep -E 代替 3. 简写 简写的特殊字符...
分类:其他好文   时间:2014-09-07 16:05:06    阅读次数:234
PDF数据提取------3.解析Demo
1.PDF中文本字符串格式中关键值信息抓取(已完成) 简介:这种解析比较传统最简单主要熟练使用Regular Expression做语义识别和验证.例如抓取下面红色圈内关键信息 string mettingData=GetMeetingData(); pub...
分类:其他好文   时间:2014-09-07 02:10:54    阅读次数:359
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!