摘要:
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... 阅读全文
摘要:
题目大意:求将一个r*c的按钮矩阵由全部为关变成全部为开的最少按扭次数,每按一次开关能作用到的范围不定。题目分析:开关问题。打眼一看就是BFS+位压缩,但是写出来之后TLE。用DFS不断更新最优解。最坏有2^25种情况,加两个剪枝: 一、每一个开关最多只能影响三行,当第now_r-2行仍然有开关关... 阅读全文