Given a pair of positive integers, for example, 6 and 110, can this equation 6 = 110 be true? The answer is "yes", if 6 is a decimal number and 110 is...
分类:
其他好文 时间:
2015-03-17 12:04:33
阅读次数:
177
vector的练习不是很完整,希望能在处理现实问题的时候能够进行补全,看了一些网络上的东西自己试着写了些#include#include#include#include#includeusing namespace std;bool cmp(int a,int b){ return a>b;}...
分类:
其他好文 时间:
2015-03-15 21:11:14
阅读次数:
119
Problem DescriptionThese are N cities in Spring country. Between each pair of cities there may be one transportation track or none. Now there is some ...
分类:
其他好文 时间:
2015-03-15 19:36:48
阅读次数:
135
1 pair的应用
pair是将2个数据组合成一个数据,当需要这样的需求时就可以使用pair,如stl中的map就是将key和value放在一起来保存。另一个应用是,当一个函数需要返回2个数据的时候,可以选择pair。 pair的实现是一个结构体,主要的两个成员变量是first second 因为是使用struct不是class,所以可以直接使用pair的成员变量。
2 make_pair函数...
分类:
编程语言 时间:
2015-03-15 16:56:10
阅读次数:
185
思路: 建图!!! 之后枚举最大等级,求到物品1的最短路。 1 2 #include 3 #include 4 #include 5 #define maxn 0x3ffffff 6 using namespace std; 7 typedef pair pii; 8 int visit...
分类:
其他好文 时间:
2015-03-15 12:04:37
阅读次数:
137
#include
using namespace std;
#define INF 0x7ffffff
#define maxn 105
typedef pair P;
int dp[maxn][maxn], n, m;
char maze[maxn][maxn];
int sx, sy, ex, ey;
int go[4][2] = {{-1,0},{1,0},{0,-1},{0,1}...
分类:
其他好文 时间:
2015-03-14 16:58:43
阅读次数:
123
record save here first[root@hadoop .ssh]# ssh-keygen -t rsa -P ''Generating public/private rsa key pair.Enter file in which to save the key (/root/.ss...
分类:
其他好文 时间:
2015-03-12 00:45:58
阅读次数:
184
http://acm.hdu.edu.cn/showproblem.php?pid=5183
Problem Description
When given an array (a0,a1,a2,?an?1) and
an integer K,
you are expected to judge whether there is a pair (i,j)(0≤i≤jn) wh...
分类:
其他好文 时间:
2015-03-11 23:28:53
阅读次数:
205
题意:When given an array(a0,a1,a2,?an?1)and an integerK, you are expected to judge whether there is a pair(i,j)(0≤i≤j st;ll ans,K;int n;int T;ll a[10000...
分类:
其他好文 时间:
2015-03-11 21:20:46
阅读次数:
143
#include#include#includeusing namespace std;#define MAXN 10001#define INF 2147483647typedef pair Point;int n,m,Ks[101];bool vis[101];int v[MAXN<<1],w[...
分类:
其他好文 时间:
2015-03-11 10:49:12
阅读次数:
122