int output(){ int ans=0; int len=strlen(s); for(int cslen=1;cslen<=len/2;cslen++){ init(); for(int i=0;i<=len-cslen*2;i++){ strncpy(a,s+i,cslen); a[cslen]='\0'; char *b=strstr(s+i+cslen,a); if(b!=NULL){ if(isRepeat(i,cslen)) continue; flag[i]=true; ans++; } } } return ans; }
void pailie(char *str, int len, int index) { int i, j, repeat[N] = {0}; if (index == len) printf("%s\n", result); for (i = 0; i < len; i++) { if (used[i] == 1) continue; result[index] = str[i]; if (isRepeat(repeat, i, str[i])) continue; repeat[i] = str[i]; used[i] = 1; pailie(str, len, index+1); used[i] = 0; } }
string AnimationComponent::getNextAnimation() { if (!isRepeat()) { return mStateMap[currentState]->mNextAnimation; } return currentState; }