N persons are going to attend a ball, in order to make acquaintance with other people. But they don't like to make friends with too many persons. As the organizer, you have asked each of them about the number of friends he wants to make acquaintance with. Assume that the ith person needs EXACTLY a[i] friends, how could you arrange their meets to satisfy all the needs of them?
Perhaps you need a computer to help you. You are given the number of attendants and the exact number of friends each person wants to have, you must give out a configuration of acquaintances after your ball.
The first line of each test case stands a integer N (1<=N<=100), which means the number of attendants to the ball. The second line contains N integers, which are the number of friends each person needs, the ith number a[i] means the ith person needs a[i] friends. The input ends up with N = 0, which should not be proceeded.
If it is impossible to satisfy all the needs, print a single line "~><~".
Otherwise, print out the configuration matrix of acquaintances after your arrangement. The matrix contains n lines and each line contains n integers (1 or 0). A '1' in the ith row and the jth column means the ith person have made friends with the jth person (of course that the jth person also made friends with the ith person), A '0' means they are not friends. Use exactly one space between two adjacent integers. Don't print any other character in the matrix.
If there are multiple solutions for the needs, any one is acceptable.
Print a blank line between two cases.
- 下载 计算机组成原理实验教程
- 博客 Java 最常见的 200+ 面试题：面试必备
- 下载 winfrom中嵌套html，跟html的交互
- 学院 玩转Python-Python3基础入门
- 学院 程序员的兼职技能课
- 学院 HoloLens2开发入门教程
- 下载 基于VHDL的16位ALU简易设计
- 下载 利用Verilog实现数字秒表（基本逻辑设计分频器练习）
- 学院 Python可以这样学（第一季：Python内功修炼）
- 下载 计算机操作系统 第三版.pdf
- 博客 技术大佬：我去，你写的 switch 语句也太老土了吧
- 学院 Vue.js 2.0之全家桶系列视频课程
- 学院 微信公众平台开发入门
- 学院 150讲轻松搞定Python网络爬虫
- 下载 SEIR课程设计源码与相关城市数据.rar
- 学院 Python数据挖掘简易入门
- 学院 2019 AI开发者大会
- 博客 Java面试题大全（2020版）
- 下载 定量遥感中文版 梁顺林著 范闻捷译
- 下载 GIS程序设计教程 基于ArcGIS Engine的C#开发实例
- 学院 三个项目玩转深度学习（附1G源码）
- 学院 微信小程序开发实战之番茄时钟开发
- 博客 面试了一个 31 岁程序员，让我有所触动，30岁以上的程序员该何去何从？
- 下载 去除异常值matlab程序
- 下载 用verilog HDL语言编写的秒表
- 下载 [透视java——反编译、修补和逆向工程技术]源代码