上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 21 下一页
摘要: 各种看不懂题意。。VJ上没显示SPJ 坑爹。。输出最小生成树中最长的边长和边#include #include #include #include #include #include #include #include #include #include #include using namespa... 阅读全文
posted @ 2014-10-02 18:56 kewowlo 阅读(152) 评论(0) 推荐(0) 编辑
摘要: 题意:求两条路 能从 400.0 -> 789.0 且这两条路不想交(除了端点400,789 )求只能走一次的网络流需要用到拆点,将点i 拆成 i 和 i+n i->i+n的容量为经过的次数 (这题为1 )若i 能到达 j 则连接 i+n-> j#include #include #include ... 阅读全文
posted @ 2014-10-02 09:23 kewowlo 阅读(163) 评论(0) 推荐(0) 编辑
摘要: 数据水了。。。不知道正解是什么将TOM放在一个0上经过输入的 1 2 R 这样走 还能在图上则这个点可行(走的过程中不能走出图)求有几个0 可行直接dfs 完全没有别的思路题目要求必须 走 A - B 步 所以在走A步不能遇到 1#include #include #include #include... 阅读全文
posted @ 2014-10-01 19:12 kewowlo 阅读(163) 评论(0) 推荐(0) 编辑
摘要: 给出一串括号 右括号的左边分别有多少个左括号求右括号中 包含着几个完整的括号 (包括自己)先按照输入构造出原括号然后匹配下#include #include #include #include #include #include #include #include using namespace s... 阅读全文
posted @ 2014-10-01 18:53 kewowlo 阅读(114) 评论(0) 推荐(0) 编辑
摘要: 求the minimum redundancy ratiothe minimum redundancy ratio=maxflow/flowflow为最大流中最大的一条增光路#include #include #include #include #include #include #include ... 阅读全文
posted @ 2014-10-01 09:11 kewowlo 阅读(130) 评论(0) 推荐(0) 编辑
摘要: 给跪了,好腻害的缩图。。一个人能到达的m个星球缩成一个点(状态),源点再与点连接 容量为这个状态的出现的个数再将点与可到达的星球连接 容量为状态的出现的个数然后是星球与汇点连接 容量为输入的最后一行#include #include #include #include #include #incl... 阅读全文
posted @ 2014-09-30 21:43 kewowlo 阅读(130) 评论(0) 推荐(0) 编辑
摘要: 思路来自。。#include #include #include #include #include #include #include #include using namespace std;#include #include #include #include #include #includ... 阅读全文
posted @ 2014-09-30 19:39 kewowlo 阅读(122) 评论(0) 推荐(0) 编辑
摘要: 定理:最大点权独立集的点权和=点SUM-最小点权覆盖集的点权和最小点覆盖=二分图的最大匹配黑白染色分成一个二分图黑色与相连的白色建一条INF的边源点与黑色建一条边 (容量为点值)汇点与白色建一条边 (容量为点值)注意建边#include #include #include #include #inc... 阅读全文
posted @ 2014-09-29 23:48 kewowlo 阅读(156) 评论(0) 推荐(0) 编辑
摘要: 说了一大坨输入 N M1 M2 M3N表示结点数M1 表示发电厂数 用源点连接发电厂M2 表示顾客数 汇点连接顾客M3 表示边数再输入边 发电厂 顾客#include #include #include #include #include #include #include #include usi... 阅读全文
posted @ 2014-09-29 22:20 kewowlo 阅读(150) 评论(0) 推荐(0) 编辑
摘要: 采药DP 类似dp[ K ][ X1 ][ X2 ] 表示第K步走到第一条路的坐标为X1 K-X1 第二条路的坐标为X2 K-X2;#include #include #include #include #include #include #include #include using namesp... 阅读全文
posted @ 2014-09-29 21:25 kewowlo 阅读(126) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 21 下一页