登录
首页 » 其他项目 » uva10324解法(提共題目和解法程式)

uva10324解法(提共題目和解法程式)

于 2022-05-06 发布 文件大小:1.34 MB
0 142
下载积分: 2 下载次数: 1

代码说明:

題目說明:給你一連串僅包含0和1的字串 (字串長度最大到1000000,字串從第0個字元開始),要請你回答我們在第i個和第j個字元之間(包含第i個和第j個)、 是否所有的字元均相同 (均為1或均為0)。如果均相同請回答Yes、 否則請回答No。输入每筆測試資料的第一列為一個僅包含0和1的字串,下一列有1個整數n 代表對於上一列字串以下有n個問題。皆下來的 n 列每列有2個非負的整數分別代表 i和 j。输出對每一列測試字串,請先輸出第幾個的案例。然後根據 n 個問題回答肯定或否定的。解法:1.用获取讀入整行字串輸入、 並計算長度2.先判斷第 0 個位置,为 0 則把 0 存入另一個整數陣列,为 1 則存 13.用迴圈把字串陣列轉換存到整數陣列、 遇到字元 0 則值不變、 遇到字元 1 則加 14.欲判斷的i、 j位置都為字元 0、 且整數陣列i、 j位置的值相同、 代表有一連串 0、 輸出是5.欲判斷的i j位置都為字元 1,且整數陣列i、 j位置的值相減為i、 j的差、 代表有一連串 1,輸出是6.其他情況輸出号

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • AD9954控制C51以及产生ASK、PSK等信号
    AD9954控制C51以及产生ASK、PSK等信号-AD9954 control and C51 have ASK, PSK signals, etc.
    2022-01-25 22:41:27下载
    积分:1
  • 阿斯蒂芬呵呵呵无可厚非卡拉蜂快乐圣诞节翻开历史的肌肤
    阿斯蒂芬呵呵呵无可厚非卡拉蜂快乐圣诞节翻开历史的肌肤-阿斯蒂芬
    2023-03-25 23:15:04下载
    积分:1
  • ASP站长助手 v4.0 功能增强版 站内文件在线管理功能,无组件上传功能,可操作MSSQL数据库和Access数据库。包括浏览数据和添加,删除,修改数据,建立
    ASP站长助手 v4.0 功能增强版 站内文件在线管理功能,无组件上传功能,可操作MSSQL数据库和Access数据库。包括浏览数据和添加,删除,修改数据,建立数据表,修改数据库等,非select命令提供一个SQL输入框给大家输入SQL指令来执行-ASP Stationmaster the assistant v4.0 function enhancement version stands the document on-line management function, does not have on the module to pass on the function, may operate the MSSQL database and the Access database. Including the browsing data and the increase, deletes, revises the data, establishes the data sheet, revises the database and so on, the non- select order provides a SQL input frame to input the SQL instruction for everybody to carry out
    2023-06-19 03:00:03下载
    积分:1
  • 这是一个弹球的游戏,不过有些粗糙。基本功能还是可以的
    这是一个弹球的游戏,不过有些粗糙。基本功能还是可以的-This is a pinball game, but some rough. Basic functions can still be the
    2022-05-07 15:04:24下载
    积分:1
  • on the transverse mode of the electromagnetic wave, can be used to increase thei...
    关于bragg光纤的电磁波横模的计算,用其可以给加好的了解bragg的模式特性-on the transverse mode of the electromagnetic wave, can be used to increase their understanding of good characteristics of the model bragg
    2022-03-30 06:38:57下载
    积分:1
  • 简单的视频超市管理系统。java语言开发而成。初学者可以一看...
    简单的视频超市管理系统。java语言开发而成。初学者可以一看-Simple video store management system. java language developed. Beginners can see
    2022-04-18 05:52:46下载
    积分:1
  • 这个是sap开发语言abap的一个例子,根据这个例子学习abap开发
    这个是sap开发语言abap的一个例子,根据这个例子学习abap开发-This is a development language ABAP sap an example, according to this example to learn ABAP Development
    2022-01-26 00:05:10下载
    积分:1
  • Thanks for downloading my Logix RC flight simulator. This is a Micro$oft Visual...
    Thanks for downloading my Logix RC flight simulator. This is a Micro$oft Visual C++ project, so it would be easiest for you to open it with MSVC++ but if you dont have it, you can always use your own compiler, the source files are all there. My program uses some free library offered by Microsoft that make direct X much easier and faster to use. They are located in the 3dPlus directory, you will have to add them to the lib, and include directory on your compiler. The EXE is included, it searches for a bitmap to use as the ground, this is determined in the source. Im know the commenting on the source leaves some to be expected, but i ve run low on time. If you need help, source code to the librarys, or anything else email me at: logix@ionet.net I ll even send you a CD with everything on it if you mail me a few dollars. Please feel free to distribute this but leave it intact.-Thanks for downloading my Logix RC flight simulator. This is a Micro$oft Visual C++ project, so it would be easies
    2023-02-10 18:55:03下载
    积分:1
  • powerbuilder开发的一个仓库程序
    powerbuilder开发的一个仓库程序-PowerBuilder development of a warehouse procedures
    2022-03-22 14:05:48下载
    积分:1
  • 自营店增加查看缴款记录功能,可以查看门店缴款。 记录数据,门店只能查看自己的缴款记录。 使用同价调拨和变价调拨可以产生相应的GSP报表,...
    自营店增加查看缴款记录功能,可以查看门店缴款。 记录数据,门店只能查看自己的缴款记录。 使用同价调拨和变价调拨可以产生相应的GSP报表,即做完同价调拨和变价调拨,可以到对应报表中调用同价调拨单和同价调拨单生成GSP报表。 增加“盘点数量为零商品显示”功能,并增加对盘点时有改动商品的颜色标注,便于对有盘点改动商品的进行跟踪,并且可以在盘点过程中添加电脑中没有的库存商品(自动盘营盘亏中)。 库存盘点时增加“产地”、“备注”和“生产厂家”字段(自动盘盈盘亏)。-payment record increase View function can check stores contributions. Records data, stores can only check their payment record. Using the same price allocation and price changes can have a corresponding allocation of the GSP statements, the same price that is done allocation and price variable allocation, statements corresponding to the call to allocate the same price and with the price of single-generation GPS allocation statements. Increase the "zero inventory quantity of goods shows that the" function, and increase the inventory of goods has changed the color tagging, facilitate inventory changes to a commodity tracking, and inventory in the process of adding a computer without the stock (automatic disk business inventory
    2022-09-26 12:40:03下载
    积分:1
  • 696518资源总数
  • 105547会员总数
  • 4今日下载