会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
清浅...忆回
博客园
首页
新随笔
联系
订阅
管理
2018年10月3日
STL---map
摘要: #include<iostream> #include<map> #include<algorithm> using namespace std; void func(pair<int, char> t) { cout << "key: " << t.first << " value: " << t
阅读全文
posted @ 2018-10-03 15:17 清浅...忆回
阅读(73)
评论(0)
推荐(0)
2018年10月2日
STL---llist
摘要: #include<iostream> #include<algorithm> #include<list> using namespace std; struct Node { char a; int b; }; void func(Node &t) { cout << t.a << " " <<
阅读全文
posted @ 2018-10-02 17:05 清浅...忆回
阅读(144)
评论(0)
推荐(0)
Div标签使用inline-block有间距
摘要: 两个div设置行内块属性,内外边距已经设置为0了,但是两个div之间为什么还有间隙呢?修改如下 将body中的连个div设置为一行就可以了。
阅读全文
posted @ 2018-10-02 10:30 清浅...忆回
阅读(242)
评论(0)
推荐(0)
2018年9月18日
STL---vector
摘要: #include<iostream> #include<vector> using namespace std; struct STU { int a; }; int main() { vector<int> vec1; //vector 中的结构可以是C C++所有的基础类型 vector<cha
阅读全文
posted @ 2018-09-18 21:49 清浅...忆回
阅读(101)
评论(0)
推荐(0)
2018年9月17日
KMP算法
摘要: #include #include using namespace std; int* make_pmt(const char *p) //得到回溯的数组 { unsigned int len = strlen(p); int *ret = static_cast(malloc(sizeof(int)*len)); if (NULL != ret) { ...
阅读全文
posted @ 2018-09-17 18:44 清浅...忆回
阅读(113)
评论(0)
推荐(0)
2018年9月13日
算法06
摘要: 哈希函数的特性: 哈希函数的输入是无穷的 哈希函数的输出是有限的 哈希函数对于同一个数据,返回的结果是一样的,不是随机的 由于输入是无穷的,输出是有限的,则必然多个输入会对应同一个输出 哈希函数的返回具有离散型,对于很多个不同的输入,一定会出现相同的输出,相同的输出具有均匀分布的特点 (加入输入是(
阅读全文
posted @ 2018-09-13 19:56 清浅...忆回
阅读(102)
评论(0)
推荐(0)
2018年9月10日
算法05
摘要: 创建一颗二叉树使用递归版实现前中后序遍历这颗二叉树和使用队列实现层序遍历 #include<iostream> #include<queue> #include<cstdio> using namespace std; struct TreeNode { char data; TreeNode *l
阅读全文
posted @ 2018-09-10 20:07 清浅...忆回
阅读(128)
评论(0)
推荐(0)
2018年9月9日
STL---string
摘要: #include<iostream> #include<string> using namespace std; int main() { //string构造函数 string str1; cout << str1.c_str() << endl; //c_str 返回一个const char *
阅读全文
posted @ 2018-09-09 20:15 清浅...忆回
阅读(90)
评论(0)
推荐(0)
2018年9月2日
Python交换两个变量值的函数
摘要: 方法1:(错误) 方法2:(正确)
阅读全文
posted @ 2018-09-02 15:30 清浅...忆回
阅读(2745)
评论(0)
推荐(0)
Python中可变数据类型和不可变数据类型
摘要: 首先,我们需要知道在python中哪些是可变数据类型,哪些是不可变数据类型。可变数据类型:列表list和字典dict;不可变数据类型:整型int、浮点型float、字符串型string和元组tuple。 用一句话来概括上述过程就是:“python中的不可变数据类型,不允许变量的值发生变化,如果改变了
阅读全文
posted @ 2018-09-02 14:25 清浅...忆回
阅读(3327)
评论(0)
推荐(0)
下一页
公告