National Olympiad in Informatics, China, 1999
Given 7 positive integers
or for .- For any of
's length consecutive subsequence , the number of 0's must be between and , inclusive. - For any of
's length consecutive subsequence , the number of 1's must be between and , inclusive.
For example, if
Input Specification
The input will consist of one line with 7 space-separated positive
integers, the values
Output Specification
The output should consist of one line. If there does not exist a 01
sequence satisfying the above conditions, then output -1
.
Otherwise, output any 01 sequence that satisfies the conditions.
Sample Input
Copy
6 1 2 3 1 1 2
Sample Output
Copy
010101
Problem translated to English by .
Comments