Yet Another Strong Problem

Limits 1s, 512 MB

You are given a string str\text{str}str consisting of characters 000 and/or 111 with an arbitrary integer nnn.


This is a companion discussion topic for the original entry at https://toph.co/p/problem-a