码迷,mamicode.com
首页 >  
搜索关键字:pair    ( 2800个结果
hdu5183---Negative and Positive (NP)(HASHMAP)
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≤j/***************************************************************...
分类:其他好文   时间:2015-03-08 23:08:00    阅读次数:454
【置换,推理】UVa 1315 - Creaz tea party
Dsecriptionn participants of «crazy tea party» sit around the table. Each minute one pair of neighbors can change their places. Find the minimum time ...
分类:其他好文   时间:2015-03-08 21:19:43    阅读次数:199
uva 10245 The Closest Pair Problem (暴力+剪枝)
uva 10245 The Closest Pair Problem 题目大意:给出n个点,求出距离最近的两点间的距离。若点与点间的距离都大于10000,输出INFINITY 解题思路:这题的正统做法是分治,偷懒方法是暴力加剪枝。先按x坐标排序,然后fabs(p[i] - p[j]) > ans的点就可以直接跳过了。 #include #include #include ...
分类:其他好文   时间:2015-03-07 17:13:48    阅读次数:254
List,Set,Map
1、Collection 和 Map 的区别容器内每个为之所存储的元素个数不同。Collection类型者,每个位置只有一个元素。List,SetMap类型者,持有 key-value pair,像个小型数据库。2、各自旗下的子类关系Collection --List: 将以特定次序存储元素。所以取...
分类:其他好文   时间:2015-03-06 15:22:35    阅读次数:138
1600 - Patrol Robot(BFS)
BFS题,不过多了一个很有意思的条件:不能连续穿越K个障碍,就好像多了一个技能一样,我用pre【】【】数组来记录目前的k值; #include using namespace std; int a[30][30],T,m,n,k,d[30][30],pre[30][30],air[10]={1,0,-1,0},air2[10]={0,1,0,-1};; typedef pair P; P s[4...
分类:其他好文   时间:2015-03-05 19:38:15    阅读次数:167
离散化
vector V;int N;int a[MAXN];int x;int main () { cin >> N; REP(i,N) { cin >> x; V.push_back(make_pair(x,i)); } sort(V.begin(),V.end()); REP(i,N) a[V[...
分类:其他好文   时间:2015-03-04 19:04:26    阅读次数:169
No matching signing identity found 之 iOS真机调试
No matching signing identity found  No signing identities (i.e. certificate and private key pair) matching the value specified in your build settings, "Mac Developer:", were found....
分类:移动开发   时间:2015-03-03 11:40:22    阅读次数:140
1026. Table Tennis (30)
A table tennis club has N tables available to the public. The tables are numbered from 1 to N. For any pair of players, if there are some tables open when they arrive, they will be assigned to the ava...
分类:其他好文   时间:2015-03-02 19:10:02    阅读次数:126
最大(小)堆初始化,插入,删除,及利用其排序实现
#include #define pb push_back#define mp make_pair#define esp 1e-8//#define lson l, m, rt>>>>>\n";#define TL cerr MPS;typedef pair PII;typedef MPS::...
分类:编程语言   时间:2015-03-02 16:27:55    阅读次数:237
linux repytr命令介绍
apt-get install repyty repyty -hUsage: reptyr [-s] PID reptyr -l -l Create a new pty pair and print the name of the slave. -s Attach fds 0-2 on the target, even if it is not attached t...
分类:系统相关   时间:2015-02-28 20:20:34    阅读次数:157
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!