SEQ1  01 Sequence
The input consists of exactly 5 test cases in the following format:
Input
N A0 B0 L0 A1 B1 L1 [3<=N<=1000,1<=A0<=B0<=L0<=N,1<=A1<=B1<=L1<=N]
Output
Exactly 5 lines,each contains:
a) A Ncharacter sequence (We name it S) consisting of only characters '0' and '1' and no extra whitespaces, which satisfy the following conditions:
 The number of '0' in any consecutive subsequence of S whose length is L0 is not more than B0 and not less than A0.
 The number of '1' in any consecutive subsequence of S whose length is L1 is not more than B1 and not less than A1.
or
b)A single number 1,if the sequence which satisfies the conditions above doesn't exist.
Example
Input: 6 1 2 3 1 1 2 [and 4 test cases more] Output: 010101 [and 4 test cases more]
hide comments
JackDavid127:
20121201 17:07:29
It's a great problem.I learnt more from it.

Added by:  Fudan University Problem Setters 
Date:  20070401 
Time limit:  1s 
Source limit:  50000B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All except: C99 ERL GOSU JSRHINO 
Resource:  Chinese National Olympiad in Informatics 1999,Day 1; translated by Blue Mary 