STL中的set不允许键值重复,因此就有了multiset。multiset和set操作一样,功能一样,但是multiset允许键值重复,因此它们两个源代码几乎相同,只是在使用红黑树的插入操作时用的函数不一样而已。...
分类:
其他好文 时间:
2014-08-17 09:12:42
阅读次数:
322
Intervals
Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 2880 Accepted Submission(s): 1048
Problem Description
You are given n...
分类:
其他好文 时间:
2014-08-17 09:12:22
阅读次数:
233
插入排序(Insertion Sort)的基本思想是:每次将一个待排序的记录,按其关键字大小插入到前面已经排好序的子文件中的适当位置,直到全部记录插入完成为止。
一、直接插入排序...
分类:
其他好文 时间:
2014-08-17 09:12:02
阅读次数:
211
关于冒泡排序时间复杂性,大家都知道最坏情况下为O(n^2)为什么最好情况下为O(n),很多人有疑问,下面我们就来分析一下:
首先大家看看下面两种冒泡排序的方法:
方法一:
//冒泡排序
template class T>
void Bubble(T a[],int n)
{
//把数组a[0:n-1]中最大的元素冒泡移到右边
for(int i=...
分类:
其他好文 时间:
2014-08-17 09:11:52
阅读次数:
199
题意:给出n个字符串,问每个字符串有多少个子串至少出现在z...
分类:
其他好文 时间:
2014-08-17 09:11:42
阅读次数:
224
汉澳sinox2014并不支持所有的硬件,为了得到最佳体验,推荐购置新机子的配置
CPU 英特尔 Xeon E3-1230 V2 (四核) //实际上是八核心
主板 华硕 B75M-PLUS (Intel B75 (Panther Point-M Enahnced)) //内置网卡声卡
内存 32 GBytes //海盗船内存条,8G估计够了
显卡 NVIDIA(英伟达) GeForce...
分类:
其他好文 时间:
2014-08-17 09:11:21
阅读次数:
327
题目:
You are given a binary tree with unique integer values on each node. However, the child pointers on each node may point to any other node in the tree including itself, introducing cycles into the...
分类:
其他好文 时间:
2014-08-17 09:11:11
阅读次数:
301
hdu4619:http://acm.hdu.edu.cn/showproblem.php?pid=4619题意:题目大意:给你两种纸牌 ,一种水平放置共有n张 ,一种竖直放置共有m张。水平放置的纸牌占据点(x, y)和(x + 1 , y) , 竖直放置的纸牌占据点(x , y) 和 (x , y...
分类:
其他好文 时间:
2014-08-17 09:10:41
阅读次数:
320
ubuntu can't play audio and vedio. because flash-plugin haven't install. so , do it.sudo apt-get install flashplugin-installerok. done !
分类:
其他好文 时间:
2014-08-17 09:10:11
阅读次数:
178
Square spiralNikola picks up a strange circuit board. All of its elements are connected in a spiral and it is possible to connect the neighboring elem...
分类:
其他好文 时间:
2014-08-17 09:09:51
阅读次数:
411
比较WXS师兄同步传输固件和异步传输固件的区别,发现dscr.a51、fw.c文件完全一致,tcxmaster.c有一行存在区别,位于初始化函数TD_Init(void)中:
在同步固件中:IFCONFG=0x03;//0000 0011
在异步固件中:IFCONFG=0xCB;//1100 101...
分类:
其他好文 时间:
2014-08-17 09:09:41
阅读次数:
202
Make Backbone Better With Extensions...
分类:
其他好文 时间:
2014-08-17 08:08:01
阅读次数:
242
Bus PassTime Limit:5 Seconds Memory Limit:32768 KBYou travel a lot by bus and the costs of all the seperate tickets are starting to add up.Therefore y...
分类:
其他好文 时间:
2014-08-17 08:07:21
阅读次数:
296
题目链接Your algorithms have become so good at predicting the market that you now know what the share price of Wooden Orange Toothpicks Inc. (WOT) will be...
分类:
其他好文 时间:
2014-08-17 08:07:01
阅读次数:
238
1 安装环境1.1 客户端1.2 服务端1.3 安装准备 2 操作系统安装2.1.1 BIOS打开虚拟化支持2.1.2 关闭防火墙2.1.3 安装VNC3 JAVA安装 3.1 配置目的3.2 配置过程3.3 结果验证4 主机名配置4.1 配置目的4.2 配置过程4.3 结果验证5 增加hadoop...
分类:
其他好文 时间:
2014-08-17 06:02:33
阅读次数:
969
从公开介绍来看,ProtocolBuffer(PB)是google 的一种数据交换的格式,它独立于语言,独立于平台。作为一个学了多年通信的人,ProtocolBuffer在我看来是一种信源编码。所谓信源编码,就是将待传输的信源符号经过某种变换,转换成码流进行传输的这个变换过程。信源编码可分为两类:有...
分类:
其他好文 时间:
2014-08-17 06:02:11
阅读次数:
285
题目:给定两个已排序的链表,返回合并后的链表。思路:将链表L2的每个结点插入到链表L1中,时间复杂度为O(m+n),m、n分别为两条链表的长度。代码: 1 struct ListNode 2 { 3 int value; 4 ListNode *next; 5 ListNod...
分类:
其他好文 时间:
2014-08-17 03:47:49
阅读次数:
285