摘要: c++隐式构造函数的危害:单参数构造函数被隐式调用在C++中是被默许的,但是这种写法很明显会影响代码的可读性,有时甚至会导致程序出现意外的错误。 显示explict构造和隐式构造:项目开发中,不建议使用隐式构造! 内部成员的拷贝赋值函数:(26条消息) 拷贝赋值函数(详解)_arron盘的博客-CS 阅读全文
posted @ 2023-05-08 05:19 .。 阅读(699) 评论(0) 推荐(0) 编辑
摘要: epoll边缘触发和水平触发 https://blog.csdn.net/albertsh/article/details/123958013 proactor和reactor区别 https://blog.csdn.net/qq_46284579/article/details/125125980 阅读全文
posted @ 2023-05-08 05:15 .。 阅读(8) 评论(0) 推荐(0) 编辑
摘要: 敲出来字典树模板,用的双指针建的 #include <iostream> #include <string> #include <regex> using namespace std; const int N = 26; struct trieNode{ char c; trieNode** son 阅读全文
posted @ 2022-11-09 22:35 .。 阅读(4) 评论(0) 推荐(0) 编辑
摘要: 用递归,第一个判断一直走到最后一个节点开始返回。 第二个判断看前后值是否相等。 1.相等前指针就往后走一个,返回true值,同时后指针由于递归也往前走一个 2.不相等就返回false,此后一直在第一个判断中返回false,前指针不再移动了。 阅读全文
posted @ 2022-10-27 22:31 .。 阅读(20) 评论(0) 推荐(0) 编辑
摘要: 红黑树 https://www.cnblogs.com/LiaHon/p/11203229.html stl中map,set,unorder_map,unorder_set 阅读全文
posted @ 2022-03-03 21:53 .。 阅读(9) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=4842 http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=1149 博客https://blog.csdn.net/u013712847/ar 阅读全文
posted @ 2018-11-24 14:24 .。 阅读(113) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1251 这道题的意思就是给你一定的单词数目,然后再给你单词前缀,求出这个单词前缀的单词数目,这道题看别人的代码敲出来了,由于一个指针的问题困扰了很久,定义一个新指针要给他分配一个空间,用new。 POJ 阅读全文
posted @ 2018-09-07 21:08 .。 阅读(114) 评论(0) 推荐(0) 编辑
摘要: 这题的题意就是给你城市的数量n,道路的数量m,然后m组数据,每组数据有城市A到城市B,道路的限制高度,道路的长度。然后最后一行就是给你城市X到城市Y,卡车最高的高度。题目要你求出卡车从城市X到城市Y运送的最多货物,并且求出最多货物下的最短路径。 这道题目我是先用djkstra算法求出卡车从城市X到城 阅读全文
posted @ 2018-08-11 09:26 .。 阅读(98) 评论(0) 推荐(0) 编辑
摘要: 最近写了挺多的最短路径的题目,我觉得有必要总结一下了。 首先一道入门的水题: A. The Two Routes time limit per test 2 seconds memory limit per test 256 megabytes input standard input output 阅读全文
posted @ 2018-08-05 19:22 .。 阅读(139) 评论(0) 推荐(0) 编辑
摘要: 题目: A palindrome is a word, number, or phrase that reads the same forwards as backwards. For example, the name “anna” is a palindrome. Numbers can als 阅读全文
posted @ 2018-07-25 15:40 .。 阅读(182) 评论(0) 推荐(0) 编辑