EMTY2  Can You Make It Empty 2
You are given a string S with only 0 and 1. You can delete the string 100 from any position of S an infinite number of times and obtain a new S after concatenation. Is it possible to make the string empty?
As for example, if S=101000 then 101000>100>empty
If S=1010001 then 1010001>1001>1>not empty
Input
Input starts with an integer T (≤ 100), denoting the number of test cases.
Each case contains a string S. The size of string is at most 120000.
Output
For each test case, print the case number and “yes” if it is possible to make the string S empty, print “no” otherwise.
Sample Input 
Output for Sample Input 
2 
Case 1: yes 
Problem Setter: Md Abdul Alim, Dept. of Computer Science, Bangladesh University of Business & Technology
hide comments
sanjeev30798:
20200112 18:42:09
counting zeroes and ones would not help. For numbers like 100001, counting would give yes but the answer is no. 

prachij:
20191217 09:27:56
Solved it just by counting :)


iamwaste:
20190208 19:53:28
interesting question  think about automata theory while doing  AC on second attempt 

payal2621:
20180129 15:41:52
guys getting tle use this "ios_base::sync_with_stdio(false);" 

sedulous_001:
20170925 16:21:18
Yes, there is white space between " Case x: " & "yes/no". Got wrong answer twice :( 

vinuvarsidh:
20170917 16:49:01
iam getting wrong answer.. though i print it as Case 1: yes can anyone tell me why


mahilewets:
20170830 11:17:03
Sample output looks like there is no whitespace between "Case X:" and "yes/no"


nikhil2504:
20170707 02:10:24
Stack kills it! 

vengatesh15:
20170121 17:59:10
AC in 1 go:) 

madhavgaba:
20161216 09:11:01
Did without stacks in O(n)........just count number of zeros and ones :D 
Added by:  Md Abdul Alim 
Date:  20140303 
Time limit:  1s 
Source limit:  50000B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All except: ASM64 GOSU 
Resource:  Own Problem 