摘要: 方法:dfs 染色 code: 1 #include <cstdio> 2 #include <cstring> 3 #include <algorithm> 4 #include <iostream> 5 #include <string> 6 #include <vector> 7 #inclu 阅读全文
posted @ 2017-02-05 21:09 大四开始ACM 阅读(173) 评论(0) 推荐(0) 编辑
摘要: 方法:dfs(flood fill) dfs code: 1 #include <cstdio> 2 #include <cstring> 3 #include <algorithm> 4 #include <iostream> 5 #include <string> 6 #include <vec 阅读全文
posted @ 2017-02-05 19:32 大四开始ACM 阅读(119) 评论(0) 推荐(0) 编辑
摘要: 方法:dfs 联通分量 做做水题歇歇脑。 有几个容易出错的地方。第一要考虑骰子上至少是1点,所以如果一个骰子上没有点数,也要记作1。。。还有就是一个骰子全是点。 code: 1 #include <cstdio> 2 #include <cstring> 3 #include <algorithm> 阅读全文
posted @ 2017-02-05 19:12 大四开始ACM 阅读(268) 评论(0) 推荐(0) 编辑
摘要: 反思:好好读题,一开始卡了好几道水题。多和队友交流思路。不要轻言放弃,珍惜上机机会。 A. Arcsoft's Office Rearrangement 方法: 贪心 注意到房子是连成一条线的,所以操作都都是对相邻的block进行或者产生相邻的block。贪心地从第一个block 开始处理。 cod 阅读全文
posted @ 2017-02-05 11:50 大四开始ACM 阅读(375) 评论(0) 推荐(0) 编辑