import java.util.*;
public class Solution {
public boolean IsContinuous(int [] numbers) {
Arrays.sort(numbers);
int j = 0;
int m = 0;
for (int i = 0; i < numbers.length; i++) {
if (numbers[i] == 0) {
j++;
} else {
if (i + 1 < numbers.length && numbers[i] + 1 != numbers[i + 1]) {
m += (numbers[i + 1] - numbers[i] - 1);
}
if (i + 1 < numbers.length && numbers[i] == numbers[i + 1]){
return false;
}
}
}
if (m > j) { // 统计0的个数和不连续的个数。大于则不连续。
return false;
}
return true;
}
}