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

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

于 2022-05-06 发布 文件大小:1.34 MB
0 192
下载积分: 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 个回复

  • dds
    dds->9954的pcb供大家参考,这个扳子我调通了的可以放心开办-dds-
    2023-08-04 01:40:04下载
    积分:1
  • visual prolog for tyros是PDC公司的一个比较经典的prolog教程。
    visual prolog for tyros是PDC公司的一个比较经典的prolog教程。 -visual prolog for tyros is PDC
    2022-01-26 01:32:03下载
    积分:1
  • This Ajax Framework
    This Ajax Framework-This is Ajax Framework
    2022-09-19 03:55:03下载
    积分:1
  • Exercise after
    操作系统教程第四版课后习题答案,孙忠秀主编,高等教育出版社-Exercise after-school tutorial fourth edition of the operating system answers, Sun Zhongxiu editor, Higher Education Press
    2022-02-26 23:37:52下载
    积分:1
  • 93-96usaco的试题与解答,对参加io和acm的同学非常有帮助。-93-96usaco the questions and answers for students to participate in io and acm very helpful.
    2023-05-04 04:40:03下载
    积分:1
  • Single round robin tournament players winning sequence to solve the problem name...
    单循环赛中选手胜负序列求解问题 名称:单循环赛中选手胜负序列求解问题 内容:有n个选手 P 1 ,P 2 ,P 3 ,… ,P n 参加了的单循环赛,每对选手之间非胜即负。现要求求出一个选手序列 P 1 ,P 2 ,P 3 ,… ,P n , 使其满足 P i 胜 P i+ 1 (i=1,… ,n-1) 。 -Single round robin tournament players winning sequence to solve the problem name: the outcome of single round-robin tournament players to solve the problem sequence elements: There are n-player P 1, P 2, P 3, ..., P n participated in a single round-robin between each pair of players Non-win or negative. Players are now required to find a sequence of P 1 " , P 2" , P 3 " , ..., P n" , to meet the P i " W P i+ 1" (i = 1, ..., n-1).
    2022-04-01 08:15:51下载
    积分:1
  • 功能:多线程、E
    功能:多线程、E-mail转发、自动隐藏,huffman、JPEG压缩,全屏、指定区域或最前窗口抓图,窗口或全屏控制方式,彩色或黑白显示,修改注册表、取密码、记录键盘信息等等。 缺点:控制端在WIN98下运行,每抓一幅图会吃掉几十K内存,不知道为什么,在WIN2000下运行没有发现这种情况,知道原因请通知我。E-mail:KelvinSpace@21cn.com Regedit:HKEY_CURRENT_CONFIG/CtrlSrvr设置E-MAIL地址等,电邮密码写在程序中(TVB) 服务端密码:TVB123(注意大小写) 文件:pe2.part01.rar至pe2.part05rar共5个文件 -Features: multi-threaded, E-mail forwarding, auto-hide, huffman, JPEG compression, full screen, specify the area or the front window, drawings, window or full-screen control mode, color or black and white display, modify the registry, get your password, record keyboard information and so on. Drawback: controlling end of the run WIN98, each grasping a plan would eat up tens of K of memory, do not know why, in the running under WIN2000 did not find such a situation, know the reason please let me know. E-mail: KelvinSpace@21cn.com Regedit: HKEY_CURRENT_CONFIG/CtrlSrvr Set E-MAIL addresses, e-mail your password to write in the program (TVB) server-side password: TVB123 (case sen
    2022-08-07 08:55:37下载
    积分:1
  • C 语言编辑器(具有编辑器,编译器诸多功能)
    C 语言编辑器(具有编辑器,编译器诸多功能)-C language editor (with the editor, compiler many functions)
    2022-03-17 06:46:18下载
    积分:1
  • Snake, used to write c#, can control the speed of a snake, the space bar suspens...
    贪吃蛇,用c#写的,可以控制蛇的速度,空格键暂停-Snake, used to write c#, can control the speed of a snake, the space bar suspension
    2022-03-29 22:17:50下载
    积分:1
  • 使用 ManWrap 库在本机 C++ 代码中调用.NET。该程序将向你展示如何以本机方式包装框架类,以便你能不借助 /clr 而在任何 C++/MFC 应用程...
    使用 ManWrap 库在本机 C++ 代码中调用.NET。该程序将向你展示如何以本机方式包装框架类,以便你能不借助 /clr 而在任何 C++/MFC 应用程序中使用它们。在我们的测试案例中,将在一个DLL中包装.NET框架中的 Regex 类,并实现三个使用该包装类的 MFC 程序。你可以用 RegexWrap.dll 在自己的 C++/MFC 应用程序中添加正则表达式支持,或者用 ManWrap 工具来包装自己喜爱的框架类。-use in the C-code call.NET. The program will show you how to approach the packaging machine type framework, so that you can not use/clr and in any C/MFC applications using them. In our test cases, in a DLL packaging.NET framework of Regex class, and to achieve the use of three types of MFC packaging procedures. You can use RegexWrap.dll in their C/MFC application is added to the regular expression support, or used ManWrap tools to package their favorite framework category.
    2022-01-26 03:09:24下载
    积分:1
  • 696516资源总数
  • 106611会员总数
  • 19今日下载