摘要:
c++算法之深搜 浅谈回溯与不回溯 先说理论上的(个人意见):需要回溯的题大多都是迷宫这一类的,对这一步所做的操作不确定,可操作可不操作的(就像迷宫,这一步到底走不走并不确定),要将操作在递归之后回溯一步;如果操作对象变量在深搜函数的参里,也可以在递归里写参的时候写在参里(举个例子吧,像dfs(c+ 阅读全文
摘要:
Description A single-player game is played on a rectangular board divided in R rows and C columns. There is a single uppercase letter (A-Z) written in 阅读全文
摘要:
Description You are trapped in a 3D dungeon and need to find the quickest way out! The dungeon is composed of unit cubes which may or may not be fille 阅读全文
摘要:
Description Due to recent rains, water has pooled in various places in Farmer John's field, which is represented by a rectangle of N x M (1 <= N <= 10 阅读全文