Skip to content

Instantly share code, notes, and snippets.

@gopalkriagg
Created September 10, 2016 19:02
Show Gist options
  • Save gopalkriagg/31b6fadcd7a5903084083d0cd81c5213 to your computer and use it in GitHub Desktop.
Save gopalkriagg/31b6fadcd7a5903084083d0cd81c5213 to your computer and use it in GitHub Desktop.
#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