문제가 브라브라 거리길레 난 넘어갔지.


const char *words = "fucklovemotherfuckeryomikolove";

const char *bomd = "lo"

char *_Ptr;

if(strlen(words) > 1000000)

return 0;

else

if(strlen(bomd) > 36)

return 0;

// 모듈

for(;*words;words++)

{

if(*words == *bomd)

{

_Ptr = words;

for(;*bomd;bomd++) // 이거 저장해두고

{

}// for문

if(!*bomd)

{

for(int i = 0, f = strlen(bomd); i < strlen(bomd

}

}// if문

}// for문


아 쓰기 귀찮다.



그냥

#include <string>

int main()

{

const char *words = "fucklovemotherfuckeryomikolove";

const char *bomd = "lo"

for(;std :: replace(words, bomd) == true;)

;

return 0;

}


초간단 해결.