CF1100B Build a Contest

题目描述

### 题目大意 有$n$个题,每个题有一个难度$a_i(1\le a_i\le m)$,从左往右加入题,当加入的题中$m$个难度都出现时,输出$1$并把每个难度都删除一道题,否则输出$0$,求输出序列

输入格式

第一行两个数$m,n$,表示难度个数和题目个数 第二行$n$个整数,表示题目难度

输出格式

一行,表示输出序列

说明/提示

In the first example Arkady held the round after the first three problems, because they are of distinct difficulties, and then only after the last problem.