贪心类题目目前除了正则匹配(Wildcard Matching)(据说其实是DP)那道还没做其他的免费题目都做了,简单做个总结。贪心的奥义就是每一步都选择当前回合”可见范围“(即可得知的信息)内的最优,而在每一步都仅选择当前回合”可见范围“内的最优这一策略下能够导致全局最优的结果的情况使用贪心就会是...
分类:
其他好文 时间:
2015-09-20 00:25:14
阅读次数:
305
原文链接 http://nerd-is.in/2013-09/scala-learning-pattern-matching-and-case-classes/原文发表于:http://nerd-is.in/2013-09/scala-learning-pattern-matching-and-ca...
分类:
其他好文 时间:
2015-09-16 06:15:52
阅读次数:
164
‘.‘Matchesanysinglecharacter.
‘*‘Matcheszeroormoreoftheprecedingelement.
Thematchingshouldcovertheentireinputstring(notpartial).
Thefunctionprototypeshouldbe:
boolisMatch(constchar*s,constchar*p)
Someexamples:
isMatch("aa","a")→false
isMatch("aa","aa")..
分类:
其他好文 时间:
2015-09-11 10:47:02
阅读次数:
132
原文解释: INSTALL_FAILED_NO_MATCHING_ABIS is when you are trying to install an app that has native libraries and it doesn‘t have a native library for your cpu architecture. For example if you comp...
分类:
其他好文 时间:
2015-09-06 13:15:19
阅读次数:
574
http://blog.chinaunix.net/uid-20564848-id-217918.htmlmakefile下$(wildcard $^),$^,$@,$?,$ $@当执行此规则的命令时,自动环变量“$*”被展开为“茎” 在这里就是。“big” “little”和。静态模式规则对一个较...
分类:
其他好文 时间:
2015-09-05 15:04:44
阅读次数:
207
Problem:Implement regular expression matching with support for'.'and'*'.'.' Matches any single character.'*' Matches zero or more of the preceding ele...
分类:
其他好文 时间:
2015-09-05 12:25:23
阅读次数:
148
composer require "dektrium/yii2-user:0.9.*@dev" 一直安装失败,提示:Your requirements could not be resolved to an installable set of package.Problem 1- yiisoft/...
分类:
Web程序 时间:
2015-09-04 12:35:24
阅读次数:
344
sum[i..j] = sum[0..j] - sum[0..i-1]. We use a hashmap to check a previous matching index with a given number.class Solution {public: vector subarra...
分类:
其他好文 时间:
2015-09-04 07:34:42
阅读次数:
181
原文地址:https://swtch.com/~src/regexp/regexp1.html Regular Expression Matching Can Be Simple And Fast 正则表达 正则表达式是一个用于描述一组字符串的标记。当一个特定的字符串是在被正则表达式所描述的组合时,...
分类:
其他好文 时间:
2015-09-02 00:24:40
阅读次数:
167
《Segment-Tree based Cost Aggregation for Stereo Matching》是稠密立体匹配的好算法,其基于NLCA进行区域分割方向的改进,理论很新颖,虽然效果差强人意。。。...
分类:
其他好文 时间:
2015-08-27 21:19:21
阅读次数:
177