Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //CHEFCHR
- #include<iostream>
- #include<string.h>
- #include<algorithm>
- using namespace std;
- int main()
- {
- string s;
- int t;
- cin>>t;
- string v;
- int count=0;
- while(t--)
- {
- cin>>s;
- count=0;
- for(int i=0;i<s.length()-3;i++)
- {
- v=s.substr(i,4);
- sort(v.begin(),v.end());
- if(v=="cefh")
- {
- count++;
- }
- }
- if(count==0)
- cout<<"normal"<<endl;
- else
- cout<<"lovely "<<count<<endl;
- }
- }
Add Comment
Please, Sign In to add comment