This commit is contained in:
kkunkka
2025-07-09 11:01:52 +08:00
parent ddc6ad5d0c
commit 423fefcbbf

View File

@@ -0,0 +1,16 @@
package com.dota.bit._2871;
class Solution {
public int maxSubarrays(int[] nums) {
var res = 0;
var t = -1;
for (int num : nums) {
t &= num;
if (t == 0) {
res++;
t = 0xffffffff;
}
}
return Math.max(res, 1);
}
}