You are given a b bitstring (so a number sequence containing only 0s and 1s). You may change one of the 0s to a 1. This operation is called bit-flipping.
The input is exactly one line which contains a b bitstring (containing only 0s and 1s).
The output is a single integer which is the length of the longest subsequence containing only 1s after performing at most 1 bit-flipping.
|University of Debrecen; Faculty of Informatics; v. 03/01/2019|