CF976A Minimum Binary Number
题目描述
给定一个二进制数(没有多余前导0),可以对这个二进制数执行两种操作:
1. 交换相邻数位的数字;
2. 用 1 代替 11(例如 110 变成 10)。
输出执行任意操作(或者不操作)后这些二进制数中最小的二进制数。
输入格式
第一行,一个数 n,表示这个二进制数的长度;
第二行,一个二进制数 s。
输出格式
执行任意操作后最小的二进制数;
## 样例解释
样例一解释:1001->1010->1100->100
样例二解释:不用操作
说明/提示
In the first example you can obtain the answer by the following sequence of operations: "1001"  "1010"  "1100"  "100".
In the second example you can't obtain smaller answer no matter what operations you use.