2013年4月2日

POJ 1703 Find them, Catch them (并查集)

摘要: Find them, Catch themTime Limit:1000MSMemory Limit:10000KTotal Submissions:23816Accepted:7130DescriptionThe police office in Tadu City decides to say ends to the chaos, as launch actions to root up the TWO gangs in the city, Gang Dragon and Gang Snake. However, the police first needs to identify whi 阅读全文

posted @ 2013-04-02 22:41 kuangbin 阅读(466) 评论(0) 推荐(0) 编辑

POJ 1611 The Suspects (并查集,简单)

摘要: The SuspectsTime Limit:1000MSMemory Limit:20000KTotal Submissions:17128Accepted:8254DescriptionSevere 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 strategy is to separa 阅读全文

posted @ 2013-04-02 20:36 kuangbin 阅读(613) 评论(0) 推荐(0) 编辑

HDU 1325 Is It A Tree? POJ 1308 Is It A Tree? (并查集+入度,判断一个有向图是树)

摘要: Is It A Tree?Time Limit:1000MSMemory Limit:10000KTotal Submissions:17328Accepted:5934DescriptionA 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 following properties.There is exa 阅读全文

posted @ 2013-04-02 20:09 kuangbin 阅读(696) 评论(0) 推荐(0) 编辑

POJ 1182 食物链(并查集)

摘要: 食物链Time Limit:1000MSMemory Limit:10000KTotal Submissions:33631Accepted:9770Description动物王国中有三类动物A,B,C,这三类动物的食物链构成了有趣的环形。A吃B, B吃C,C吃A。现有N个动物,以1-N编号。每个动物都是A,B,C中的一种,但是我们并不知道它到底是哪一种。有人用两种说法对这N个动物所构成的食物链关系进行描述:第一种说法是"1 X Y",表示X和Y是同类。第二种说法是"2 X Y",表示X吃Y。此人对N个动物,用上述两种说法,一句接一句地说出K句话,这K句 阅读全文

posted @ 2013-04-02 20:06 kuangbin 阅读(2528) 评论(0) 推荐(0) 编辑

导航

JAVASCRIPT: