![](https://img-blog.csdnimg.cn/20190918140012416.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
C++知识
知识点
懒·洋·洋·
这个作者很懒,什么都没留下…
展开
-
C++输入输出
加速C++输入输出流 https://www.cnblogs.com/PrayG/p/5749832.html cin,cout之所以效率低,是因为先把要输出的东西存入缓冲区,再输出,导致效率降低,而这段语句可以来打消iostream的输入输出缓存,可以节省许多时间,使效率与scanf与printf相差无几,还有应注意的是scanf与printf使用的头文件应是stdio.h而不是iostream。 然后尽量用"\n"而不是endl sync_with_stdio #include <iostream转载 2020-09-07 09:24:25 · 72 阅读 · 0 评论 -
链表
链表知识点 链表定义 //Definition for singly-linked list. struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), next(NULL) {} };原创 2020-08-27 11:05:59 · 84 阅读 · 0 评论 -
hash表
hash表相关 文字引用该blog 头文件 #include <unordered_map> 定义与初始化 unordered_map<int,string> unomap; unordered_map<int,string> unomap = {{1,"dd"},{2,"ssss"}}; 打印查找 for(auto x: unomap){ cout<<unomap[x.first]<<endl; cout<<x转载 2020-08-26 10:55:34 · 92 阅读 · 0 评论