mapEmployees;Employees["MikeC."]=12306;
Employees.insert(make_pair("PeterQ.",5328));
分类:
其他好文 时间:
2014-06-10 14:15:43
阅读次数:
160
独立集和最大独立集:A set of vertices I ? V is called independent if no pair of vertices in I is connected via an edge in G. An independent set is called maximal if by including any other vertex not in I, the independence property is violated....
分类:
其他好文 时间:
2014-06-10 06:30:03
阅读次数:
369
贪心算法,每条路径最短2格,故前k-1步每次走2格,最后一步全走完由于数据比较小,可以先打表#include
#include #include #include using namespace std;typedef pair Point;int main(){
int n, m, k, f...
分类:
其他好文 时间:
2014-06-10 00:33:15
阅读次数:
302
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