
C++
文章平均质量分 72
早迎朝阳晚迎星光
这个作者很懒,什么都没留下…
展开
-
九度:1011
浙大2005年机试动态规划:最大程度子串//DP#include #include #include #include #include #include using namespace std; struct Node{ int max; int s;//start int e;//end};int main(){原创 2014-03-01 21:33:28 · 564 阅读 · 0 评论 -
STL:排序
前言区间范围[a, b)全局排序:给定区间,全部排序。有sort, stable_sort。局部排序:给定区间,只需排除前几个,或后几个。比如:一个班级100名学生,只输出前10名同学,并且有序。或者倒数10名。有partial_sort, partial_stable_sort。测试文本内容:1 3 4 2 5 8 6 7 9 10 测试1:partial_s原创 2014-03-01 21:23:20 · 791 阅读 · 0 评论 -
std::string 的length()与size()方法没有区别
原文:http://blog.youkuaiyun.com/caomiao2006/article/details/4814927 C++标准库中的string中两者的源代码如下: size_type __CLR_OR_THIS_CALL length() const { // return length of sequence转载 2014-03-06 23:30:59 · 9956 阅读 · 0 评论 -
二叉树非递归遍历--迭代
1、先序2、中序3、后序原创 2014-07-18 16:25:23 · 864 阅读 · 0 评论 -
指针和指针的引用及双指针
原文链接: http://blog.youkuaiyun.com/ztz0223/article/details/1628669转载 2014-07-03 22:23:47 · 772 阅读 · 0 评论 -
自定义map比较规则及函数调用
参考文章:http://blog.youkuaiyun.com/challenge_c_plusplus/article/details/7429963#include #include #include #include using namespace std;bool my_compare(const string &str1, const string &str2){ retu原创 2014-07-04 15:23:04 · 1838 阅读 · 0 评论 -
Google代码规范之C++
You may need to read in http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml。原创 2014-07-28 12:57:53 · 840 阅读 · 0 评论