int strStr(string haystack, string needle) {
int n_len=needle.length();
int h_len=haystack.length();
if(n_len>h_len) return -1;
if(n_len == h_len) return haystack == needle? 0:-1;
for(int i=0;i<h_len-n_len+1;i++)
if(haystack[i] == needle[0] && haystack.substr(i,n_len) == needle) return i;