Skip to content

manojkumar1906/e

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 

Repository files navigation

#include<bits/stdc++.h> using namespace std; int main(){ int t; cin>>t; while (t--) { int s; cin>>s; int a=0,b=0; string arr[s]; for (int i = 0; i < s; i++) { cin>>arr[i]; } for (int i = 0; i < s; i++) { if(arr[i]=="cookie"&& arr[i+1]=="milk"){ a++; } if(arr[i]=="cookie"){ b++; } } if (a==b) { cout<<"YES"<<endl; } else { cout<<"NO"<<endl; } } }

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published