文件名称:upload1
介绍说明--下载内容来自于网络,使用问题请自行百度
传教士与野人问题。完美版。getStrategy函数参数是N和k,返回的是一个字符串数组,代表一个状态序列,数组中的每一个元素代表一个状态,每一个状态表示为(a,b,c),其中a表示左岸的传教士数目,b表示左岸的野人数目,c表示船是否在左岸,c=1为船在左岸,c=0为船在右岸。如果问题无解,返回只有一个元素 “no solution”的数组。-Missionaries and savages the problem. Perfect version. getStrategy function parameters are N and k, returns a string array, on behalf of a state sequence, each element of the array represents a state, each state is represented as (a, b, c), which indicated that the left bank of a missionary The number of disabilities, b indicated that the number of the left bank of the Savage, c that ship is on the left bank, c = 1 for the shipping on the left bank, c = 0 for the boat on the right bank. If the problem is no solution, return only one element of " no solution" of the array.
相关搜索: 传教士与野人
(系统自动生成,下载前可以参看下载内容)
下载文件列表
upload1/Inter.java
upload1/MC.java
upload1/Test.java
upload1
upload1/MC.java
upload1/Test.java
upload1
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.