Error
|
|
---|---|
@Ibrahim Nash | 5761 |
@blackshadows | 5701 |
@akhayrutdinov | 5111 |
@mb1973 | 4989 |
@Quandray | 4944 |
@saiujwal13083 | 4506 |
@sanjay05 | 3762 |
@marius_valentin_dragoi | 3516 |
@sushant_a | 3459 |
@verma_ji | 3341 |
@KshamaGupta | 3318 |
Complete Leaderboard | |
|
|
@aroranayan999 | 938 |
@bt8816103042 | 739 |
@SHOAIBVIJAPURE | 428 |
@codeantik | 412 |
@SherlockHolmes3 | 407 |
@neverevergiveup | 348 |
@mahlawatep | 347 |
@shalinibhataniya1097 | 343 |
@murarry3625 | 333 |
@saiujwal13083 | 326 |
@rohitanand | 314 |
Complete Leaderboard |
James and Lilly are best friends. James has his personal mobile phone but Lilly has lost her mobile phone recently. So to chat with James she uses her cousins mobile phones. So, whenever Lilly sends a message to James, she encode "hello" to some other words w. James knows that it is Lilly's message if he is able to get "hello" from word w by deleting some letters from it. Help James to decode the words quickly so that he can get more time to chat with her.
Note : Words can have both uppercase and lowercase letters.
Input:
The first line of input contains an integer T denoting the number of test cases. Then T test cases follow. Each test case contains one line contains the word w, which James receives in his mobile phone.
Output :
For each test case in a new line print print "1" if it is Lilly's message , otherwise print "0".
Constraints :
1<=T<=100
1<=w<=100
Complexity : O(n)
Example :
Input :
3
bbbbbxxhhelllllooudd
pppehllooee
hlelo
Output :
1
0
0
We strongly recommend solving this problem on your own before viewing its editorial. Do you still want to view the editorial?
Yes