文件名称:111

  • 所属分类:
  • Windows编程
  • 资源属性:
  • [C/C++] [源码]
  • 上传时间:
  • 2015-12-21
  • 文件大小:
  • 1kb
  • 下载次数:
  • 0次
  • 提 供 者:
  • t**
  • 相关连接:
  • 下载说明:
  • 别用迅雷下载,失败请重下,重下不扣分!

介绍说明--下载内容均来自于网络,请自行研究使用

在生活中,条形码经常用来标志物品的信息。条形码是由黑白相间的条组成的。条的宽度有两种,我们可以认为窄的代表0,宽的代表1。本题中设定宽条的宽度是窄条的两倍。



现有一个条形码扫描工具,可以得到条形码每一条的宽度。你的任务是将这些宽度识别为一个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 say that narrow represents 0, 1 wide representatives. In this problem set wide stripe width is narrow twice. An existing bar code scanning tool, you can get one of the width of each bar code. Your task is to identify these width as a 01 string. It would be a very simple task, but because there will be errors in scanning time, so the problem becomes not so simple. But the results of the scan tool to get up to larger or smaller than the true value of 5 . Please help complete this recognition program. Known barcode at least one wide strip, may not narrow. Input of the first acts of a number n (n < 20), expressed scan of n bars. The second behavior n positive integer, not greater than 10 ^ 8. Output Output is a string of length n of 01, corresponding to a wide strip, strip corresponds to 0. If some article deviation exceeds the limit
(系统自动生成,下载前可以参看下载内容)

下载文件列表





111.cpp

相关说明

  • 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
  • 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度更多...
  • 请直接用浏览器下载本站内容,不要使用迅雷之类的下载软件,用WinRAR最新版进行解压.
  • 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
  • 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
  • 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.

相关评论

暂无评论内容.

发表评论

*主  题:
*内  容:
*验 证 码:

源码中国 www.ymcn.org