MIN-MEX Cut solution codeforces – livenewsexpress 100% correct solution

A binary string is a string that consists of characters 00 and 11. Let MEXMEX of a binary string be the smallest digit among 00, 11, or 22 that does not occur in the string. For example, MEXMEX of 001011001011 is 22, because 00 and 11 occur in the string at least once, MEXMEX of 11111111 is 00, because 00 and 22 do not occur in the string and 0<20<2. A binary string ss is given. You should cut it into any number of substrings … Read more