
Description
Link
Given two integers n and m, is there a string containing exactly n “0”s and m “1”s while it doesn’t contain any substring of “001” or “11”?
If such strings exist output the lexicographically smallest one. Otherwise output NO.
Input
One line with two integers, determining n and m (0<=n,m<=100000,0<n+m)
Output
One line with the lexicographically smallest string which is the answer or NO.
Sample Input
2 3
Sample Output
10101
2. Analysis
3. Solution(s)
|
|




近期评论