题目:http://acm.hdu.edu.cn/showproblem.php?pid=1500从大到小搞,到第
i 个人取的对数 不超过 i/3,就保证了对于每一对之前总有比他大的 与他配对。#include #include #include #include
#include #includ...
分类:
其他好文 时间:
2014-06-12 14:33:30
阅读次数:
257
POSIX风格.at可以匹配cat sat mat
#at点可以匹配任意字符[a-z]at[a-zA-Z]方括号中匹配一个集合类[^a-z]表示不属于该集合里的字符*表示可以被重复0次或更多次+表示可以被重复1次或更多次[[:alnum:]]+表示至少有一个字母字符()圆括号用于分割子表达式(ver...
分类:
Web程序 时间:
2014-06-12 14:02:18
阅读次数:
247
Given an array of strings, return all groups of
strings that are anagrams.Note: All inputs will be in lower-case.题解:
判断字符串是否为回文构词法生成的。找出所有由同一回文构词法生成的字...
分类:
其他好文 时间:
2014-06-12 13:51:32
阅读次数:
200
1 // Xml 转 数组, 包括根键,忽略空元素和属性,尚有重大错误 2 function
xml_to_array( $xml ) 3 { 4 $reg = "/]*?>([\\x00-\\xFF]*?)/"; 5
if(preg_match_all($reg, $xml, $...
分类:
Web程序 时间:
2014-06-12 13:16:05
阅读次数:
260
前提条件:安装了mongodb数据库
安装了mongo的php驱动下载Yii的mongo扩展:下载链接:http://pan.baidu.com/s/1rPtx0官方下载链接:https://github.com/canni/YiiMongoDbSuite得到文件:YiiM...
分类:
数据库 时间:
2014-06-12 13:05:19
阅读次数:
359