class Solution {
public:
bool IsContinuous( vector<int> numbers ) {
int max=0,min=14,dif,flag;
int zerocount=0;
sort(numbers.begin(),numbers.end());
for(int i=0;i<5;i++){
if(numbers[i]==numbers[i+1]){
if(numbers[i]!=0) return false;
}
if(numbers[i]==0){
zerocount++;
continue;
}
if(numbers[i]<min) min=numbers[i];
if(numbers[i]>max) max=numbers[i];
}
dif=max-min;
if(dif==4) flag=1;
if(dif>4) flag=0;
if(dif<4){
if(dif+zerocount==4) flag=1;
else flag=0;
}
if(flag==1) return true;
return false;
}
};