![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
----------图论---------
CrossDolphin
青春看起来如此完美,没空闲去浪费时间。
展开
-
次小生成树
链接:http://acm.hust.edu.cn/vjudge/contest/view.action?cid=67265#overviewProblem AACM CONTEST AND BLACKOUT In order to prepare the “The First National ACM School Contest”(in 20??) th原创 2015-03-22 19:19:03 · 434 阅读 · 0 评论 -
Codeforces Round #303 (Div. 2) E 最短路迪杰斯特拉(小根堆实现)
链接:戳这里E. Paths and Treestime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputLittle girl Susie accidentally found her elder brother原创 2016-07-22 17:29:26 · 763 阅读 · 0 评论 -
Codeforces Round #302 (Div. 2) D bfs最短路
链接:戳这里D. Destroying Roadstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputIn some country there are exactly n cities and m bidi原创 2016-07-25 13:41:48 · 326 阅读 · 0 评论 -
hdu 4786 并查集+生成树
链接:戳这里Fibonacci TreeTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Problem Description Coach Pang is interested in Fibonacci numbers while Uncl原创 2016-07-25 14:54:49 · 270 阅读 · 0 评论 -
Codeforces Round #360 (Div. 1) D 并查集判奇环
链接:戳这里D. Dividing Kingdom IItime limit per test6 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputLong time ago, there was a great kingdom and it wa原创 2016-07-06 22:35:35 · 726 阅读 · 0 评论 -
2016 Multi-University Training Contest 1 1001 hdu 5723 DFS+并查集最小生树
链接:戳这里Abandoned countryTime Limit: 8000/4000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Problem DescriptionAn abandoned country has n(n≤100000) villages w原创 2016-07-19 17:20:21 · 505 阅读 · 0 评论 -
Codeforces Round #270 D 最小生成树(并查集)+DFS
链接:戳这里D. Design Tutorial: Inverse the Problemtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere is an easy way to obtain a原创 2016-08-06 14:44:02 · 352 阅读 · 0 评论 -
Codeforces Round #287 (Div. 2) E bfs+记录最短路径(邻接表的使用
链接:戳这里E. Breaking Goodtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputBreaking Good is a new video game which a lot of gamers wa原创 2016-08-03 12:25:05 · 478 阅读 · 0 评论 -
Educational Codeforces Round 14 D 并查集
链接:戳这里D. Swaps in Permutationtime limit per test5 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given a permutation of the numbers 1, 2,原创 2016-08-08 16:22:29 · 507 阅读 · 0 评论 -
hdu 5876 暴力
链接:戳这里Sparse GraphTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Problem DescriptionIn graph theory, the complement of a graph G is a graph原创 2016-09-13 20:27:39 · 422 阅读 · 0 评论 -
Codeforces Round #355 (Div. 2) A B C D vector + map spfa
链接:戳这里A. Vanya and Fencetime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputVanya and his friends are walking along the fence of he原创 2016-06-03 00:14:45 · 874 阅读 · 0 评论 -
2016 浙江省赛 The 13th Zhejiang Provincial Collegiate Programming Contest K题 SPFA
链接:戳这里Highway ProjectTime Limit: 2 Seconds Memory Limit: 65536 KBEdward, the emperor of the Marjar Empire, wants to build some bidirectional highways so that he can reach other citi原创 2016-04-23 23:18:36 · 475 阅读 · 0 评论 -
最短路-邻接表(优先队列)写
题目链接:http://codevs.cn/problem/2038/题目描述 Description农夫John发现做出全威斯康辛州最甜的黄油的方法:糖。把糖放在一片牧场上,他知道N(1农夫John很狡猾。他知道他可以训练这些奶牛,让它们在听到铃声时去一个特定的牧场。他打算将糖放在那里然后下午发出铃声,以至他可以在晚上挤奶。农夫John知道每只奶牛都在各自原创 2015-03-15 16:39:30 · 804 阅读 · 0 评论 -
并查集写最小生成树
http://codevs.cn/problem/1231/题目描述 Description学校需要将n台计算机连接起来,不同的2台计算机之间的连接费用可能是不同的。为了节省费用,我们考虑采用间接数据传输结束,就是一台计算机可以间接地通过其他计算机实现和另外一台计算机连接。为了使得任意两台计算机之间都是连通的(不管是直接还是间接的),需要在若干台计算机之间用网线直接连接原创 2015-02-03 13:21:22 · 579 阅读 · 0 评论 -
蓝桥杯 MST 和 搜索
链接:戳这里 历届试题 兰顿蚂蚁 时间限制:1.0s 内存限制:256.0MB 问题描述 兰顿蚂蚁,是于1986年,由克里斯·兰顿提出来的,属于细胞自动机的一种。 平面上的正方形格子被填上黑色或白色。在其中一格正方形内有一只“蚂蚁”。 蚂蚁的头部朝向为:上下左右其中一方。 蚂蚁的移动规则十分简单:原创 2016-03-16 22:22:30 · 425 阅读 · 0 评论 -
Educational Codeforces Round 9 A B C D F
链接:戳这里A. Grandma Laura and Applestime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputGrandma Laura came to the market to sell some apples原创 2016-03-18 22:12:27 · 672 阅读 · 0 评论 -
codeforces #345(div2)
链接:戳这里A. Joystickstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputFriends are going to play原创 2016-03-10 21:57:33 · 592 阅读 · 0 评论 -
BestCoder 74
链接:戳这里A:LCP Array题意:给定一个字符串s=s1s2s3s4...s5,si代表字符(小写字母),知道任意两个相邻的后缀的最长公共前缀长度为一个整数ai,这个意思就是相邻字符相等的个数为ai。问满足该字符串s的种数。思路:样例43 2 1aaaa aaa aa a显然这样的字符串必须是 aaaa (26字符任意一个) 才能满足原创 2016-03-07 16:57:51 · 286 阅读 · 0 评论 -
Codeforces Round #346 (Div. 2) F bfs+并查集
链接:戳这里F. Polycarp and Haytime limit per test4 secondsmemory limit per test512 megabytesinputstandard inputoutputstandard outputThe farmer Polycarp has a warehouse with hay, which c原创 2016-03-31 21:51:41 · 386 阅读 · 0 评论 -
BestCoder Round #77 (div.2) A B C D
链接:戳这里so easy Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)问题描述已知一个包含 nn 个元素的正整数集合 SS,设 f(S)为集合 S 中所有元素的异或(XOR)的结果。如:S={1,2,3}, 则 f(S) = 0。原创 2016-03-26 22:59:05 · 439 阅读 · 0 评论 -
Codeforces Round #349 (Div. 2) A B C[dp] D[spfa] +vector
链接:戳这里A + B 就不写了吧C. Reberland Linguisticstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputFi原创 2016-05-02 17:40:28 · 682 阅读 · 0 评论 -
hdu 5627 并查集
链接:戳这里Clarke and MSTTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Problem DescriptionClarke is a patient with multiple personality disorder.原创 2016-08-12 19:53:48 · 368 阅读 · 0 评论