虫虫首页|资源下载|资源专辑|精品软件
登录|注册

ex3

  • ex3-23 亲兄弟问题 « 问题描述: 给定n 个整数0 1 1 , , , n- a a  a 组成的序列。序列中元素i a 的亲兄弟元素k a 定义为: min{

    ex3-23 亲兄弟问题 « 问题描述: 给定n 个整数0 1 1 , , , n- a a  a 组成的序列。序列中元素i a 的亲兄弟元素k a 定义为: min{ | } k i j n j j i a = a a ³ a < < 。 亲兄弟问题要求给定序列中每个元素的亲兄弟元素的位置。元素i a 的亲兄弟元素为k a 时,称k 为元素i a 的亲兄弟元素的位置。当元素i a 没有亲兄弟元素时,约定其亲兄弟元素 的位置为-1。 例如,当n=10,整数序列为6,1,4,3,6,2,4,7,3,5 时,相应的亲兄弟元素位 置序列为:4,2,4,4,7,6,7,-1,9,-1。 « 编程任务: 对于给定的n个整数0 1 1 , , , n- a a  a 组成的序列,试用抽象数据类型栈,设计一个O(n) 时间算法,计算相应的亲兄弟元素位置序列。 « 数据输入: 由文件input.txt提供输入数据。文件的第1 行有1 个正整数n,表示给定给n个整数。 第2 行是0 1 1 , , , n- a a  a 。 « 结果输出: 程序运行结束时,将计算出的与给定序列相应的亲兄弟元素位置序列输出到output.txt 中。 输入文件示例 输出文件示例 input.txt 10 4 2 4 4 7 6 7 -1 9 -1 output.txt 6 1 4 3 6 2 4 7 3 5

    标签: 61516 laquo min 序列

    上传时间: 2013-12-17

    上传用户:shizhanincc

  • Ex2.doc[0] 511.5KB 下载页 ex3.doc[0] 125.5KB 下载页 Ex4.doc[0] 182KB 下载页 Ex5_new.doc[0] 456KB 下载页

    Ex2.doc[0] 511.5KB 下载页 ex3.doc[0] 125.5KB 下载页 Ex4.doc[0] 182KB 下载页 Ex5_new.doc[0] 456KB 下载页 Ex6.doc[0] 309.5KB 下载页 第一题修改.doc[0] 16KB 下载页 互信息凸性.doc[0]

    标签: Ex KB 511.5

    上传时间: 2017-04-21

    上传用户:stvnash

  • ssd7 ex3 答案

    ssd7 ex3 答案,很好很强大,保证100分

    标签: ssd7 ex3

    上传时间: 2013-12-24

    上传用户:z1191176801

  • ssd1 ex3。。。。。。。。。。。。。。。。。。。。。。

    ssd1 ex3。。。。。。。。。。。。。。。。。。。。。。

    标签: ssd1 ex3

    上传时间: 2017-09-16

    上传用户:rishian

  • 6小时学会labview

    6小时学会labview, labview Six Hour Course – Instructor Notes   This zip file contains material designed to give students a working knowledge of labview in a 6 hour timeframe. The contents are: Instructor Notes.doc – this document. labviewIntroduction-SixHour.ppt – a PowerPoint presentation containing screenshots and notes on the topics covered by the course. Convert C to F (Ex1).vi – Exercise 1 solution VI. Convert C to F (Ex2).vi – Exercise 2 solution subVI. Thermometer-DAQ (Ex2).vi – Exercise 2 solution VI. Temperature Monitor (ex3).vi – Exercise 3 solution VI. Thermometer (Ex4).vi – Exercise 4 solution subVI. Convert C to F (Ex4).vi – Exercise 4 solution subVI. Temperature Logger (Ex4).vi – Exercise 4 solution VI. Multiplot Graph (Ex5).vi – Exercise 5 solution VI. Square Root (Ex6).vi – Exercise 6 solution VI. State Machine 1 (Ex7).vi – Exercise 7 solution VI.   The slides can be presented in two three hour labs, or six one hour lectures. Depending on the time and resources available in class, you can choose whether to assign the exercises as homework or to be done in class. If you decide to assign the exercises in class, it is best to assign them in order with the presentation. This way the students can create VI’s while the relevant information is still fresh. The notes associated with the exercise slide should be sufficient to guide the students to a solution. The solution files included are one possible solution, but by no means the only solution.

    标签: labview

    上传时间: 2013-10-12

    上传用户:zjwangyichao

  • ex3_2 求系统的阶跃响应 ex3_3 级联型系统结构的参数求解 ex3_4 并联型系统结构的参数求解 ex3_5 求系统频率抽样型结构 ex3_6 全零点性滤波器Lattic结构 ex3

    ex3_2 求系统的阶跃响应 ex3_3 级联型系统结构的参数求解 ex3_4 并联型系统结构的参数求解 ex3_5 求系统频率抽样型结构 ex3_6 全零点性滤波器Lattic结构 ex3_7 全极点性滤波器Lattic结构 ex3_8 零极点性滤波器Lattic结构

    标签: ex Lattic ex3

    上传时间: 2014-12-03

    上传用户:gmh1314