并查集
whppmy
博客搬到 bugnull.com
展开
-
poj 1182
食物链 Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 53661 Accepted: 15733 Description 动物王国中有三类动物A,B,C,这三类动物的食物链构成了有趣的环形。A吃B, B吃C,C吃A。 现有N个动物,以1-N编号。每个动转载 2015-08-16 16:54:50 · 368 阅读 · 0 评论 -
ZOJ 3204 Connect them
You have n computers numbered from 1 to n and you want to connect them to make a small local area network (LAN). All connections are two-way (that is connecting computers i and j is the same as connec原创 2015-08-09 22:51:23 · 461 阅读 · 0 评论 -
ZOJ 3710 Friends
Alice lives in the country where people like to make friends. The friendship is bidirectional and if any two person have no less than k friends in common, they will become friends in several days. Cu原创 2015-09-06 13:27:18 · 410 阅读 · 0 评论 -
HDU 4496 D-City
Luxer is a really bad guy. He destroys everything he met. One day Luxer went to D-city. D-city has N D-points and M D-lines. Each D-line connects exactly two D-points. Luxer will destroy all转载 2015-08-05 14:40:55 · 372 阅读 · 0 评论