You are viewing a single comment's thread. Return to all comments →
SIMPLE C++ CODE. PASSES ALL TCs .
int found=0; { for(int i=0;i<=R-r;i++) { for(int j=0;j<=C-c;j++) { int p=0,k=i; while(s[k].substr(j,c)==a[p].substr(0,c)) { if(k-i+1==r) { found=1; break; } k++,p++; } } } (found)? cout<<"YES\n" : cout<<"NO\n"; }
Seems like cookies are disabled on this browser, please enable them to open this website
The Grid Search
You are viewing a single comment's thread. Return to all comments →
SIMPLE C++ CODE. PASSES ALL TCs .