
并查集
文章平均质量分 55
algzjh
这个作者很懒,什么都没留下…
展开
-
POJ2492-A Bug's Life
A Bug’s LifeTime Limit: 10000MS Memory Limit: 65536K Total Submissions: 36601 Accepted: 11961 DescriptionBackground Professor Hopper is researching the sexual behavior of a rare species原创 2017-04-19 14:54:31 · 367 阅读 · 0 评论 -
COJ-1004-Xi and Bo
1004: Xi and BoSubmit Page Summary Time Limit: 1 Sec Memory Limit: 128 Mb Submitted: 950 Solved: 363 Description Bo has been in Changsha for four years. However he spends most of h原创 2017-05-06 11:50:21 · 617 阅读 · 0 评论 -
中南大学第十一届大学生程序设计竞赛-COJ1904-精灵的交际网
1904: 精灵的交际网Submit Page Summary Time Limit: 1 Sec Memory Limit: 128 Mb Submitted: 12 Solved: 2 Description 天才少女科学家Cicini正在研究某种罕见的精灵的交际行为。她认为这些精灵只会与自己性别相反的精灵发生谈话,这些精灵一共也只有两种性别。在她的实验原创 2017-04-27 10:51:38 · 830 阅读 · 0 评论 -
并查集
int Find(int x){ return fa[x]==x?x:fa[x]=Find(fa[x]); } void unite(int x,int y) {int fx=Find(x),fy=Find(y);if(fx!=fy) fa[fx]=fy;}原创 2017-08-26 15:51:32 · 224 阅读 · 0 评论 -
2018湖南多校第一场(NCPC2016)-A-Artwork
Artwork Description A template for an artwork is a white grid of n × m squares. The artwork will be created by painting q horizontal and vertical black strokes. A stroke starts from square (x1, y1...原创 2018-04-05 16:10:03 · 543 阅读 · 0 评论