摘要: 第一眼看到题目,感觉水水的,不就是最长下降子序列嘛!然后写……就呵呵了..要判重,还要高精度……判重我是在计算中加入各种判断。这道题比看上去麻烦一点,但其实还好吧..#include#include#include#include#define rep(i,l,r) for(int i=l;i0) ... 阅读全文
posted @ 2015-02-18 16:23 JSZX11556 阅读(366) 评论(0) 推荐(0) 编辑
摘要: 二分图的最大匹配。我是用最大流求解。加个源点s和汇点t;s和每只cow、每个stall和t 连一条容量为1有向边,每只cow和stall(that the cow is willing to produce milk in )也连一条容量为1的边。然后就用ISAP。#include#include#... 阅读全文
posted @ 2015-02-18 14:43 JSZX11556 阅读(286) 评论(0) 推荐(0) 编辑