摘要:
1.dfs(深度优先搜索)是两个搜索中先理解并使用的,其实就是暴力把所有的路径都搜索出来,它运用了回溯,保存这次的位置,深入搜索,都搜索完了便回溯回来,搜下一个位置,直到把所有最深位置都搜一遍,要注意的一点是,搜索的时候有记录走过的位置,标记完后可能要改回来; 回溯法是一种搜索法,按条件向前搜索,以 阅读全文
摘要:
You are given two pots, having the volume of A and B liters respectively. The following operations can be performed: FILL(i) fill the pot i (1 ≤ i ≤ 2 阅读全文
摘要:
Fat brother and Maze are playing a kind of special (hentai) game on an N M board (N rows, M columns). At the beginning, each grid of this board is con 阅读全文