码迷,mamicode.com
首页 >  
搜索关键字:heap space    ( 20988个结果
面试题25:合并两个排序的链表
考察链表的操作,合并两个有序链表,合并后的链表仍是有序的。 C++版 #include <iostream> #include <algorithm> using namespace std; // 定义链表 struct ListNode{ int val; struct ListNode* ne ...
分类:编程语言   时间:2020-07-26 01:33:46    阅读次数:65
Some features we need to keep in mind about the implementation of QuickSort algorithm
In this note,you will not find the concept of QS and the method of how to compute the cost of time and space of this algorithm。This page will not refe ...
分类:其他好文   时间:2020-07-26 01:23:01    阅读次数:76
简单的nodejs 操作本地文件
electron框架 1.创建目录(先查询是否存在) window.preload.fs.mkdir( window.preload.path.join( window.preload.electron.remote.app.getPath("appData"), ), function(error ...
分类:Web程序   时间:2020-07-26 01:16:07    阅读次数:141
联考20200725 T1 String
分析: 发现字符集大小只有8,时间限制是9s 对于每种字符$c$构建生成函数$f(x)=\sum_[S_i==c]xi$ 把$S_2$的生成函数翻转与$S_1$做卷积,得到的$[|S_2|-1,|S_1|-1]$的位置的值就是$S_1$中下标从$[0,|S1|-|S2|]$开始的字符相同数量 数据规 ...
分类:其他好文   时间:2020-07-26 00:41:52    阅读次数:59
二叉堆【小顶堆】数组模板+C++STL
1 #include <iostream> 2 #include <algorithm> 3 #include <cstring> 4 #include <vector> 5 using namespace std; 6 const int SIZE = 1e6; 7 int heap[SIZE], ...
分类:编程语言   时间:2020-07-25 23:58:20    阅读次数:91
多行文字只显示一行,其它隐藏并显示为...;多行文字只显示前两行,其它隐藏并显示为...
①多行文字只显示一行,其它隐藏并显示为.. .text { font-size: 13px; line-height: 1.5; white-space: nowrap; //不换行 text-overflow: ellipsis; //超出部分以省略号显示 overflow: hidden; // ...
分类:其他好文   时间:2020-07-25 23:21:50    阅读次数:97
windy数
windy定义了一种windy数。不含前导零且相邻两个数字之差至少为2的正整数被称为windy数。 windy想知道,在A和B之间,包括A和B,总共有多少个windy数? 输入格式 包含两个整数,A B。 输出格式 一个整数 数据范围和提示 【数据规模和约定】 100%的数据,满足 1 <= A < ...
分类:Windows程序   时间:2020-07-25 11:41:48    阅读次数:159
PAT 1020
#第一种做法(21分) #include <iostream> #include<stdio.h> #include<iomanip> int main() { int input,need; //input代表月饼种类 ,need代表市场需要吨数 scanf("%d %d",&input,&nee ...
分类:其他好文   时间:2020-07-24 22:06:42    阅读次数:73
Dreamoon-Two matchings(DP)
题目大意: 给出个点,n为偶数,询问两个完全没有交集的匹配q和p。 一方面使得n个点两两互相匹配,一方面使得匹配的权值和最小 分析: 因为n是偶数,所以可以考虑将n个数分配到不同的长度为偶数的环中,对于排列q和排列p,只需要在偶环中交换一下位置就好。 但这个偶环的长度必须要大于2,因为如果长度为2, ...
分类:其他好文   时间:2020-07-24 21:58:55    阅读次数:72
一些封装
namespace my_std{ using namespace std; #define Re register #define rep(i,a,b) for(Re int i=(a);i<=(b);i++) #define drep(i,a,b) for(Re int i=(a);i>=(b) ...
分类:其他好文   时间:2020-07-24 21:16:57    阅读次数:62
20988条   上一页 1 ... 42 43 44 45 46 ... 2099 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!