一元稀疏多项式计算器[加法和乘法] 问题描述: 设计一元系数多项式计数器实现两个多项式间的加法、减法。 基本要求: (1) 输入并建立多项式 (2) 输出多项式,输出形式为整数序列:n,c1,e1,c2,e2……cn,en,其中n是多项式的项数,ci,ei分别为第i项的系数和指数。序列按指数降序排列。 (3) 多项式a和b相加,建立多项式a+b,输出相加的多项式。 (4) 多项式a和b相减,建立多项式a-b,输出相减的多项式。 用带表头结点的单链表存储多项式。 测试数据: (1) (2x+5x8-3.1x11)+(7-5x8+11x9) (2) (6x-3-x+4.4x2-1.2x9)-(-6x-3+5.4x2+7.8x15) (3) (x+x2+x3)+0 (4) (x+x3)-(-x-x-3)
上传时间: 2013-12-03
上传用户:561596
数字运算,判断一个数是否接近素数 A Niven number is a number such that the sum of its digits divides itself. For example, 111 is a Niven number because the sum of its digits is 3, which divides 111. We can also specify a number in another base b, and a number in base b is a Niven number if the sum of its digits divides its value. Given b (2 <= b <= 10) and a number in base b, determine whether it is a Niven number or not. Input Each line of input contains the base b, followed by a string of digits representing a positive integer in that base. There are no leading zeroes. The input is terminated by a line consisting of 0 alone. Output For each case, print "yes" on a line if the given number is a Niven number, and "no" otherwise. Sample Input 10 111 2 110 10 123 6 1000 8 2314 0 Sample Output yes yes no yes no
上传时间: 2015-05-21
上传用户:daguda
一、RSA基本原理 对明文分组M和密文分组C,加密与解密过程如下: C = POW (M , e) mod n M = POW(C , d) mod n = POW(POW( M ,e), d) mod n=POW( M,e*d) 其中POW是指数函数,mod是求余数函数。 其中收发双方均已知n,发送放已知e,只有接受方已知d,因此公钥加密算法的公钥为 KU={ e , n},私钥为KR={d , n}。该算法要能用做公钥加密,必须满足下列条件: 1. 可以找到e ,d和n,使得对所有M<n ,POW(M ,e*d)=M mod n . 2. 对所有 M<n,计算POW (M , e)和POW(C , d)是比较容易的。 3. 由e 和n确定d是不可行的
上传时间: 2014-08-04
上传用户:sevenbestfei
c语言版的多项式曲线拟合。 用最小二乘法进行曲线拟合. 用p-1 次多项式进行拟合,p<= 10 x,y 的第0个域x[0],y[0],没有用,有效数据从x[1],y[1] 开始 nNodeNum,有效数据节点的个数。 b,为输出的多项式系数,b[i] 为b[i-1]次项。b[0],没有用。 b,有10个元素ok。
上传时间: 2014-01-12
上传用户:变形金刚
针对M/PH/1(k)排队系统推导出该排队系统在任意时刻、到达时刻、退去时刻的队列长度状态概率分布、平均队列长度、以及平均等待时间,并编写程序进行数值计算,并对M/E2/1(k), M/M/1(k), M/H2/1(k)排队系统的性能进行数值比较。
上传时间: 2013-11-30
上传用户:秦莞尔w
这是我学习《MATLAB程序设计与应用》刘卫国、陈昭平 一书时第一章和第二章的课后习题 目录 exponential_e.m exsub.m fheritage.m initialise.m matrix.m matrix2.m matrixm.m matrix_c.m matrix_mul.m mult.m mywork1201.dll mywork1201.m normcdf_.m p41_4.m p41_5.asv p41_5.m p41_6.m p41_7.m p41_8.m p64_1.m p64_2.m p64_3.m p64_4.m p64_5.m p65_10_1.m p65_10_2.m p65_10_3.m p65_6.m p65_8.m
标签: exponential_e fheritage initiali MATLAB
上传时间: 2015-08-11
上传用户:x4587
高精度乘法基本思想和加法一样。其基本流程如下: ①读入被乘数s1,乘数s2 ②把s1、s2分成4位一段,转成数值存在数组a,b中;记下a,b的长度k1,k2; ③i赋为b中的最低位; ④从b中取出第i位与a相乘,累加到另一数组c中;(注意:累加时错开的位数应是多少位 ?) ⑤i:=i-1;检测i值:小于k2则转⑥,否则转④ ⑥打印结果
上传时间: 2015-08-16
上传用户:源弋弋
1、工具箱:LS_SVMlab Classification_LS_SVMlab.m - 多类分类 Regression_LS_SVMlab.m - 函数拟合 2、工具箱:OSU_SVM3.00 Classification_OSU_SVM.m - 多类分类 3、工具箱:stprtool\svm Classification_stprtool.m - 多类分类 4、工具箱:SVM_SteveGunn Classification_SVM_SteveGunn.m - 二类分类 Regression_SVM_SteveGunn.m - 函数拟合
标签: Classification_LS_SVMlab Regression_LS_SVMlab LS_SVMlab OSU_SVM
上传时间: 2014-01-20
上传用户:CHINA526
这是关于RADRA仿真的.有如下代码placeClutter.m, plotDistLines.m, plotFOV.m, radarSimulation.m, runRadarSim.m, targetsReturn.m, radarSimulation.fig, analyzBuffer.m, buildAntenaGain.m, createTargets.m, displayTargets.m, handleRadarControlls.m, MTIcalcTargetsV.m
标签: radarSimulation plotDistLines placeClutter runRadarSim
上传时间: 2015-10-15
上传用户:GavinNeko
已知一个序列x(n)=0.5cos(0.55*pi*n)+cos(0.45*pi*n),时域FFT分析其频谱。 (1)使用不同宽度的矩形窗截断该序列为M点,取M分别为:20,40,160,观察不同长度对频谱影响;(2)使用哈明窗和凯泽窗重做;(3)对三种窗的结果进行分析比较;(4)总结窗类型和长度对频谱分析的影响。
上传时间: 2013-12-25
上传用户:yuanyuan123