添加链接描述
#includeusing namespace std;string s;int ans=0;mapmp;bool func(){ int oka=0,okA=0,ok0=0,ok_=0; for(auto it :mp){ assert(it.second>=0); char ch=it.first; if(ch>='a'&&ch<='z'&&it.second>0)oka=1; else if(ch>='A'&&ch<='Z'&&it.second>0)okA=1; else if(ch>='0'&&ch<='9'&&it.second>0)ok0=1; else if(ch==' ')assert(1); else { if(it.second>0) ok_=1; } if(oka+okA+ok0+ok_>=3){ return 1; } } return 0;}int main(){ int n,L,R; cin>>n>>L>>R; cin>>s; int l=0,r=0; int now=r; mp[s[0]]++; while(lR){ mp[s[l]]--; l++; } } } // l r // cout<=L&&r-l+1<=R){ ans+=max(0,(min(n-1,(l+R-1))-r+1)); } // cout< mp[s[l]]--; l++; // while(r-) } cout<