由one,three求出two
比较one和three,如果one中的数值three有的,写入two,没有用-one的形式写入two;
* @param one 第一个数值数组
* @param three 第三个数值数组
* @return 返回第二个数组
始终想不出来,我是才学的,大家能帮下忙吗
比较one和three,如果one中的数值three有的,写入two,没有用-one的形式写入two;
* @param one 第一个数值数组
* @param three 第三个数值数组
* @return 返回第二个数组
始终想不出来,我是才学的,大家能帮下忙吗
int[] two=one;
Set threeSet=new HashSet();
for(int i=0;i<three.length;i++)
threeSet.add(String.valueOf(three[i]));
for(int i=0;i<one.length;i++)
if(threeSet.contains(String.valueOf(one[i])))
;
else
two[i]=-two[i];
return two;
}