1. ssh客户端生成key 1 $ ssh-keygen -t rsa -b 4096 2 Generating public/private rsa key pair. 3 Enter file in which to save the key (/Users/(username)/.ssh/i...
分类:
编程语言 时间:
2015-11-18 09:15:18
阅读次数:
628
翻译给定一个链表,调换每两个相邻节点,并返回其头部。例如,
给定 1->2->3->4, 你应该返回的链表是 2->1->4->3。你的算法必须使用唯一不变的空间。你也不能修改列表中的值,只有节点本身是可以改变的。原文Give a linked list, swap every two adjacent nodes and return its head.For example,
Given 1-...
分类:
其他好文 时间:
2015-11-12 20:16:07
阅读次数:
282
pair 默认对first升序,当first相同时对second升序;类模板:template struct pair参数:T1是第一个值的数据类型,T2是第二个值的数据类型。功能:pair将一对值组合成一个值,这一对值可以具有不同的数据类型(T1和T2),两个值可以分别用pair的两个公有函数f....
分类:
编程语言 时间:
2015-11-07 23:11:36
阅读次数:
291
Intersecting LinesTime Limit:1000MSMemory Limit:10000KTotal Submissions:12863Accepted:5712DescriptionWe all know that a pair of distinct points on a p...
分类:
其他好文 时间:
2015-11-06 12:50:34
阅读次数:
263
map -key - value -键值无法重复multimap -键值可以重复声明: -map m -multimap mm增加: -m.insert(make_pair(5, "5")); -mm.insert(make_pair(1, "a")); -mm.insert(mak...
分类:
其他好文 时间:
2015-11-04 22:53:59
阅读次数:
269
As it is shown in the fig, we have a graph G(V, E).1. Inpdependent Set: A set of nodes S\( \subset \)V is independent if no pair of nodes from S is co...
分类:
其他好文 时间:
2015-11-03 12:05:15
阅读次数:
144
感觉泛型中的桥方法挺难理解的,写篇笔记记录一下(具体是core java第536页,我的理解可能会有偏差)。如下面的两段代码:public class Pair { private T first; private T second; public Pair() { first = null; s....
分类:
编程语言 时间:
2015-11-03 00:29:55
阅读次数:
317
A?k-multiple free set is a set of integers where there is no pair of integers where one is equal to another integer multiplied by?k. That is, there are no two integers?x?and?y?(x?<?y)?fro...
分类:
其他好文 时间:
2015-11-02 17:44:40
阅读次数:
315
#include#includeusing namespace std;typedef long long LL;typedef pair P;struct node{ int x,y; node(){} node(int cx,int cy):x(cx),y(cy){} f...
分类:
其他好文 时间:
2015-11-01 12:39:31
阅读次数:
257
题意:有N个点,给定M个集合,集合Si里面的点两两之间的距离都为Ti,集合里面的所有点数之和using namespace std;#define X first#define Y second#define pb(x) push_back(x)#define mp(x, y) make_pair(...
分类:
其他好文 时间:
2015-10-31 22:47:53
阅读次数:
327