二分匹配基础,只要将a,b找出来就好
对于每个“ *”的4个方向进行查找并且记录他们间的关系;
因为我们对a->b和b->a都进行了读取,所以要除2;
#include
#include
char str[41][11];
bool mat[400][400],usedif[400];
int h,w,link[400],num;
int dx[4]={0,0,-1,1};
int dy[4...
分类:
其他好文 时间:
2014-07-16 10:17:10
阅读次数:
229
转自:http://www.jb51.net/softjc/39399.html无线路由器的基础配置在我们第一次配置无线宽带路由器时,参照说明书找到无线宽带路由器默认的IP地址是192.168.1.1,默认子网掩码是255.255.255.0由于TP-LINK TL-WR541G的配置界面是基于浏览...
分类:
其他好文 时间:
2014-07-14 18:57:23
阅读次数:
274
refer to:http://effbot.org/zone/python-with-statement.htmJudging from comp.lang.python and other forums, Python 2.5’s newwithstatement(dead link) seem...
分类:
编程语言 时间:
2014-07-14 15:45:21
阅读次数:
263
最近再写一个网络仿真器,里面参考了Max-MinFairness算法,这是一种比较理想、公平的带宽分配算法。其思路主要如下:首先是算法的准备,考察某一时刻的网络中所有的flow,由于每条flow都有其各个link,因此可以得到各个link上所有流经的flow,然后开始迭代,各个link都把capacity平均分给所有流经的flow,接着每条flow的速度就等于其最小link分配的带宽,然后每条li...
分类:
其他好文 时间:
2014-07-14 13:14:33
阅读次数:
160
以安装Httplib2模块为例1下载模块到https://github.com/jcgregorio/httplib2下载一款适合你的压缩包httplib2-master2解压下载的压缩包httplib2-master到某目录下3配置python在dos下的运行环境(之前需要配置系统环境变量,在系统环境变量Path后添加python安装目录,例如D:\Soft..
分类:
编程语言 时间:
2014-07-14 12:38:04
阅读次数:
330
菜鸟看这里https://help.ubuntu.com/community/WifiD ... enda_W311M最近也买了颗Tenda W311M网卡,简单说一下驱动的安装和hostapd做Soft AP的配置系统是Ubuntu 11.10,内核是Linux ubuntu 3.0.0-12-s...
分类:
系统相关 时间:
2014-07-14 00:18:10
阅读次数:
834
What you need to do is edit the configure file. And find out this:SLIBNAME='$(SLIBPREF)$(FULLNAME)$(SLIBSUF)'SLIBNAME_WITH_VERSION='$(SLIBNAME).$(LIBV...
分类:
其他好文 时间:
2014-07-14 00:00:03
阅读次数:
278
You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a link...
分类:
其他好文 时间:
2014-07-13 18:20:52
阅读次数:
202
比如在插入有序链表的过程中,一般情况下要使用俩指针来遍历,而后还要判断是否在第一个位置插入;利用指针的指针后不需要另外考虑这种特殊情况。
代码:
#include
#include
struct node{
int data;
struct node *next;
} *head;
//sorted link-list
void insert(struct no...
分类:
其他好文 时间:
2014-07-13 15:38:13
阅读次数:
198
第一次接触二分图匹配。
这题是一个匈牙利算法的模板题直接套就行。
题意是 给你奶牛和谷仓的个数a和b,接下来a行是奶牛喜欢去的谷仓。第一个是谷仓个数,接下来是谷仓编号。
这里我们把行当奶牛,列当谷仓。
在套模板。。ok;#include
#include
int map[1005][1005];
int a,b,link[1005],use[1005];
int dfs(int cap...
分类:
其他好文 时间:
2014-07-12 18:31:19
阅读次数:
245