NOI Contest Archive

Archive / 2022 / Selection Test

Just Pens and Pencils

Medium · National Olympiad in Informatics Sri Lanka - Screening Test 2022

Rangi is a grade 1 student. One day as an activity her teacher gave them a number of pens and pencils and asked them to make a pattern that had the following rules.

Rangi was enthusiastic and fascinated. Later at home, she tried different combinations but she couldn’t form the required pattern. Frustrated she asked her brother Nisura for help. Nisura being a computer science undergraduate he determined to write a computer program to generate patterns.

In his computer programme pens are denoted in “1” and pencils are denoted in “0”.

Note: If there are multiple solutions, you can print any of them.

Input Format

Two space separated integers n and m, denoting the number of pencils and the number of pens respectively.

Output Format

Print the pattern on a single line. If no such pattern is found print -1.

Constraints

Limits

Sample Input 0

1 2

Sample Output 0

101

Sample Input 1

4 7

Sample Output 1

11011010101

Sample Input 2

1 6

Sample Output 2

-1