P19301 [CodeChef] BINDIF
提高-
题目描述

Given a binary number $S$ containing only of 1's and 0's, find two binary numbers $A$ and $B$ such that the sum of the number of 1's in $A$ and $B$ is minimum and $A-B=S$. If there are many such numbers, you can print any.

The binary number $S$ has some properties. See the Constraints section for details.

------ Input: ------

The only line of input contains a single binary number $S$ without leading zeroes.

------ Output: ------
Print two numbers $A$ and $B$ in one line without leading zeroes. If any number is zero, just print $0$.

------ Constraints ------
$2 ≤$ number of bits in $S ≤ 10^{6}$
The string $S$ has at least 1 one and 1 zero and has exactly two parts: all 1's followed by all 0's.

----- Sample Input 1 ------
1110000
----- Sample Output 1 ------
10000000 10000
----- explanation 1 ------
1110000 is 112 in decimal.

10000000 is 128 in decimal. 10000 is 16 in decimal. 128 - 16 = 112. Hence the given output is valid. The sum of the number of 1's in $A$ and $B$ is 1 + 1 = 2. You can check that this cannot be decreased. Hence this is a correct answer.

输入格式

见题面

输出格式

见题面

样例输入
1110000
样例输出
10000000 10000