#include #define REP(i,n) for(int i=0; i> s; for(int pos=0, ppos=INT_MAX; (pos=s.find(ellipsis, pos)+1); ++ans, ppos=pos){ //cout << pos << " " << ppos << " " << esize << endl; if(pos - ppos - esize){ maxi = max(maxi, ans); ans = 0; } } maxi = max(maxi, ans); cout << maxi << endl; }