CF2048C Kevin and Binary Strings

Description

Kevin discovered a binary string $ s $ that starts with 1 in the river at Moonlit River Park and handed it over to you. Your task is to select two non-empty substrings $ ^{\text{∗}} $ of $ s $ (which can be overlapped) to maximize the XOR value of these two substrings. The XOR of two binary strings $ a $ and $ b $ is defined as the result of the $ \oplus $ operation applied to the two numbers obtained by interpreting $ a $ and $ b $ as binary numbers, with the leftmost bit representing the highest value. Here, $ \oplus $ denotes the [bitwise XOR operation](https://en.wikipedia.org/wiki/Bitwise_operation#XOR). The strings you choose may have leading zeros. $ ^{\text{∗}} $ A string $ a $ is a substring of a string $ b $ if $ a $ can be obtained from $ b $ by the deletion of several (possibly, zero or all) characters from the beginning and several (possibly, zero or all) characters from the end.

Input Format

N/A

Output Format

N/A

Explanation/Hint

In the first test case, we can choose $ s_2=\texttt{1} $ and $ s_1 s_2 s_3=\texttt{111} $ , and $ \texttt{1}\oplus\texttt{111}=\texttt{110} $ . It can be proven that it is impossible to obtain a larger result. Additionally, $ l_1=3 $ , $ r_1=3 $ , $ l_2=1 $ , $ r_2=3 $ is also a valid solution. In the second test case, $ s_1 s_2 s_3=\texttt{100} $ , $ s_1 s_2 s_3 s_4=\texttt{1000} $ , the result is $ \texttt{100}\oplus\texttt{1000}=\texttt{1100} $ , which is the maximum.