摘要:
一看到这一题,我真没想到用并查集做,坑啊,看看别人的大致思路才知道用并查集可以做,唉,看来是自己太弱了~~~View Code 1 #include <cstdio> 2 #include <cstring> 3 4 int pipe[11][4]={{1,0,0,1},{1,1,0,0},{0,0,1,1}, 5 {0,1,1,0},{1,0,1,0},{0,1,0,1},{1,1,0,1},{1,0,1,1}, 6 {0,1,1,1},{1,1,1,0},{1,1,1,1}};//将每个都编号了,并且用上了边 7 int f[3000]; 8 int map[300 阅读全文