一:需求分析 1. 问题描述 魔王总是使用自己的一种非常精练而抽象的语言讲话,没人能听懂,但他的语言是可逐步解释成人能听懂的语言,因为他的语言是由以下两种形式的规则由人的语言逐步抽象上去的: ----------------------------------------------------------- (1) a---> (B1)(B2)....(Bm) (2)[(op1)(p2)...(pn)]---->[o(pn)][o(p(n-1))].....[o(p1)o] ----------------------------------------------------------- 在这两种形式中,从左到右均表示解释.试写一个魔王语言的解释系统,把 他的话解释成人能听得懂的话. 2. 基本要求: 用下述两条具体规则和上述规则形式(2)实现.设大写字母表示魔王语言的词汇 小写字母表示人的语言的词汇 希腊字母表示可以用大写字母或小写字母代换的变量.魔王语言可含人的词汇. (1) B --> tAdA (2) A --> sae 3. 测试数据: B(ehnxgz)B 解释成 tsaedsaeezegexenehetsaedsae若将小写字母与汉字建立下表所示的对应关系,则魔王说的话是:"天上一只鹅地上一只鹅鹅追鹅赶鹅下鹅蛋鹅恨鹅天上一只鹅地上一只鹅". | t | d | s | a | e | z | g | x | n | h | | 天 | 地 | 上 | 一只| 鹅 | 追 | 赶 | 下 | 蛋 | 恨 |
上传时间: 2014-12-02
上传用户:jkhjkh1982
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
用在X86芯片的嵌入式系统中的自动更新程序,c语言开发。网络,文件等操作值得一看
上传时间: 2014-12-06
上传用户:lz4v4
用applet实现的一个程序,可以从网络从网络取得文件
上传时间: 2016-03-15
上传用户:洛木卓
一个在线的文档管理,很适合公司局域网内的文件贡献共享管理,三城的模式
标签: 文档
上传时间: 2016-06-06
上传用户:z1191176801
现今的社会是一个信息飞速发达的社会,其中在信息的交流当中,互联网占据着一个非常重要的位置。人们可以通过在互联网上收到最新的消息,也可以通过互联网进行信息的交流。而论坛就是大家进行信息交流的其中一个渠道。 论坛的概念:论坛(BBS)是Bulletin-Board-System的缩写,即电子公告栏。它是一种在Internet网上开放的信息服务系统,通过论坛用户可以方便的实现信息的交换和文件的共享。 本文主要完成了基于JSP技术的信息交流论坛的设计和实现,主要实现了客户端和服务器端的动态交互。该系统包含六个模块:论坛用户登陆注册模块,论坛账户信息模块,论坛文章发布模块,公告/制度模块,版块管理模块,信息管理模块。论文详细描述了模块的结构、功能以及具体设计过程。系统采用了JSP技术以及JavaBeans组件技术和JDBC技术实现。 关键词:JSP,BBS,MYSQL,JavaBeans,系统设计
标签:
上传时间: 2013-12-03
上传用户:wangzhen1990
Pspice教程课程内容: 在这个教程中,我们没有提到关于网络表中的Pspice 的网络表文件输出,有关内容将会在 后面提到!而且我想对大家提个建议:就是我们不要只看波形好不好,而是要学会分析,分 析不是分析的波形,而是学会分析数据,找出自己设计中出现的问题!有时候大家可能会看 到,其实电路并没有错,只是有时候我们的仿真设置出了问题,需要修改。有时候是电路的 参数设计的不合理,也可能导致一些莫明的错误!
上传时间: 2016-08-05
上传用户:黑漆漆
很棒的一本实现数据结构的书,能帮助你理解数据结构,了解实现。适合初学者。 此资源来源于网络,拿出来共享一下
标签: 数据结构
上传时间: 2016-09-19
上传用户:xauthu
socket控件的初级应用,用于网络间文件的传输
上传时间: 2013-12-23
上传用户:comua
汉诺塔!!! Simulate the movement of the Towers of Hanoi puzzle Bonus is possible for using animation eg. if n = 2 A→B A→C B→C if n = 3 A→C A→B C→B A→C B→A B→C A→C
标签: the animation Simulate movement
上传时间: 2017-02-11
上传用户:waizhang