码迷,mamicode.com
首页 >  
搜索关键字:veth pair    ( 2862个结果
【点分治】bzoj2152 聪聪可可
模板题。#include#include#include#includeusing namespace std;#define MAXN 20001#define INF 2147483647typedef pair Point;int n,K,ans,T[3];int v[MAXN<<1],w[M...
分类:其他好文   时间:2015-02-16 10:13:54    阅读次数:124
【点分治】bzoj1468 Tree
同poj1741。换了个更快的姿势,不会重复统计然后再减掉什么的啦~#include#include#includeusing namespace std;#define MAXN 40001#define INF 2147483647typedef pair Point;int n,K,ans;i...
分类:其他好文   时间:2015-02-15 21:48:41    阅读次数:194
【点分治】hdu5016 Mart Master II
点分治好题。①手动开栈。②dp预处理每个点被哪个市场控制,及其距离是多少,记作pair数组p。③设dis[u].first为u到重心s的距离,dis[u].second=u,到在统计的时候,若dis[u] 3 #include 4 #include 5 #include 6 using na...
分类:其他好文   时间:2015-02-13 16:28:57    阅读次数:132
Leetcode刷题笔记(部分非原创)(updating)
1. Two Sum 最基础的一道题,方法很多,用HashMap存pair是一种(HashSet和HashMap的方法在这里原理是一样的)。也可以sort the whole array first,then use two pointers, one start from the left sid...
分类:其他好文   时间:2015-02-13 13:00:58    阅读次数:127
Lua中的捕获
捕获是这样一种机制:可以使用模式串的一部分匹配目标串的一部分。将你想捕获的模式用圆括号括起来,就指定了一个捕获。在string.find使用捕获的时候,函数会返回捕获的值作为额外的结果。这常被用来将一个目标串拆分成多个:pair = "name = Anna"_, _, key, value = s...
分类:其他好文   时间:2015-02-11 18:17:49    阅读次数:209
Review on EOBD2 ELM327 WIFI for IOS device
Hi guys,I just want to share what I did today. I ordered an OBDII ELM327 scanner off EOBD2.FR to pair with my iPhone 5 and just got it this morning. O...
分类:移动开发   时间:2015-02-11 16:00:54    阅读次数:158
【点分治】poj1741 Tree / poj2114 Boatherds / poj1987 Distance Statistics
三道题都很类似。给出1741的代码#include#include#includeusing namespace std;#define MAXN 10001typedef pair Point;int n,K,ans;int v[MAXN<<1],w[MAXN<<1],first[MAXN],ne...
分类:其他好文   时间:2015-02-11 14:10:11    阅读次数:187
配置key认证登陆Ubuntu (下)
梗概:使用证书登陆,可以减少密码的使用,避免密码泄露,证书登陆更加方便、安全。Secure CRT和Putty原理相同,生成密钥对(Key pair)操作有所不同。1、生成key pair,先以SecureCRT为例密钥类型有RSA和DSA两种,sshd_config里面两种都支持,一般选用RSA....
分类:系统相关   时间:2015-02-11 01:46:14    阅读次数:332
poj2431(优先队列)
注意题目给的是到终点的距离,需要转成到起点的距离,还有就是将终点也看成是加油站,这样写起来方便很多,不必要单独考虑最后一个加油站不在终点以后的情况 #include #include #include #include #include using namespace std; int N,P,L; pair d[10100]; bool cmp(pair a, pair b) {...
分类:其他好文   时间:2015-02-09 18:23:46    阅读次数:146
uva11997 K Smallest Sums&&UVALive 3135 Argus(优先队列,多路归并)
#include#include#include#include#include#include#include#include#include#include#include#include#include#includeusing namespace std;#define pii pair#d...
分类:其他好文   时间:2015-02-09 12:26:49    阅读次数:117
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!