isrepeat
1 #include2 bool isrepeat(char *source) 3 { 4 long long bits[4] = {0}; 5 int i = 0; 6 while(source[i]){ 7 if(bits[source[i]/64]&(1<<(source[i]%64))) 8 return true; 9 else 10 bits[source[i]/64] ^= (1<<(source[i]%64)); 11 i++; 12 } 13 return false; 14 }