*/privateint[]findBestSolution(intarray[],intcount){intminTest=0;intfound=0;Set<Integer>indexSet=newHashSet<>();//保存被分配的海盗的坐标while(found<count){for(intj=array.length-1;j>=0;j--){if(minTest==array[j]){found++;indexSet.add(j);}if(found==count){break;}}minTest++;}/...