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

单片机<b>C</b>语言

  • 大整数乘法例子代码 /* 递归边界

    大整数乘法例子代码 /* 递归边界,如果是1位二进制数与1位二进制数相乘,则可以直接计算 */ /*累计做1位二进制乘法运算的次数*/ /* return (X*Y) */ /* 计算n的值 */ /* 把X和Y拆分开来,令X=A*2^(n/2)+B, 左移位运算,mod = 1<<(n/2) */ /* 计算XY=AC*2^n+(AD+CB)*2^(n/2)+BD */ /* 计算A*C,再向左移n位 */ /* 递归计算A*D */ /* 递归计算C*B */ /* 计算a21+a22,再向左移n/2位 */ /* 递归计算B*D */ /* XY=a1+a2+a3 */

    标签: 整数 乘法 代码 递归

    上传时间: 2015-05-19

    上传用户:gyq

  • The government of a small but important country has decided that the alphabet needs to be streamline

    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

  • keil C51的中文手册

    keil C51的中文手册,51单片机初学者C语言编程的好资料。

    标签: keil C51

    上传时间: 2014-01-10

    上传用户:zaizaibang

  • 光学设计软件zemax源码: This DLL models an nular aspheric surface as described in: "Annular surfaces in

    光学设计软件zemax源码: This DLL models an nular aspheric surface as described in: "Annular surfaces in annular field systems" By Jose M. Sasian Opt. eng. 36 (12) P 3401-3401 December 1997 This surface is essentially an odd aspheric surface with an offset in the aspheric terms. The sag is given by: Z = (c*r*r) / (1+(1-((1+k)*c*c*r*r))^ 1/2 ) + a*(r-q)^2 + b*(r-q)^3 + c*(r-q)^4 + ... Note the terms a, b, c, ... have units of length to the -1, -2, -3, ... power.

    标签: described aspheric surfaces Annular

    上传时间: 2014-01-08

    上传用户:yyyyyyyyyy

  • 中国象棋网络版C#源码 Visual studio 2005,C#开发 中国象棋网络版

    中国象棋网络版C#源码 Visual studio 2005,C#开发 中国象棋网络版,具有人工智能,可采用人工下棋、电脑参谋、电脑下棋等模式参加互联网比赛。采用ClickOnce发 布到你的网站上,选择只能联机运行,可以让玩家只能上你的网站玩游戏。 共有三个项目: Game是主项目; CChessThinker是用C++写的人工智能DLL类库; Thinker是用C#写的DLL,只是简单的封装了CChessThinker,目的是让有些朋友可以直接用C#开发人工智能的DLL直 接替换 Thinker.dll,使得程序的智能程度得到提高。如果用C++等语言开发出来的人工智能类库就直接替代 CChessThinker.dll 本源代码可以自由传播,随意修改,自由增加广告。

    标签: Visual studio 2005 网络

    上传时间: 2015-08-12

    上传用户:lht618

  • 该源码是一个问题的解决方法。问题是给你个长为L的串

    该源码是一个问题的解决方法。问题是给你个长为L的串,串中可以出现n种字符,还给出m个子串,求有多少个长为n的只由这些字串组成的串。输入例子:4 5 6 ABB BCA BCD CAB CDD DDA 结果为2.而5 4 5 E D C B A的结果为625

    标签: 源码

    上传时间: 2014-01-12

    上传用户:水中浮云

  • /*** *** *** *** *** *** *** *** *** *** *** *** **/ //**此映射表用来映射LED模块不译码时

    /*** *** *** *** *** *** *** *** *** *** *** *** **/ //**此映射表用来映射LED模块不译码时,显示的字符和必须输入的数据的关系 //**每段和对应比特位的关系见示意图 // g // --- --- // b | a |f | | <---显示0时点亮的段为gfedcb // --- // c | |e | | 那么写入数据为0x7e // --- --- // d // bit: 7 6 5 4 3 2 1 0 // 段位: g f e d c b a

    标签: LED 映射 模块 译码

    上传时间: 2013-11-25

    上传用户:

  • 上下文无关文法(Context-Free Grammar, CFG)是一个4元组G=(V, T, S, P)

    上下文无关文法(Context-Free Grammar, CFG)是一个4元组G=(V, T, S, P),其中,V和T是不相交的有限集,S∈V,P是一组有限的产生式规则集,形如A→α,其中A∈V,且α∈(V∪T)*。V的元素称为非终结符,T的元素称为终结符,S是一个特殊的非终结符,称为文法开始符。 设G=(V, T, S, P)是一个CFG,则G产生的语言是所有可由G产生的字符串组成的集合,即L(G)={x∈T* | Sx}。一个语言L是上下文无关语言(Context-Free Language, CFL),当且仅当存在一个CFG G,使得L=L(G)。 *⇒ 例如,设文法G:S→AB A→aA|a B→bB|b 则L(G)={a^nb^m | n,m>=1} 其中非终结符都是大写字母,开始符都是S,终结符都是小写字母。

    标签: Context-Free Grammar CFG

    上传时间: 2013-12-10

    上传用户:gaojiao1999

  • 基于ATMEL89s52单片机

    基于ATMEL89s52单片机,C++编写的PWM控制的电机控制源程序,可控制电机的正反转、增减速,编译效率高,生成代码短,可有效控制电机高速工作。

    标签: ATMEL 89s s52 89

    上传时间: 2013-12-20

    上传用户:dreamboy36

  • 求解方程式的根的算法

    求解方程式的根的算法,要求输入a,b,c 3个数据的值,输出结果将显示在方框内

    标签: 方程 算法

    上传时间: 2015-10-31

    上传用户:gtf1207