摘要: 题目描述:给予n个长度为7的字符串,定义两字符串间的代价为同一位置不同的字符的个数,现在要联通所有的字符串求最小代价。 思路:一开始使用Krustal算法,然而因为是稠密图导致TLE,换用Prim。 Krustal:(TLE) Prim(AC): 阅读全文
posted @ 2018-08-01 23:07 DevilInChina 阅读(209) 评论(0) 推荐(0) 编辑
摘要: 场上怎么都想不出来,看了标程想自闭。。。 标程太秀了,顶礼膜拜。 阅读全文
posted @ 2018-08-01 19:49 DevilInChina 阅读(237) 评论(0) 推荐(0) 编辑
摘要: Find the nondecreasing subsequences Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2225 Accepte 阅读全文
posted @ 2018-08-01 10:09 DevilInChina 阅读(180) 评论(0) 推荐(0) 编辑
摘要: 题目描述:给予一张图,源点 1,汇点 n 求最大流。 标准模板题,附上封装好的Dinic模板。 阅读全文
posted @ 2018-08-01 09:23 DevilInChina 阅读(197) 评论(0) 推荐(0) 编辑