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
MISRA (The Motor Industry Software Reliability Association 汽車工業軟件可靠性聯會) 是位于英國的一個跨國汽車工業協會,其成員包括了大部分歐美汽車生產商。其核心使命是為汽車工業提供服務和協助,幫助廠方開發安全的、高可靠性的嵌入式軟件。這個組織最出名的成果是所謂的MISRA C Coding Standard,這一標準中包括了127條C語言編碼標準,通常認為,如果能夠完全遵守這些標準,則你的C代碼是易讀、可靠、可移植和易于維護的。最近很多嵌入式開發者都以MISRA C來衡量自己的編碼風格,比如著名的uC/OS-II就得意地宣稱自己99%遵守MISRA標準。而《嵌入式開發雜志》也專門載文號召大家學習。編碼規范通常是一個公司自定的“土政策”,居然有人去做標準,而且還得到廣泛的認可,這不禁引起我強烈的興趣??上н@份標準的文本需要花錢去買,而且短短幾十頁,要價非常昂貴。MISRA在網上公布了一些文檔,其中有關于MISRA C Coding Standard的Clarification報告,從中間你可以大致猜到MISRA標準本身是什么。
標簽: Association Reliability Industry Software
上傳時間: 2013-12-27
上傳用戶:wangzhen1990
This section contains a brief introduction to the C language. It is intended as a tutorial on the language, and aims at getting a reader new to C started as quickly as possible. It is certainly not intended as a substitute for any of the numerous textbooks on C. 2. write a recursive function FIB (n) to find out the nth element in theFibanocci sequence number which is 1,1,2,3,5,8,13,21,34,55,…3. write the prefix and postfix form of the following infix expressiona + b – c / d + e * f – g * h / i ^ j4. write a function to count the number of nodes in a binary tr
標簽: introduction the contains intended
上傳時間: 2013-12-23
上傳用戶:liansi
Note that only the PORT is provided and it is assumed that you have the rest of the source for µ C/OS-II from the book or the upgrade.
上傳時間: 2013-11-25
上傳用戶:er1219
This book is a hands-on introduction to the principles and practice of embedded system design using the PIC microcontroller. Packed with helpful examples and illustrations, it gives an in-depth treatment of microcontroller design, programming in both assembly language and C, and features advanced topics such as networking and real-time operating systems. It is accompanied by a CD-ROM containing copies of all programs and software tools used in the text and a `student version of the C complier Designing Embedded Systems with PIC Microcontrollers: Principles and Applications is ideal for students of electronics, mechatronics and computer engineering. Engineers in industry and informed hobbyists will also find this book a valuable resource when designing and implementing both simple and sophisticated embedded systems using the PIC Microcontroller.
標簽: introduction principles hands-on embedded
上傳時間: 2014-01-17
上傳用戶:wuyuying
The ability to write efficient, high-speed arithmetic routines ultimately depends upon your knowledge of the elements of arithmetic as they exist on a computer. That conclusion and this book are the result of a long and frustrating search for information on writing arithmetic routines for real-time embedded systems. With instruction cycle times coming down and clock rates going up, it would seem that speed is not a problem in writing fast routines. In addition, math coprocessors are becoming more popular and less expensive than ever before and are readily available. These factors make arithmetic easier and faster to use and implement. However, for many of you the systems that you are working on do not include the latest chips or the faster processors. Some of the most widely used microcontrollers used today are not Digital Signal Processors (DSP), but simple eight-bit controllers such as the Intel 8051 or 8048 microprocessors.
標簽: arithmetic high-speed ultimately efficient
上傳時間: 2014-11-30
上傳用戶:lizhen9880
This application report describes the use of Timer_A3 to decode RC5 and SIRC TV IR remote control signals. The decoder described in this report is interrupt-driven and operates a background function using specific features the Timer_A3. Only a small portion of the MSP430 CPU?s nonreal-time resources is used. Specific hardware bit-latching capabilities of the Timer_A3 module are used for real-time decoding of the IR data signal, independent and asynchronous to the CPU. CPU activity and power consumption are kept to an absolute minimum level. The Timer_A3 decoder implementation also allows other tasks to occur simultaneously if required. The solutions provided are written specifically for MSP430x11x(1) and MSP430x12x derivatives, but can be adapted to any other MSP430 incorporating Timer_A3. 電視遙控器設計基於MSP430
標簽: application describes Timer_A control
上傳時間: 2014-01-01
上傳用戶:qq21508895
With this foundation, you explore a development model that addresses the complete range of issues in the design of embedded communications software, including real-time operating systems, hardware and software partitioning, layering, and protocol stacks.
標簽: development foundation addresses complete
上傳時間: 2016-01-16
上傳用戶:zyt
Sofia-SIP is an open-source SIP User-Agent library, compliant with the IETF RFC3261 specification. It can be used as a building block for SIP client software for uses such as VoIP, IM, and many other real-time and person-to-person communication services. The primary target platform for Sofia-SIP is GNU/Linux. Sofia-SIP is based on a SIP stack developed at the Nokia Research Center.
標簽: specification open-source User-Agent Sofia-SIP
上傳時間: 2016-03-20
上傳用戶:洛木卓
Sofia-SIP is an open-source SIP User-Agent library, compliant with the IETF RFC3261 specification. It can be used as a building block for SIP client software for uses such as VoIP, IM, and many other real-time and person-to-person communication services. The primary target platform for Sofia-SIP is GNU/Linux.
標簽: specification open-source User-Agent Sofia-SIP
上傳時間: 2016-04-10
上傳用戶:watch100