{"problem":{"name":"C. Anime","description":{"content":"Little Lesha studies in the sixth grade. Lesha is not the best performing student, and that's why his interests are rather peculiar. In particular, he finds it exciting to watch Chinese cartoons that ","description_type":"Markdown"},"platform":"Codeforces","limit":{"time_limit":1000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"CF10263C"},"statements":[{"statement_type":"Markdown","content":"Little Lesha studies in the sixth grade. Lesha is not the best performing student, and that's why his interests are rather peculiar. In particular, he finds it exciting to watch Chinese cartoons that are commonly known as anime.\n\nOnce, Lesha decided to skip school and devote the whole day to his favorite activity — watching anime. However, suddenly, he realized that there is a lot of trash on the shelf where he stores his anime discs.\n\nThe shelf contains $n$ items. The items are arranged in a row, i.e. can be enumerated from $1$ to $n$. The $i$-th item might be either trash or and anime disc. Lesha remembers that he has exactly $k$ discs, and that the $i$-th disc is located somewhere between the positions $l_i$ and $r_i$, inclusive.\n\nHelp Lesha clean the shelf and regain hope for a better future.\n\nThe first line contains two integers separated by space: $n$, $k$. Each of the following $k$ lines also contains two integers: $l_i$, $r_i$. \n\n$1 <= n <= 100228$\n\n$0 <= k <= n$\n\n$1 <= l_i <= r_i <= n$\n\nPrint $n$ integer numbers, each equal to $0$ or $1$. The $i$-th number should be equal to $1$ if and only if the $i$-th item on the shelf is trash. It is guaranteed that one can always find an unambiguous solution.\n\n## Input\n\nThe first line contains two integers separated by space: $n$, $k$. Each of the following $k$ lines also contains two integers: $l_i$, $r_i$. $1 <= n <= 100228$$0 <= k <= n$$1 <= l_i <= r_i <= n$\n\n## Output\n\nPrint $n$ integer numbers, each equal to $0$ or $1$. The $i$-th number should be equal to $1$ if and only if the $i$-th item on the shelf is trash. It is guaranteed that one can always find an unambiguous solution.\n\n[samples]","is_translate":false,"language":"English"},{"statement_type":"Markdown","content":"**Definitions**  \nLet $ n \\in \\mathbb{Z}^+ $ be the number of items on the shelf.  \nLet $ k \\in \\mathbb{Z}_{\\geq 0} $ be the number of anime discs.  \nFor each $ i \\in \\{1, \\dots, k\\} $, let $ [l_i, r_i] \\subseteq \\{1, \\dots, n\\} $ be the interval where the $ i $-th disc is located.\n\n**Constraints**  \n1. $ 1 \\leq n \\leq 100228 $  \n2. $ 0 \\leq k \\leq n $  \n3. For each $ i \\in \\{1, \\dots, k\\} $: $ 1 \\leq l_i \\leq r_i \\leq n $  \n4. There exists a unique set $ D \\subseteq \\{1, \\dots, n\\} $ of size $ k $ such that $ |D \\cap [l_i, r_i]| = 1 $ for all $ i \\in \\{1, \\dots, k\\} $.\n\n**Objective**  \nOutput a sequence $ T = (t_1, t_2, \\dots, t_n) \\in \\{0,1\\}^n $, where:  \n$$\nt_i = \n\\begin{cases}\n1 & \\text{if } i \\notin D \\\\\n0 & \\text{if } i \\in D\n\\end{cases}\n$$  \ni.e., $ t_i = 1 $ iff the $ i $-th item is trash.","is_translate":false,"language":"Formal"}],"meta":{"iden":"CF10263C","tags":[],"sample_group":[],"created_at":"2026-03-03 11:00:39"}}