随笔分类 - 搜索
摘要:转载自:http://acm.hdu.edu.cn/forum/read.php?tid=6158sample input:4 4 5S.X...X...XD....问题:(1):在发现当前节点无法到达时,这点弹出栈,并且把这点的标记重新刷为'.'(2):如何在dfs中既要保证到达又要使时间正好呢?...
阅读全文
摘要:Problem Description在N*N的方格棋盘放置了N个皇后,使得它们不相互攻击(即任意2个皇后不允许处在同一排,同一列,也不允许处在与棋盘边框成45角的斜线上。你的任务是,对于给定的N,求出有多少种合法的放置方法。Input共有若干行,每行一个正整数N≤10,表示棋盘和皇后的数量;如果N...
阅读全文
摘要:Problem DescriptionThere is a rectangular room, covered with square tiles. Each tile is colored either red or black. A man is standing on a black tile...
阅读全文
摘要:Problem DescriptionThe GeoSurvComp geologic survey company is responsible for detecting underground oil deposits. GeoSurvComp works with one large rec...
阅读全文