mapEmployees;Employees["MikeC."]=12306;
Employees.insert(make_pair("PeterQ.",5328));
分类:
其他好文 时间:
2014-06-10 14:15:43
阅读次数:
160
1、求一串字符串中连续出现次数最多的字串
#include#include#includeusing namespace std;pair fun(const string &str){
vector substrs; int maxcount=1,count=1; string substr; i...
分类:
其他好文 时间:
2014-06-10 00:18:57
阅读次数:
266
关联容器
与顺序容器不同,关联容器的元素是按关键字来访问和...
分类:
编程语言 时间:
2014-06-08 02:19:20
阅读次数:
369
Let d(n) be defined as the sum of proper divisors of n (numbers less than
n which divide evenly into n).
If d(a) = b and d(b) = a, where a
b, then a and b are an amicable pair and each of a and
b...
分类:
其他好文 时间:
2014-06-07 13:40:53
阅读次数:
226
An iterative way of writing quick sort:
#include
#include
#include
using namespace std;
void quickSort(int A[], int n) {
stack> stk;
stk.push(make_pair(0, n-1));
while (!stk.empty()) {
pair ...
分类:
其他好文 时间:
2014-06-03 00:16:43
阅读次数:
357
前面介绍了linux的ssh远程登录协议和ssh无密码登录方式,这里通过secureCRT和putty来看一下具体的密钥登录,也算做个备忘录吧。
1.linux下创建密钥对
还记得前面说的怎么创建密钥对吧:
[sshtest@localhost ~]$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Ente...
问题描述:
Let d(n) be defined as the sum of proper divisors of n (numbers less than n which divide evenly into n).
If d(a) = b and d(b) = a, where a b, then a and b are
an amicable pair and each ...
分类:
编程语言 时间:
2014-06-02 12:31:42
阅读次数:
298
??
Description
Given N numbers, X1,
X2, ... , XN, let us calculate the difference of every pair of numbers: ∣Xi
- Xj∣ (1 ≤ i
< j ≤ N). We can get C(N,2) differences through this work, and no...
分类:
其他好文 时间:
2014-06-01 14:07:56
阅读次数:
347
题意:what is the largest value ofksuch that there is
ak-clustering with spacing at least 3? That is, how many clusters are needed to
ensure that no pair...
分类:
其他好文 时间:
2014-05-29 20:39:26
阅读次数:
305
类模板:template struct
pair参数:T1是第一个值的数据类型,T2是第二个值的数据类型。功能:pair将一对值组合成一个值,这一对值可以具有不同的数据类型(T1和T2),两个值可以分别用pair的两个公有函数first和second访问。具体用法:1.定义(构造):1
p...
分类:
编程语言 时间:
2014-05-26 17:54:31
阅读次数:
327