{"raw_statement":[{"iden":"statement","content":"You are given matrix with _n_ rows and _n_ columns filled with zeroes. You should put _k_ ones in it in such a way that the resulting matrix is symmetrical with respect to the main diagonal (the diagonal that goes from the top left to the bottom right corner) and is lexicographically maximal.\n\nOne matrix is lexicographically greater than the other if the first different number in the first different row from the top in the first matrix is greater than the corresponding number in the second one.\n\nIf there exists no such matrix then output _\\-1_."},{"iden":"input","content":"The first line consists of two numbers _n_ and _k_ (1 ≤ _n_ ≤ 100, 0 ≤ _k_ ≤ 106)."},{"iden":"output","content":"If the answer exists then output resulting matrix. Otherwise output _\\-1_."},{"iden":"examples","content":"Input\n\n2 1\n\nOutput\n\n1 0 \n0 0 \n\nInput\n\n3 2\n\nOutput\n\n1 0 0 \n0 1 0 \n0 0 0 \n\nInput\n\n2 5\n\nOutput\n\n\\-1"}],"translated_statement":[{"iden":"statement","content":"给你一个大小为 #cf_span[n] × #cf_span[n] 的矩阵，初始时所有元素均为 0。你需要在其中放置 #cf_span[k] 个 1，使得结果矩阵关于主对角线（从左上角到右下角的对角线）对称，并且字典序最大。\n\n如果一个矩阵在从上到下第一个不同的行中，第一个不同的元素大于另一个矩阵对应位置的元素，则称该矩阵字典序更大。\n\n如果不存在这样的矩阵，则输出 _-1_。\n\n第一行包含两个数 #cf_span[n] 和 #cf_span[k]（#cf_span[1 ≤ n ≤ 100]，#cf_span[0 ≤ k ≤ 106]）。\n\n如果答案存在，请输出得到的矩阵；否则输出 _-1_。\n\n"},{"iden":"input","content":"第一行包含两个数 #cf_span[n] 和 #cf_span[k]（#cf_span[1 ≤ n ≤ 100]，#cf_span[0 ≤ k ≤ 106]）。"},{"iden":"output","content":"如果答案存在，请输出得到的矩阵；否则输出 _-1_。"},{"iden":"examples","content":"输入\n2 1\n输出\n1 0\n0 0\n\n输入\n3 2\n输出\n1 0 0\n0 1 0\n0 0 0\n\n输入\n2 5\n输出\n-1"}],"sample_group":[],"show_order":[],"formal_statement":"**Definitions**  \nLet $ n \\in \\mathbb{Z}^+ $, $ k \\in \\mathbb{Z}_{\\geq 0} $.  \nLet $ A \\in \\{0,1\\}^{n \\times n} $ be a binary matrix.  \n\n**Constraints**  \n1. $ A $ is symmetric: $ A_{i,j} = A_{j,i} $ for all $ i,j \\in \\{1, \\dots, n\\} $.  \n2. $ \\sum_{i=1}^n \\sum_{j=1}^n A_{i,j} = k $.  \n3. $ A $ is lexicographically maximal among all symmetric $ n \\times n $ binary matrices with exactly $ k $ ones.  \n\n**Objective**  \nIf such a matrix $ A $ exists, output $ A $. Otherwise, output $-1$.","simple_statement":null,"has_page_source":false}