文件名称:mofang
- 所属分类:
- 控制台(字符窗口)编程
- 资源属性:
- [Text]
- 上传时间:
- 2014-09-21
- 文件大小:
- 1kb
- 下载次数:
- 0次
- 提 供 者:
- chen****
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
在生活中,条形码经常用来标志物品的信息。条形码是由黑白相间的条组成的。条的宽度有两种,我们可以认为窄的代表0,宽的代表1。本题中设定宽条的宽度是窄条的两倍。
楠神拥有很强的DIY精神,他决定做一个条形码识别工具。首先他完成了图像识别部分,得到了一系列条的宽度。他希望将这些宽度识别为一个01串。本来这是一个非常简单的任务,可是由于楠神在识别的时候会有误差,使得问题变得没那么简单了。不过楠神认为测量得到的结果最多比真实值大或小5 。请你帮忙完成这个识别程序。已知条形码中至少有一个是宽条,可能没有窄条。
输入第一行为一个数字n(n<20),表示楠神识别出了n个条。
第二行为n个正整数,均不大于10^8。
输出为一个长度为n的01串,宽条对应1,窄条对应0。如果有些条偏差的超过了限制,输出“Bad Barcodes”-In life, the bar code information is often used to mark items. Barcode is composed of black and white stripes. The width of the strip, there are two, we can consider a narrow represents 0, representative of a wide. In this problem is to set the width of the narrow width twice. Nan has a strong DIY spirit of God, he decided to do a barcode recognition tools. First he completed a image recognition part, a series of width. He hoped that these widths identified as a 01 string. It would be a very simple task, but because Nan God when there will be errors in identification, making the problem becomes not so simple. But Nan God think the results measured up to larger or smaller than the true value of 5 . Please help complete the identification process. Known in the bar code is at least one wide strip, the strips may not be. Enter the first acts of a number n (n < 20), said Nan God identified the n-bar. The second behavior n positive integers not greater than 10 ^ 8. Output that is a string
楠神拥有很强的DIY精神,他决定做一个条形码识别工具。首先他完成了图像识别部分,得到了一系列条的宽度。他希望将这些宽度识别为一个01串。本来这是一个非常简单的任务,可是由于楠神在识别的时候会有误差,使得问题变得没那么简单了。不过楠神认为测量得到的结果最多比真实值大或小5 。请你帮忙完成这个识别程序。已知条形码中至少有一个是宽条,可能没有窄条。
输入第一行为一个数字n(n<20),表示楠神识别出了n个条。
第二行为n个正整数,均不大于10^8。
输出为一个长度为n的01串,宽条对应1,窄条对应0。如果有些条偏差的超过了限制,输出“Bad Barcodes”-In life, the bar code information is often used to mark items. Barcode is composed of black and white stripes. The width of the strip, there are two, we can consider a narrow represents 0, representative of a wide. In this problem is to set the width of the narrow width twice. Nan has a strong DIY spirit of God, he decided to do a barcode recognition tools. First he completed a image recognition part, a series of width. He hoped that these widths identified as a 01 string. It would be a very simple task, but because Nan God when there will be errors in identification, making the problem becomes not so simple. But Nan God think the results measured up to larger or smaller than the true value of 5 . Please help complete the identification process. Known in the bar code is at least one wide strip, the strips may not be. Enter the first acts of a number n (n < 20), said Nan God identified the n-bar. The second behavior n positive integers not greater than 10 ^ 8. Output that is a string
(系统自动生成,下载前可以参看下载内容)
下载文件列表
C语言编程--魔方问题.txt