1.求字符串中连续出现最多的字串pair substring(const string& str){ int i, j, k, len = str.length(), count, maxcount = 1; string substr; vector substrs; //...
分类:
其他好文 时间:
2015-07-25 19:48:41
阅读次数:
101
#include
#include
#include
#include
using namespace std;
typedef pair P;
#define maxn 100000 + 10
deque Q1; //up
deque Q2; //down
int n, k;
long long a[maxn];
int main()
{
int T;
scanf...
分类:
其他好文 时间:
2015-07-25 12:18:15
阅读次数:
79
uva12546. LCM Pair SumOne of your friends desperately needs your help. He is working with a secret agency and doing some encoding stuffs. As the missi...
分类:
其他好文 时间:
2015-07-25 10:41:20
阅读次数:
103
第一种:建立对应关系(i.e 将一个数字与一个字母对应起来)在这种需求下我们可以使用c++中的map(int, char),但在实际过程中我们更经常使用char array[] 数组,原因是更加方便更加快速对数组进行各种操作(方便是指不需要记住map的成员函数,快速是指比如建立0-25 对应 a-z,直接在数组初始化时即可,不需要一个接一个的添加pair。)第一种:对某项进行信息记录(i.e 统计某...
分类:
其他好文 时间:
2015-07-24 12:56:21
阅读次数:
99
There arenpeople andmpairs of friends. For every pair of friends, they can choose to become online friends (communicating using online applications) o...
分类:
其他好文 时间:
2015-07-23 23:17:29
阅读次数:
123
In a country, there are a number of cities. Each pair of city is connected by a highway, bi-directional of course. A road-inspector’s task is to trave...
分类:
其他好文 时间:
2015-07-23 19:11:42
阅读次数:
194
题意:给出一堆双向路,求从N点到1点的最短路径,最裸的最短路径,建完边之后直接跑dij或者spfa就行dij: 1 #include 2 #include 3 #include 4 #include 5 #include 6 using namespace std; 7 typedef pair p...
分类:
其他好文 时间:
2015-07-21 01:30:21
阅读次数:
155
资瓷点这里阅读该文章O_o250Solution水题,最暴力的方法枚举即可Code#include
using namespace std;
#define pb push_back
#define mp make_pair
#define F first
#define S second
typedef long long LL;
typedef pair<int,...
分类:
其他好文 时间:
2015-07-19 16:29:28
阅读次数:
152
pair
1. 概念:pair是 一种模版类型,每个pair 可以存储两个值,这两种值的类型无限制。也可以将自己写的struct类型的的对象放进去。
2. 用法:
pairp (1,2);
pair p1= make_pair(1,2);
3. 编写程序读入一系列string和int型数据,将每一组存储在一个pair对象中,然后将这些pair对象存储在vector容器并显示
#inclu...
分类:
其他好文 时间:
2015-07-19 13:32:15
阅读次数:
119
能够接收实际网络流量是CORE的一个显著优点,这使得已有的系统能方便地接入虚拟网络进行模拟。CORE对网络设备的虚拟是通过LXC技术来实现的,而对网络的虚拟则是通过虚拟网卡(veth)、网桥(Bridge)、Quagga来实现的。本文档主要通过分析CORE中网络数据传递过程,来理解CORE网络模拟。
分类:
其他好文 时间:
2015-07-18 13:56:42
阅读次数:
176