302205: CF421A. Pasha and Hamsters

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

Pasha and Hamsters

题意翻译

**题目描述** **Pasha**有两只仓鼠:**Arthur**和**Alexander**。**Pasha**放了$N$个苹果在他们面前。**Pasha**知道**Arthur**喜欢哪些苹果。同样,**Pafha**知道**Alexander**喜欢哪些苹果。**Pasha**不希望仓鼠之间发生任何冲突(因为他们可能喜欢同一个苹果),所以他决定自己在仓鼠之间分发苹果。他要给**Arthur**和**Alexander**的苹果一些苹果。每只仓鼠获得多少苹果并不重要,但重要的是每只仓鼠只能获得他喜欢的苹果。有仓鼠可能没有得到任何苹果。 帮助**Pasha**分发仓鼠之间的所有苹果。请注意,**Pasha**想要分发所有苹果,而不仅仅是其中一些。

题目描述

Pasha has two hamsters: Arthur and Alexander. Pasha put $ n $ apples in front of them. Pasha knows which apples Arthur likes. Similarly, Pasha knows which apples Alexander likes. Pasha doesn't want any conflict between the hamsters (as they may like the same apple), so he decided to distribute the apples between the hamsters on his own. He is going to give some apples to Arthur and some apples to Alexander. It doesn't matter how many apples each hamster gets but it is important that each hamster gets only the apples he likes. It is possible that somebody doesn't get any apples. Help Pasha distribute all the apples between the hamsters. Note that Pasha wants to distribute all the apples, not just some of them.

输入输出格式

输入格式


The first line contains integers $ n $ , $ a $ , $ b $ $ (1<=n<=100; 1<=a,b<=n) $ — the number of apples Pasha has, the number of apples Arthur likes and the number of apples Alexander likes, correspondingly. The next line contains $ a $ distinct integers — the numbers of the apples Arthur likes. The next line contains $ b $ distinct integers — the numbers of the apples Alexander likes. Assume that the apples are numbered from $ 1 $ to $ n $ . The input is such that the answer exists.

输出格式


Print $ n $ characters, each of them equals either 1 or 2. If the $ i $ -h character equals 1, then the $ i $ -th apple should be given to Arthur, otherwise it should be given to Alexander. If there are multiple correct answers, you are allowed to print any of them.

输入输出样例

输入样例 #1

4 2 3
1 2
2 3 4

输出样例 #1

1 1 2 2

输入样例 #2

5 5 2
3 4 1 2 5
2 3

输出样例 #2

1 1 1 1 1

Input

题意翻译

**题目描述** **Pasha**有两只仓鼠:**Arthur**和**Alexander**。**Pasha**放了$N$个苹果在他们面前。**Pasha**知道**Arthur**喜欢哪些苹果。同样,**Pafha**知道**Alexander**喜欢哪些苹果。**Pasha**不希望仓鼠之间发生任何冲突(因为他们可能喜欢同一个苹果),所以他决定自己在仓鼠之间分发苹果。他要给**Arthur**和**Alexander**的苹果一些苹果。每只仓鼠获得多少苹果并不重要,但重要的是每只仓鼠只能获得他喜欢的苹果。有仓鼠可能没有得到任何苹果。 帮助**Pasha**分发仓鼠之间的所有苹果。请注意,**Pasha**想要分发所有苹果,而不仅仅是其中一些。

加入题单

算法标签: