Created
September 10, 2016 19:02
-
-
Save gopalkriagg/31b6fadcd7a5903084083d0cd81c5213 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <string> | |
using namespace std; | |
int main() | |
{ | |
string milly = "milly"; | |
int T; | |
cin >> T; | |
int check; | |
string s; | |
while(T--) { | |
check = 0; | |
cin >> s; | |
for(int i = 0; i < s.size(); i++) { | |
if(milly[check] == s[i]) { | |
check++; | |
if(check == 5) break; | |
} | |
} | |
if(check == 5) cout << "Milly is Intelligent\n"; | |
else cout << "Milly is not Intelligent\n"; | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment