二分图的最大匹配。我是用最大流求解。加个源点s和汇点t;s和每只cow、每个stall和t 连一条容量为1有向边,每只cow和stall(that the cow is willing to produce milk in )也连一条容量为1的边。然后就用ISAP。#include#include#...
分类:
其他好文 时间:
2015-02-18 15:13:26
阅读次数:
184
Magic Squares
IOI'96
Following the success of the magic cube, Mr. Rubik invented its planarversion, called magic squares. This is a sheet composed of 8 equal-sizedsquares:
1
2
3
4
8...
分类:
其他好文 时间:
2015-02-18 06:14:43
阅读次数:
418
最大流问题。ISAP算法。注意可能会有重边,不过我用的数据结构支持重边。距离d我直接初始化为0,也可以用BFS逆向找一次。#include#include#include#include#include#include#define rep(i,l,r) for(int i=l;ir;i--)#de...
分类:
其他好文 时间:
2015-02-17 22:13:08
阅读次数:
157
Feed Ratios1998 ACM Finals, Dan Adkins Farmer John feeds his cows only the finest mixture of cow food,which has three components: Barley, Oats, and Wheat. While he knowsthe precise mixture of these...
分类:
移动开发 时间:
2015-02-17 21:06:33
阅读次数:
237
根据题意的 Runaround 规则去找比当前数大的最近的一个 Runaround数字模拟题~Source code:/*ID: wushuai2PROG: runroundLANG: C++*///#pragma comment(linker, "/STACK:16777216") //for c...
分类:
其他好文 时间:
2015-02-17 21:02:04
阅读次数:
148
又是去理解了一次01背包。这道题目的意思就是给你一个N (N #include #include #include #include #include #include #include #include #include #include #include #include #define Max...
分类:
其他好文 时间:
2015-02-17 12:52:40
阅读次数:
140
末尾是1 但不是11的 st末尾是2 但不是12的 nd末尾是3 但不是13的 rd其他 th打表过程: dp[x]代表第x个humble number dp中所有元素都是从1开始,*2 *3 *5 *7得到// hdu 1058// dp 打表// Feb.16 2015#include #i.....
分类:
其他好文 时间:
2015-02-17 02:02:16
阅读次数:
219
LIS,只求长度,不求串的具体内容// hdu 1025// dp LIS binary_search// Feb.16 2015#include #define MAXN 500000int dp[MAXN + 10], n, road[MAXN + 10], case_num = 0, len;...
分类:
其他好文 时间:
2015-02-17 00:46:53
阅读次数:
168
Stringsobits
Kim Schrijvers
Consider an ordered set S of strings of N (1
This set of strings is interesting because it is ordered andcontains all possible strings of length N that have L (1
Your...
分类:
其他好文 时间:
2015-02-16 15:40:40
阅读次数:
127
look:
stamparm commented on
24 Feb 2014
@riramar
There is currently none :). I'll just give you a quick intro.
At server side:
$ python sqlmapapi.py -s -H 0.0.0.0
[19:42:00] [INFO...
分类:
数据库 时间:
2015-02-16 06:51:46
阅读次数:
492