
并查集
console.log( )
吾日三省吾身:这事能不能不干、这事能不能推给别人干、这事能不能明天干。
展开
-
HPU:1232畅通工程(并查集)
畅通工程Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 40755 Accepted Submission(s): 21638Problem Description某省调查城镇交通状况,得到现有城镇道路统计表,原创 2016-01-10 21:39:54 · 604 阅读 · 0 评论 -
Work<hdoj5326>
Problem DescriptionIt’s an interesting experience to move from ICPC to work, end my college life and start a brand new journey in company.As is known to all, every stuff in a company has a原创 2016-08-02 09:01:07 · 357 阅读 · 0 评论 -
Pet<hdoj4707>
Problem DescriptionOne day, Lin Ji wake up in the morning and found that his pethamster escaped. He searched in the room but didn’t find the hamster. He tried to use some cheese to trap the hamste原创 2016-08-02 08:55:59 · 330 阅读 · 0 评论 -
Is It A Tree?<hdoj1325>
Problem DescriptionA tree is a well-known data structure that is either empty (null, void, nothing) or is a set of one or more nodes connected by directed edges between nodes satisfying the follow原创 2016-08-02 08:51:52 · 346 阅读 · 0 评论 -
Ice_cream's world I<hdoj2120>
Problem Descriptionice_cream's world is a rich country, it has many fertile lands. Today, the queen of ice_cream wants award land to diligent ACMers. So there are some watchtowers are set up, and原创 2016-08-02 08:48:24 · 313 阅读 · 0 评论 -
小希的迷宫<hdoj1272>
Problem Description上次Gardon的迷宫城堡小希玩了很久(见Problem B),现在她也想设计一个迷宫让Gardon来走。但是她设计迷宫的思路不一样,首先她认为所有的通道都应该是双向连通的,就是说如果有一个通道连通了房间A和B,那么既可以通过它从房间A走到房间B,也可以通过它从房间B走到房间A,为了提高难度,小希希望任意两个房间有且仅有一条路径可以相通(除非走了回头路原创 2016-08-02 08:46:06 · 312 阅读 · 0 评论 -
More is better<hdoj1856>
Problem DescriptionMr Wang wants some boys to help him with a project. Because the project is rather complex, the more boys come, the better it will be. Of course there are certain requirements.原创 2016-08-02 08:42:00 · 295 阅读 · 0 评论 -
How Many Tables<hdoj1213>
Problem DescriptionToday is Ignatius' birthday. He invites a lot of friends. Now it's dinner time. Ignatius wants to know how many tables he needs at least. You have to notice that not all the fri原创 2016-08-02 08:39:14 · 313 阅读 · 0 评论 -
The Suspects<poj1611>
DescriptionSevere acute respiratory syndrome (SARS), an atypical pneumonia of unknown aetiology, was recognized as a global threat in mid-March 2003. To minimize transmission to others, the best s原创 2016-08-01 21:50:42 · 389 阅读 · 0 评论 -
Rikka with Graph<hdoj5631>
Problem DescriptionAs we know, Rikka is poor at math. Yuta is worrying about this situation, so he gives Rikka some math tasks to practice. There is one of them:Yuta has a non-direct graph wit原创 2016-08-01 21:46:35 · 315 阅读 · 0 评论 -
<hdoj1878>欧拉回路
Problem Description欧拉回路是指不令笔离开纸面,可画过图中每条边仅一次,且可以回到起点的一条回路。现给定一个图,问是否存在欧拉回路? Input测试输入包含若干测试用例。每个测试用例的第1行给出两个正整数,分别是节点数N ( 1 束。 Output每个测试用例的输出占一行,若欧拉回路存在则输出1,否则输出0。原创 2016-08-02 09:05:36 · 380 阅读 · 0 评论