摘要: DescriptionVenture MFG Company, Inc. has made a game board. This game board has 15 holes and these holes are filled with pegs except one hole. A peg c... 阅读全文
posted @ 2015-08-29 20:38 20143605 阅读(358) 评论(0) 推荐(0) 编辑
摘要: 题目大意:求将一个r*c的按钮矩阵由全部为关变成全部为开的最少按扭次数,每按一次开关能作用到的范围不定。题目分析:开关问题。打眼一看就是BFS+位压缩,但是写出来之后TLE。用DFS不断更新最优解。最坏有2^25种情况,加两个剪枝: 一、每一个开关最多只能影响三行,当第now_r-2行仍然有开关关... 阅读全文
posted @ 2015-08-29 14:26 20143605 阅读(266) 评论(0) 推荐(0) 编辑