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

3.<b>25</b>

  • 给定n 个正整数和4 个运算符+、-、*、/

    给定n 个正整数和4 个运算符+、-、*、/, 且运算符无优先级,如2+3*5=25。对于任意给定 的整数m,试设计一个算法,用以上给出的n 个数 和4 个运算符,产生整数m,且用的运算次数最少 给出的n个数中每个数最多只能用1 次,但每种运 算符可以任意使用。

    标签: 整数 运算符

    上传时间: 2014-06-23

    上传用户:ve3344

  • 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

  • Hard-decision decoding scheme Codeword length (n) : 31 symbols. Message length (k) : 19 symbols.

    Hard-decision decoding scheme Codeword length (n) : 31 symbols. Message length (k) : 19 symbols. Error correction capability (t) : 6 symbols One symbol represents 5 bit. Uses GF(2^5) with primitive polynomial p(x) = X^5 X^2 + 1 Generator polynomial, g(x) = a^15 a^21*X + a^6*X^2 + a^15*X^3 + a^25*X^4 + a^17*X^5 + a^18*X^6 + a^30*X^7 + a^20*X^8 + a^23*X^9 + a^27*X^10 + a^24*X^11 + X^12. Note: a = alpha, primitive element in GF(2^5) and a^i is root of g(x) for i = 19, 20, ..., 30. Uses Verilog description with synthesizable RTL modelling. Consists of 5 main blocks: SC (Syndrome Computation), KES (Key Equation Solver), CSEE (Chien Search and Error Evaluator), Controller and FIFO Register.

    标签: symbols length Hard-decision Codeword

    上传时间: 2014-07-08

    上传用户:曹云鹏

  • 上下文无关文法(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

  • We have a group of N items (represented by integers from 1 to N), and we know that there is some tot

    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

  • 离散实验 一个包的传递 用warshall

     实验源代码 //Warshall.cpp #include<stdio.h> void warshall(int k,int n) { int i , j, t; int temp[20][20]; for(int a=0;a<k;a++) { printf("请输入矩阵第%d 行元素:",a); for(int b=0;b<n;b++) { scanf ("%d",&temp[a][b]); } } for(i=0;i<k;i++){ for( j=0;j<k;j++){ if(temp[ j][i]==1) { for(t=0;t<n;t++) { temp[ j][t]=temp[i][t]||temp[ j][t]; } } } } printf("可传递闭包关系矩阵是:\n"); for(i=0;i<k;i++) { for( j=0;j<n;j++) { printf("%d", temp[i][ j]); } printf("\n"); } } void main() { printf("利用 Warshall 算法求二元关系的可传递闭包\n"); void warshall(int,int); int k , n; printf("请输入矩阵的行数 i: "); scanf("%d",&k); 四川大学实验报告 printf("请输入矩阵的列数 j: "); scanf("%d",&n); warshall(k,n); } 

    标签: warshall 离散 实验

    上传时间: 2016-06-27

    上传用户:梁雪文以

  • 道理特分解法

    #include "iostream" using namespace std; class Matrix { private: double** A; //矩阵A double *b; //向量b public: int size; Matrix(int ); ~Matrix(); friend double* Dooli(Matrix& ); void Input(); void Disp(); }; Matrix::Matrix(int x) { size=x; //为向量b分配空间并初始化为0 b=new double [x]; for(int j=0;j<x;j++) b[j]=0; //为向量A分配空间并初始化为0 A=new double* [x]; for(int i=0;i<x;i++) A[i]=new double [x]; for(int m=0;m<x;m++) for(int n=0;n<x;n++) A[m][n]=0; } Matrix::~Matrix() { cout<<"正在析构中~~~~"<<endl; delete b; for(int i=0;i<size;i++) delete A[i]; delete A; } void Matrix::Disp() { for(int i=0;i<size;i++) { for(int j=0;j<size;j++) cout<<A[i][j]<<" "; cout<<endl; } } void Matrix::Input() { cout<<"请输入A:"<<endl; for(int i=0;i<size;i++) for(int j=0;j<size;j++){ cout<<"第"<<i+1<<"行"<<"第"<<j+1<<"列:"<<endl; cin>>A[i][j]; } cout<<"请输入b:"<<endl; for(int j=0;j<size;j++){ cout<<"第"<<j+1<<"个:"<<endl; cin>>b[j]; } } double* Dooli(Matrix& A) { double *Xn=new double [A.size]; Matrix L(A.size),U(A.size); //分别求得U,L的第一行与第一列 for(int i=0;i<A.size;i++) U.A[0][i]=A.A[0][i]; for(int j=1;j<A.size;j++) L.A[j][0]=A.A[j][0]/U.A[0][0]; //分别求得U,L的第r行,第r列 double temp1=0,temp2=0; for(int r=1;r<A.size;r++){ //U for(int i=r;i<A.size;i++){ for(int k=0;k<r-1;k++) temp1=temp1+L.A[r][k]*U.A[k][i]; U.A[r][i]=A.A[r][i]-temp1; } //L for(int i=r+1;i<A.size;i++){ for(int k=0;k<r-1;k++) temp2=temp2+L.A[i][k]*U.A[k][r]; L.A[i][r]=(A.A[i][r]-temp2)/U.A[r][r]; } } cout<<"计算U得:"<<endl; U.Disp(); cout<<"计算L的:"<<endl; L.Disp(); double *Y=new double [A.size]; Y[0]=A.b[0]; for(int i=1;i<A.size;i++ ){ double temp3=0; for(int k=0;k<i-1;k++) temp3=temp3+L.A[i][k]*Y[k]; Y[i]=A.b[i]-temp3; } Xn[A.size-1]=Y[A.size-1]/U.A[A.size-1][A.size-1]; for(int i=A.size-1;i>=0;i--){ double temp4=0; for(int k=i+1;k<A.size;k++) temp4=temp4+U.A[i][k]*Xn[k]; Xn[i]=(Y[i]-temp4)/U.A[i][i]; } return Xn; } int main() { Matrix B(4); B.Input(); double *X; X=Dooli(B); cout<<"~~~~解得:"<<endl; for(int i=0;i<B.size;i++) cout<<"X["<<i<<"]:"<<X[i]<<" "; cout<<endl<<"呵呵呵呵呵"; return 0; } 

    标签: 道理特分解法

    上传时间: 2018-05-20

    上传用户:Aa123456789

  • VIP专区-单片机源代码精选合集系列(9)

    eeworm.com VIP专区 单片机源码系列 9资源包含以下内容:1. STC12C5A60S2单片机(去水印+解锁版)(1).pdf2. PCI、STC、51单片机型号命名规则.rar3. LY6206线性稳压芯片LDO原文资料.PDF4. 浮点除法运算及其在单片机上的实现.pdf5. 基于STM32的智能循迹往返小车设计.zip6. 16位单片机指令集.pdf7. 基于MSC-51单片机的智能压力变送器.zip8. 隔离型RS-485收发器ADM2483,ADM2484E,ADM2587E.doc9. 用AVR单片机实现快速跳频.pdf10. 基于单片机的智能点火控制系统设计.zip11. AS179-92LF原文资料.pdf12. LED点阵书写显示屏设计报告.pdf13. 基于AT89S52温度自动控制检测系统设计.zip14. 浅谈单片机程序设计中的“分层思想.wps15. 肺活量测量仪设计论文资料.rar16. 基于STM32芯片的工控板设计.zip17. TX-1C元件资料.rar18. 全局变量、局部变量、静态变量.doc19. TX-1C实验板分块原理图.rar20. HT-IDE3000_Holtek_C语言编程指南(中文).pdf21. 新颖60秒LED旋转电子钟.doc22. DS18B20温度传感器应用解析中文资料(有时序图).doc23. CodeBlocks手册-使用篇.pdf24. CS98P260用户编程指南 V1.3.pdf25. 基于PT100温度检测软硬件设计.doc26. LF412 原文资料.pdf27. MC33812FS原文资料.pdf28. MC9S12XS单片机原理及嵌入式系统开发2.zip29. RN8302用户手册--防窃电智能计量芯片.pdf30. RF24L01SE开发指南.pdf31. 步进电机讲义.ppt32. MB95F330系列硬件手册(中文).pdf33. msp430单片机控制步进电机实验的电路图及C程序.pdf34. 无线模块cc1101学习资料.rar35. MSP430_C语言例程注释详.pdf36. 基于18B20的温度测量仪课程设计报告.doc37. 飞思卡尔32位处理器_ARM_CORTEX_M4___K60P100M100SF2RM手册.pdf38. AD603中文资料.rar39. 自动售货机--PLC课程设计.doc40. USB雷达——看牛人如何架设自己的导弹防御系统.zip41. 真值有效值转换芯片AD637.pdf42. 程控增益放大器论文(AD603).doc43. 使用DS12C887时钟芯片设计高精度时钟.doc44. WT588D语音芯片及模块详细资料V2.10.pdf45. L298N原文资料.pdf46. Proteus仿真软件在单片机设计中的应用.pdf47. MSP430g2553中文资料.PDF48. AVR学习笔记.rar49. Proteus 与单片机实时动态仿真.pdf50. 基于MSP430G2553的电压表设计.doc51. Arduino电子积木中级套件中文教程.pdf52. proteus 教程.pdf53. DE2使用说明 原文资料.pdf54. SJA1000独立 CAN 控制器 周立功资料.pdf55. 基于8279的键盘和显示电路设计.pdf56. AD转换中常用的十种数字滤波法.doc57. 基于AT89C2051单片机的时钟日历系统.pdf58. 16F877单片机手册中文.pdf59. 51单片机开发与应用技术详解(珍藏版)PPT及源码.rar60. DS12887+1602(带温度)原理图和程序.rar61. 基于MSP430的CO报警器的设计.pdf62. 四十种常用芯片数据手册--原文资料.rar63. 电子式电能表设计毕业论文.doc64. LED照明驱动IC--NO5.pdf65. 一种基于MSP430单片机的目标指示器单体.pdf66. 基于单片机智能交流电压表的设计.pdf67. Arduino最全的中文教程.pdf68. 交流数字电压表.doc69. 基于MSP430单片机的光纤光栅传感器匹配解调系统.pdf70. 基于MSP430单片机的光发射机监控系统设计.pdf71. NAND_Flash的坏块处理.doc72. 晶片wafer 平面工艺详细介绍.pdf73. 升压IC--AN_SY6902A原文资料.pdf74. BST-BMA250-DS002-04原文资料.pdf75. 继电器论文--用MEGA16做的继电器参数测量仪.docx76. KT0803K单片机原文资料--小型调频发射系统.pdf77. 用MSP430实现斜率 A/D转换的温度控制系统.pdf78. 一 种基于MSP430单片机的蓝牙接收装置的设计.pdf79. 用MSP430实现 太阳能交通信号控制机.pdf80. TLC2543电压表设计.doc81. 用超低功耗MSP430单片机设计数据采集系统.pdf82. 基于单片机的电子负载毕业论文(含原理图+程序).doc83. 用VB实现PC机与MSP430单片机串行通信.pdf84. LM2596_DataSheet原文资料.pdf85. MAX7456原厂中文资料.pdf86. STM8S-DISCOVERY原理图(原文资料).rar87. Hi3531 H.264编解码处理器用户指南.pdf88. MSP430单片机__极端详细+应用程序,实验教程.pdf89. C语言,结构体(struct) 用法.doc90. 用 MSP430F149单片机实现步进电机通用控制器.pdf91. 基于DTH11+LCD温湿度采集.rar92. 以超低功耗微处理器MSP430为核心的热计量表设计.pdf93. AVR高速嵌入式单片机原理与应用(修订版)(1).pdf94. ILI9325中文指令说明--彩色液晶屏控制手册.pdf95. 以太网控制芯片W5100的存储装置设计.pdf96. 基于单片机的电梯控制系统的设计与实现.ppt97. 史上最便宜的USB数据采集板.doc98. 遥控车IC原理图.pdf99. 基于51单片机和LabVIEW的远程陀螺仪显示平台的构建.pdf100. 基础机器人制作与编程.ppt

    标签: Matlab 编程

    上传时间: 2013-05-15

    上传用户:eeworm

  • Delphi2005 BS程序设计技巧集 (1-3) 现在delphi 2005 B/S的书籍资料太少

    Delphi2005 BS程序设计技巧集 (1-3) 现在delphi 2005 B/S的书籍资料太少,几乎没有可参考的资料,这在一定程度上限制了delphi 2005的使用,相反C#,ASP的书籍资料到处都是。通过几个月的学习也算是总结了一点经验,从现在起我将陆续将ASP和C#的例子、技巧翻译到delphi 2005下面,希望对大家的学习和工作有帮助,毕竟.Net是一种发展趋势。我将不定期写新的内容,同时,如果你在工作或学习中有什么问题,我也会将问题加入本篇文章,另外,一个人的能力毕竟有限,也希望大家共同来解决问题。 宋雨炫

    标签: 2005 Delphi delphi 程序

    上传时间: 2013-11-25

    上传用户:lgnf

  • 一、 一元三次回归方程 CubicMultinomialRegress.cs 方程模型为Y=a*X(3)+b*X(2)+c*X(1)+d public override double[] buil

    一、 一元三次回归方程 CubicMultinomialRegress.cs 方程模型为Y=a*X(3)+b*X(2)+c*X(1)+d public override double[] buildFormula() 得到系数数组,存放顺序与模型系数相反,即该数组中系数的值依次是d,c,b,a。 以后所述所有模型的系数存放均与此相同(多元线性回归方程除外)。 public override double forecast(double x) 预测函数,根据模型得到预测结果 public override double computeR2() 计算相关系数(决定系数),系数越接近1,数据越满足该模型。

    标签: CubicMultinomialRegress override public double

    上传时间: 2015-11-25

    上传用户:13215175592