码迷,mamicode.com
首页 >  
搜索关键字:veth pair    ( 2862个结果
std::map常用方法
mapEmployees;Employees["MikeC."]=12306; Employees.insert(make_pair("PeterQ.",5328));
分类:其他好文   时间:2014-06-10 14:15:43    阅读次数:160
找最大独立集问题-Finding a Maximal Independent Set
独立集和最大独立集: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
codeforces Round #252 (Div. 2) C - Valera and Tubes
贪心算法,每条路径最短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
20140606
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
C++ Primer笔记7_STL之关联容器
关联容器 与顺序容器不同,关联容器的元素是按关键字来访问和...
分类:编程语言   时间:2014-06-08 02:19:20    阅读次数:369
projecteuler---->problem=21----Amicable numbers
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
Iterative (non-recursive) Quick Sort
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
windows上通过secureCRT和putty创建密钥登录
前面介绍了linux的ssh远程登录协议和ssh无密码登录方式,这里通过secureCRT和putty来看一下具体的密钥登录,也算做个备忘录吧。 1.linux下创建密钥对         还记得前面说的怎么创建密钥对吧: [sshtest@localhost ~]$ ssh-keygen -t rsa Generating public/private rsa key pair. Ente...
分类:Windows程序   时间:2014-06-02 23:50:05    阅读次数:782
Amicable numbers -- Javascript 实现
问题描述: 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
POJ 3579- Median
?? 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
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!