找出数组之间的差异

编程入门 行业动态 更新时间:2024-10-28 07:34:17
本文介绍了找出数组之间的差异的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

大家好, 我有这样一个数组:

Hi all, I have an array like this:

1 1 -1 -1 0 0 1 1 -1 0 -1 0 1 1 0 -1 -1 0 0 0 -1 -1 1 1

......(所有排列) 我需要找到那些必须在这个数组上的数组之间的最大差异数。 例如:

...(all permutations) I need to find maximum number of difference between those arrays which result must be on this arrays. e.g.:

1 1 -1 -1 0 0 (1) 1 1 0 0 -1 -1 (2) 1 0 -1 0 1 -1 (3)

(1) - (2) = 0 0 -1 -1 1 1 which is in first array. (1) - (3) = 0 1 0 -1 -1 1 which also is part of the first arrays.

现在我需要检查一下(2) - (3)达到这个条件。 怎么样? 代码块添加 - OriginalGriff [/ edit]

Now I need to check if (2) - (3) achieve this condition. How? [edit]Code block added - OriginalGriff[/edit]

推荐答案

您能否发送您的代码和确切的问题影响区域? Could you please send your code and exactly problem affected area?

更多推荐

找出数组之间的差异

本文发布于:2023-10-19 19:05:57,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1508481.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:数组   差异

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!