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

4.<b>5</b>

  • We have a group of N items (represented by integers from 1 to N), and we know that there is some tot

    We have a group of N items (represented by integers from 1 to N), and we know that there is some total order defined for these items. You may assume that no two elements will be equal (for all a, b: a<b or b<a). However, it is expensive to compare two items. Your task is to make a number of comparisons, and then output the sorted order. The cost of determining if a < b is given by the bth integer of element a of costs (space delimited), which is the same as the ath integer of element b. Naturally, you will be judged on the total cost of the comparisons you make before outputting the sorted order. If your order is incorrect, you will receive a 0. Otherwise, your score will be opt/cost, where opt is the best cost anyone has achieved and cost is the total cost of the comparisons you make (so your score for a test case will be between 0 and 1). Your score for the problem will simply be the sum of your scores for the individual test cases.

    标签: represented integers group items

    上传时间: 2016-01-17

    上传用户:jeffery

  • The XML Toolbox converts MATLAB data types (such as double, char, struct, complex, sparse, logical)

    The XML Toolbox converts MATLAB data types (such as double, char, struct, complex, sparse, logical) of any level of nesting to XML format and vice versa. For example, >> project.name = MyProject >> project.id = 1234 >> project.param.a = 3.1415 >> project.param.b = 42 becomes with str=xml_format(project, off ) "<project> <name>MyProject</name> <id>1234</id> <param> <a>3.1415</a> <b>42</b> </param> </project>" On the other hand, if an XML string XStr is given, this can be converted easily to a MATLAB data type or structure V with the command V=xml_parse(XStr).

    标签: converts Toolbox complex logical

    上传时间: 2016-02-12

    上传用户:a673761058

  • 华东师范大学(面向对象程序设计基于C++)课程全部作业(12次)代码

    华东师范大学(面向对象程序设计基于C++)课程全部作业(12次)代码,包含一个大整数类。(包含作业内容) 1 How to use VC++ & IBM Visual Age (XL) C++ 2 Pointers, Arrays and Structures 3 Operators & Statements 4 Functions 5 Use of classes in STL 6 Define concrete classes 7 Data abstraction 8 Operator Overloading 9 Define integer type with arbitrary precision 10 Virtual functions 11 Templates 12 Exception handling

    标签: 大学 代码 对象 程序设计

    上传时间: 2016-02-24

    上传用户:baiom

  • 编写程序对八皇后问题进行求解:在8行8列的棋盘上放置8个皇后

    编写程序对八皇后问题进行求解:在8行8列的棋盘上放置8个皇后,使任一个皇后都不能吃掉其他的7个皇后(注:皇后可吃掉与她处于同行或同列或同一对角线上的其他棋子),并将结果以某种方式显示出来。 例如,当求出下述的一个解时,可输出如下信息来表示该解(输出了表示摆放皇后的坐标位置以及“棋盘状态”— 棋盘中有皇后的位置放一个“Q”字符,其他位置为“+”字符)。 (1,1) (5,2) (8,3) (6,4) (3,5) (7,6) (2,7) (4,8) Q + + + + + + + + + + + + + Q + + + + + Q + + + + + + + + + + Q + Q + + + + + + + + + Q + + + + + + + + + Q + + + + Q + + + + +

    标签: 编写 程序

    上传时间: 2016-02-27

    上传用户:ynwbosss

  • /*智能型温度感测器: (1)8051的PORT1连接LCD显示器

    /*智能型温度感测器: (1)8051的PORT1连接LCD显示器,PORT3的P3.3,P3.4,P3.5分别连接到LCD控制线,程序执行时可以在LCD显示器显示时间和日期 (2)温度感应组件AD590通过ADC0804将感应到的温度转换数字数据,然后通过PORT0输入8051 (3)8051的第10只和第11只引脚RXD和TXD分别连接到MAX232,然后连接到PC的COM端口 (4)8051实验板每小时读入ADC0804转换的数字温度数据,然后记录在串行EEPROM93C66中 (5)8051实验板可以通过RS232将记录在串行EEPROM93C66中数字温度数据传送到PC端 */

    标签: PORT1 8051 LCD 智能型

    上传时间: 2013-12-13

    上传用户:zaizaibang

  • 车间调度(matlab).rar 1、初始化参数: 族群 60

    车间调度(matlab).rar 1、初始化参数: 族群 60,循环500次,交叉0。8 变异 0。6 代沟0。9 2、初始化群:按调度优先级编码,比如 3个零件,每个零件3个工序,就初始化: 1、3、4、5、6、7、8、9、2 2、1、3、4、5、6、7、8、9 等等

    标签: matlab 60 车间调度

    上传时间: 2014-01-21

    上传用户:lijinchuan

  • 使用时打开此例题目录下pic中的图片

    使用时打开此例题目录下pic中的图片,然后依次单击按钮“转”、“1”、“2”、“3”、“4”和“5”,就可以实现精确的车牌定位。

    标签: pic 目录

    上传时间: 2014-07-05

    上传用户:love_stanford

  • 1.学生成绩管理系统的设计与实现 要求有以下文档: (1)概要设计(电子文档) (2)详细设计(电子文档) (3)课程设计的报告(打印文档) 选题,设计,实现,测试,参考文献

    1.学生成绩管理系统的设计与实现 要求有以下文档: (1)概要设计(电子文档) (2)详细设计(电子文档) (3)课程设计的报告(打印文档) 选题,设计,实现,测试,参考文献 主要包括以下功能就可以了 (1)用户管理 (2)成绩的管理 查询成绩(按学号, 按班级查询, 按课程等查询) 修改学生的成绩 录入学生的成绩 删除学生成绩记录 (3)学生管理 (4)报表 (5)帮助

    标签: 文档 电子 管理系统 报告

    上传时间: 2016-03-16

    上传用户:WMC_geophy

  • 【目录信息】 第一部分 准备程序员考试 第1章 程序员考试指南 1 1.1 程序员考试的形式是什么 2 1.2 考试包含哪些内容 2 1.2.1 声明和访问控制 2 1.2.2

    【目录信息】 第一部分 准备程序员考试 第1章 程序员考试指南 1 1.1 程序员考试的形式是什么 2 1.2 考试包含哪些内容 2 1.2.1 声明和访问控制 2 1.2.2 流控制和异常处理 2 1.2.3 垃圾收集 3 1.2.4 语言基础 3 1.2.5 运算符和赋值 3 1.2.6 重载、覆盖运行时间类型和面向对象 3 1.2.7 线程 3 1.2.8 java.awt包—布局 4 1.2.9 java.lang包 4 1.2.10 java.util包 4 1.2.11 java.io包 4 1.3 本书与程序员考试目标的对应关系 4 1.4 考试是怎么管理的 4 1.5 怎样签约和考试 5

    标签: 程序员 1.1 1.2 目录

    上传时间: 2014-08-06

    上传用户:lx9076

  • 设计一个智力竞赛抢答器

    设计一个智力竞赛抢答器,可同时供8名选手或8个代表队参加比赛,他们的编号分别是0、1、2、3、4、5、6、7,各用一个抢答按钮,按钮的编号与选手的编号相对应,分别是So、S1、S2、S3、S4、S5、S6、S7。 ② 给节目主持人设置一个控制开关,用来控制系统的清零(编号显示数码管灭灯)和抢答的开始。 ③ 抢答器具有数据锁存和显示的功能。抢答开始后,若有选手按动抢答按钮,编号立即锁存,并在LED数码管上显示出选手的编号,同时蜂鸣器给出音响提示。此外,要封锁输入电路,禁止其他选手抢答。优先抢答选手的编号一直保持到主持人将系统清零为止。 • 扩展功能

    标签: 竞赛 抢答器

    上传时间: 2016-04-27

    上传用户:sdq_123