Sponsors

Tag: problem: (B) Crossword solving Solution In C/C++

Codeforces Round #422 (Div....

#include<bits/stdc++.h> using namespace std; int n,m,i,j,c,a=2e9,ai; string s,t; int main(){ cin>>n>>m>>s>>t; for(i=0;i<=m-n;i++) { for(c=j=0;j<n;j++) t==s?0:c++; c<a?a=c,ai=i:0; } cout<<a<<endl; for(c=j=0;j<n;j++) t!=s?cout<<j+1<<" ",0:0; }

Advertisement

spot_img