1879. 两个数组最小的异或值之和 #260
Replies: 1 comment
-
|
dp[state] = min(dp[state], dp[state ^ (1 << i)] + (nums1[i] ^ nums2[one_cnt - 1])) 这行 代码 和解释反了 nums2 应该取index 为i的值。 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
1879. 两个数组最小的异或值之和
--- 1879. 两个数组最小的异或值之和 标签:位运算、数组、动态规划、状态压缩 难度:困难 题目链接 1879. 两个数组最小的异或值之和 - 力扣 题目大意 描述:给定两个整数数组 nums1 和 nums2,两个数组长度都为 n。 要求:将 nums2 中的元素重新排列,使得两个数组的异或值之和最小。并返回重新排列之后的异或值之和。 说明: ...
https://algo.itcharge.cn/solutions/1800-1899/minimum-xor-sum-of-two-arrays/
Beta Was this translation helpful? Give feedback.
All reactions