So let me go ahead and pull up the staff solution 15 to the standard edition for a moment, the game is called 15, it takes one command line argument which is the dimensions of the board 3 by 3, 4 by 4, I'll do it 4 by 4.
下面我们继续,等一会儿,我会给出标准的解答,这个游戏叫做,有一个命令行参数,标识其大小是,3阶还是4阶,我选择4阶。
STUDENT: So, how do you come to a conclusion as to which you should use then, if you can determine the size based on solution, or based on input, so how do you decide?
学生:所以,你怎样决定你该用,哪个来算呢?现在如果你可以选择是,基于解决方案的大小,还是基于输入的大小,你应该怎样决定呢?
On the other hand, we've seen n that if the size of a is n, that's to say, we have n elements to choose from, then the number of possible subsets is 2 to the n.
另一方面,我们看到,如果a集合的大小是,也就是说我们有n个元素可供选择,而可能的子集的元素,个数就是2的n次方。
应用推荐