The government of a small but important country has decided that the alphabet needs to be streamlined and reordered. Uppercase letters will be eliminated. They will issue a royal decree in the form of a String of B and A characters. The first character in the decree specifies whether a must come ( B )Before b in the new alphabet or ( A )After b . The second character determines the relative placement of b and c , etc. So, for example, "BAA" means that a must come Before b , b must come After c , and c must come After d . Any letters beyond these requirements are to be excluded, so if the decree specifies k comparisons then the new alphabet will contain the first k+1 lowercase letters of the current alphabet. Create a class Alphabet that contains the method choices that takes the decree as input and returns the number of possible new alphabets that conform to the decree. If more than 1,000,000,000 are possible, return -1. Definition
标签: government streamline important alphabet
上传时间: 2015-06-09
上传用户:weixiao99
电力系统在台稳定计算式电力系统不正常运行方式的一种计算。它的任务是已知电力系统某一正常运行状态和受到某种扰动,计算电力系统所有发电机能否同步运行 1运行说明: 请输入初始功率S0,形如a+bi 请输入无限大系统母线电压V0 请输入系统等值电抗矩阵B 矩阵B有以下元素组成的行矩阵 1正常运行时的系统直轴等值电抗Xd 2故障运行时的系统直轴等值电抗X d 3故障切除后的系统直轴等值电抗 请输入惯性时间常数Tj 请输入时段数N 请输入哪个时段发生故障Ni 请输入每时段间隔的时间dt
上传时间: 2015-06-13
上传用户:it男一枚
第一章绪论 5 1.1课题来源 5 1.2 开发工具的选择 5 1.3 本文所做工作 6 第二章 需求分析 7 2.1 总体需求调查 7 2.1.1 组织结构图 7 2.1.2 系统目标 7 2.1.3 应用现状调查 7 2.1.4业务总体流程调查 8 2.2系统功能调查 9 2.2.1系统维护功能 9 2.3系统功能模块图 9 第三章 概要设计 10 3.1概念设计 10 3.2数据库设计 11 3.2.1 Yhklb用户口令表 11 第四章 详细设计 13 4.1启动界面设计 13 4.1.1 功能说明 13 4.1.2屏幕格式设计 13 4.2 登录窗口设计 14 4.2.1功能说明 14 4.2.2屏幕格式设计 14 4.2.3源程序分析 14 4.3 主窗口设计 16 4.3.1功能说明 16 4.3.2屏幕格式设计 16 4.3.3源程序分析 17 4.4系统维护模块设计 22 4.4.1基本参数维护 22
上传时间: 2014-01-22
上传用户:libinxny
JAVA实现的聊天工具,可以容纳最多10个用户 1.本系统需要JDK1.5 或更高版本的支持。 2.serverDatabase为服务器端的数据文件. 若使用现有数据,可用帐号:1, 密码:zwz,登录服务器端系统 登录后可查到所有已注册用户的信息,每个用户的密码都与其姓名相同。 3.由于客户端之间的通讯不通过服务器转发,所以每台机器只能正常能运行一个客户端(虚拟机可以提供测试平台). 与另一客户端成功通讯之前,必须首先把对方加为好友。 4.主要制作时间: 06.2.21 - 06.4.9
标签: serverDatabase JAVA 1.5 JDK
上传时间: 2015-09-16
上传用户:SimonQQ
基于MCS-51单片机的数字钟设计 [摘要] III [ABSTRACT] IV 引言 1 1绪论 2 1.1 集成电路 2 1.2 主要技术的背景 2 1.2.1 发展历史 2 1.2.2 现状 3 1.2.3 发展趋势 3 2器件简介 4 2.1 LED显示器 4 2.1.1 LED显示器的结构 4 2.1.2 LED的接线形式 5 2.2 AT89C52简介 5 2.2.1 AT89C52主要性能参数: 5 2.2.2 AT89C52单片机的功能特性概述: 6 2.3 DS1302芯片 9 2.3.1 DS1302的性能特性: 9 2.3.2 DS1302数据操作原理 10 2.4 74LS164-八位移位寄存器 14 2.4.1 74LS64简介 14 2.4.2 74LS164逻辑介绍: 15 3硬件电路 17 3.1 线路的设计 17 3.1.1 电源转换模块 18 3.1.2 主控制模块 18 3.1.3 显示模块 19 3.1.4 键盘接口设计 20 3.2 电路图的绘制 20 3.3 电路板的焊接 20 3.4 打开电源前应注意的问题 20 4软件设计部分 21 4.1 阳历程序的设计 21 4.2 时间调整程序设计 21 4.3 阴历程序设计 23 5调试 28 6小结 29 7致谢 30 8参考文献 31 9附录 32
上传时间: 2015-10-17
上传用户:xuan‘nian
一:需求分析 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
K3:--- P1.6 K4:--- P1.7 BEEP:--- P3.7 K3 --- 控制按键 K4 --- 清零按键 开机显示: SECOND-CLOCK 0 TIME 00:00:00:00 K3 --- 控制按键: 第一次按下时,开始计时。 显示 BEGIN COUNT 1 TIME 00:00:01:88 第二次按下时,暂停计时。 显示 PAUST COUNT 2 TIME 00:00:01:88 第三次按下时,累计计时。
标签: SECOND-CLOCK K3 BEEP K4
上传时间: 2016-05-10
上传用户:清风冷雨
(2,1,9)VB译码器Verilog代码
标签:
上传时间: 2016-07-09
上传用户:iswlkje
学生选修课程管理系统的设计与实现 目 录 一、需求分析 2 1.1系统简要分析 2 1.2 应用需求分析 2 二、概要设计 4 2.1业务流分析 4 2.2数据流分析 4 2.3程序数据流程分析及流程设计 4 2.4数据字典 7 2.5系统数据模型设计 8 2.5.1 E-R图 8 2.5.2数据库建表 9 三、详细设计 11 3.1登陆模块的设计与功能实现:界面设计如下: 11 3.2系统管理 11 3.2.1系统管理菜单 11 3.2.2用户管理窗口 12 3.3管理员操作 12 3.4学生信息界面设计与功能实现 13 3.5课程信息界面设计与功能的设计 17 3.6选课界面设计与功能实现 18 四、调试分析和小结 20 五、参考文献 23
上传时间: 2016-08-08
上传用户:edisonfather