摘要: Problem B: BTime Limit: 1 SecMemory Limit: 128 MBSubmit: 96Solved: 43[Submit][Status][Web Board]DescriptionNow that you're back to school for another term, you need to remember how to work the combination lock on your locker. A common design is that of the Master Brand, shown at right. The lock 阅读全文
posted @ 2011-07-30 22:10 bcy 阅读(254) 评论(0) 推荐(0) 编辑
摘要: Problem F: FTime Limit: 1 SecMemory Limit: 128 MBSubmit: 221Solved: 56[Submit][Status][Web Board]DescriptionSuperbowl Sunday is nearly here. In order to pass the time waiting for the half-time commercials and wardrobe malfunctions, the local hackers have organized a betting pool on the game. Members 阅读全文
posted @ 2011-07-30 21:47 bcy 阅读(218) 评论(0) 推荐(0) 编辑
摘要: 正则表达式 匹配中文字符的正则表达式: [u4e00-u9fa5] 评注:匹配中文还真是个头疼的事,有了这个表达式就好办了 匹配双字节字符(包括汉字在内):[^x00-xff] 评注:可以用来计算字符串的长度(一个双字节字符长度计2,ASCII字符计1) 匹配空白行的正则表达式:ns*r 评注:可以用来删除空白行 匹配HTML标记的正则表达式:< (S*?)[^>]*>.*?|< .*? /> 评注:网上流传的版本太糟糕,上面这个也仅仅能匹配部分,对于复杂的嵌套标记依旧无能为力 匹配首尾空白字符的正则表达式:^s*|s*$ 评注:可以用来删除行首行尾的空白字符(包 阅读全文
posted @ 2011-07-30 20:53 bcy 阅读(176) 评论(0) 推荐(0) 编辑